aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Extend/Hook.php10
-rw-r--r--Zotlabs/Module/Connedit.php5
-rw-r--r--Zotlabs/Module/Photos.php1
-rw-r--r--Zotlabs/Module/Profiles.php1
-rwxr-xr-xboot.php4
-rw-r--r--doc/Webpages.md2
-rw-r--r--doc/hidden_configs.bb115
-rw-r--r--doc/hooklist.bb35
-rw-r--r--doc/plugins.bb24
-rw-r--r--doc/webpages.bb2
-rw-r--r--include/nav.php17
-rwxr-xr-xinclude/plugin.php15
-rw-r--r--library/Smarty/NEW_FEATURES.txt8
-rw-r--r--library/Smarty/change_log.txt42
-rw-r--r--library/Smarty/libs/Smarty.class.php25
-rw-r--r--library/Smarty/libs/sysplugins/smarty_cacheresource.php9
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_block.php2
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php9
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php12
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php11
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php37
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_section.php4
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_data.php15
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_extension_clear.php8
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_method_clearallcache.php5
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_method_clearcache.php5
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php16
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_method_configload.php2
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php13
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_codeframe.php2
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_foreach.php3
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php70
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_tplfunction.php2
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_updatecache.php16
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php2
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_validatecompiled.php9
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_runtime_var.php2
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php252
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_templateparser.php2110
-rw-r--r--library/Smarty/libs/sysplugins/smarty_resource.php10
-rw-r--r--library/Smarty/libs/sysplugins/smarty_template_resource_base.php7
-rw-r--r--library/jquery-textcomplete/jquery.textcomplete.js583
-rw-r--r--library/jquery-textcomplete/jquery.textcomplete.min.js3
-rw-r--r--version.inc2
-rw-r--r--view/js/main.js26
-rw-r--r--view/php/theme_init.php2
-rw-r--r--view/theme/redbasic/css/narrow_navbar.css4
-rw-r--r--view/theme/redbasic/css/style.css28
-rwxr-xr-xview/tpl/abook_edit.tpl24
-rwxr-xr-xview/tpl/nav.tpl14
-rw-r--r--view/tpl/nav_header.tpl49
-rwxr-xr-xview/tpl/photo_view.tpl2
-rwxr-xr-xview/tpl/profile_edit.tpl2
53 files changed, 2042 insertions, 1636 deletions
diff --git a/Zotlabs/Extend/Hook.php b/Zotlabs/Extend/Hook.php
index 836b29db8..edfacfa3b 100644
--- a/Zotlabs/Extend/Hook.php
+++ b/Zotlabs/Extend/Hook.php
@@ -6,6 +6,10 @@ namespace Zotlabs\Extend;
class Hook {
static public function register($hook,$file,$function,$version = 1,$priority = 0) {
+ if(is_array($function)) {
+ $function = serialize($function);
+ }
+
$r = q("SELECT * FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s' and priority = %d and hook_version = %d LIMIT 1",
dbesc($hook),
dbesc($file),
@@ -28,6 +32,9 @@ class Hook {
}
static public function unregister($hook,$file,$function,$version = 1,$priority = 0) {
+ if(is_array($function)) {
+ $function = serialize($function);
+ }
$r = q("DELETE FROM hook WHERE hook = '%s' AND `file` = '%s' AND `function` = '%s' and priority = %d and hook_version = %d",
dbesc($hook),
dbesc($file),
@@ -63,6 +70,9 @@ class Hook {
*/
static public function insert($hook, $fn, $version = 0, $priority = 0) {
+ if(is_array($fn)) {
+ $fn = serialize($fn);
+ }
if(! is_array(App::$hooks))
App::$hooks = array();
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index 2b524096f..a1268510d 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -514,7 +514,7 @@ class Connedit extends \Zotlabs\Web\Controller {
$contact_id = \App::$poi['abook_id'];
$contact = \App::$poi;
- $buttons = array(
+ $tools = array(
'view' => array(
'label' => t('View Profile'),
@@ -711,7 +711,8 @@ class Connedit extends \Zotlabs\Web\Controller {
'$notself' => (($self) ? '' : '1'),
'$self' => (($self) ? '1' : ''),
'$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'),
- '$buttons' => (($self) ? '' : $buttons),
+ '$tools_label' => t('Connection Tools'),
+ '$tools' => (($self) ? '' : $tools),
'$lbl_slider' => t('Slide to adjust your degree of friendship'),
'$lbl_rating' => t('Rating'),
'$lbl_rating_label' => t('Slide to adjust your rating'),
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index 00a577847..ce350666f 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -1231,6 +1231,7 @@ class Photos extends \Zotlabs\Web\Controller {
$o .= replace_macros($photo_tpl, array(
'$id' => $ph[0]['id'],
'$album' => $album_e,
+ '$tools_label' => t('Photo Tools'),
'$tools' => $tools,
'$lock' => $lockstate[1],
'$photo' => $photo,
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 30ec337f8..72edf396f 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -691,6 +691,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$submit' => t('Submit'),
'$viewprof' => t('View this profile'),
'$editvis' => t('Edit visibility'),
+ '$tools_label' => t('Profile Tools'),
'$coverpic' => t('Change cover photo'),
'$profpic' => t('Change profile photo'),
'$cr_prof' => t('Create a new profile using these settings'),
diff --git a/boot.php b/boot.php
index 78a6b7d32..0cfd8d1c2 100755
--- a/boot.php
+++ b/boot.php
@@ -47,7 +47,7 @@ require_once('include/account.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
-define ( 'STD_VERSION', '1.4.2' );
+define ( 'STD_VERSION', '1.4.3' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1166 );
@@ -1797,7 +1797,7 @@ function proc_run($cmd){
$arr = array('args' => $args, 'run_cmd' => true);
- call_hooks("proc_run", $arr);
+ call_hooks('proc_run', $arr);
if(! $arr['run_cmd'])
return;
diff --git a/doc/Webpages.md b/doc/Webpages.md
index dafd3661d..801a9a3a0 100644
--- a/doc/Webpages.md
+++ b/doc/Webpages.md
@@ -1,7 +1,7 @@
Creating Webpages
=================
-Red enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section.
+Hubzilla enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section.
Once enabled, a new tab will appear on your channel page labelled "Webpages". Clicking this link will take you to the webpage editor. Here you can create a post using either BBCode or the rich text editor.
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb
index 520abc22b..5bb7454ec 100644
--- a/doc/hidden_configs.bb
+++ b/doc/hidden_configs.bb
@@ -4,9 +4,13 @@ $Projectname contains many configuration options hidden from the main admin pane
These are generally options considered too niche, confusing, or advanced for
the average member. These settings can be activated from the the top level web
-directory with the syntax [code]util/config cat key value[/code] for a site
-configuration, or [code]util/pconfig channel_id cat key value[/code] for a
-member configuration.
+directory with the syntax
+
+[code]util/config cat key value[/code]
+for a site configuration, or
+
+[code]util/pconfig channel_id cat key value[/code]
+for a member configuration.
This document assumes you're an administrator.
@@ -60,28 +64,31 @@ This document assumes you're an administrator.
Allow the @mention tagging of anyone whether you are connected or not.
[b]system.directorytags[/b]
Set the number of keyword tags displayed on the directory page. Default is 50 unless set to a
- positive integer.
- [b]system.disable_directory_keywords[/b]
- If '1', do not show directory keywords. If the hub is a directory server, prevent returning
- tags to any directory clients. Please do not set this for directory servers in the RED_GLOBAL realm.
- [b]system.disable_dreport[/b]
- If '1', don't store or link to delivery reports
+ positive integer.
+ [b]system.disable_directory_keywords[/b]
+ If '1', do not show directory keywords. If the hub is a directory server, prevent returning
+ tags to any directory clients. Please do not set this for directory servers in the RED_GLOBAL realm.
+ [b]system.disable_dreport[/b]
+ If '1', don't store or link to delivery reports
[b]system.startpage[/b]
Set the default page to be taken to after a login for all channels at
this website. Can be overwritten by user settings.
[b]system.projecthome[/b]
Set the project homepage as the homepage of your hub. (Obsolete)
- [b]system.auto_channel_create[/b]
- Add the necessary form elements to create the first channel on the account registration page, and create it
- (possibly following email validation or administrator approval). This precludes the ability to import a channel
- from another site as the first channel created on this site for a new account.
- Use with system.default_permissions_role to streamline registration.
- [b]system.default_permissions_role[/b]
- If set to a valid permissions role name, use that role for
- the first channel created by a new account and don't ask for the "Channel Type" on
- the channel creation form. Examples of valid names are: 'social', 'social_restricted', 'social_private',
- 'forum', 'forum_restricted' and 'forum_private'.
- Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl].
+ [b]system.auto_channel_create[/b]
+ Add the necessary form elements to create the first channel on the account registration page, and create it
+ (possibly following email validation or administrator approval). This precludes the ability to import a channel
+ from another site as the first channel created on this site for a new account.
+ Use with system.default_permissions_role to streamline registration.
+ [b]system.default_permissions_role[/b]
+ If set to a valid permissions role name, use that role for
+ the first channel created by a new account and don't ask for the "Channel Type" on
+ the channel creation form. Examples of valid names are: 'social', 'social_restricted', 'social_private',
+ 'forum', 'forum_restricted' and 'forum_private'.
+ Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl].
+ [b]system.default_photo_profile[/b]
+ Set the profile photo that new channels start with. This should contain the name of a directory located
+ under [font=courier]images/default_profile_photos/[/font], or be left unset. If not set then 'rainbow_man' is assumed.
[b]system.workflow_channel_next[/b]
The page to direct new members to immediately after creating a channel.
[b]system.workflow_register_next[/b]
@@ -96,28 +103,29 @@ This document assumes you're an administrator.
Similar to block_public, except only blocks public access to
search features. Useful for sites that want to be public, but
keep getting hammered by search engines.
- [b]system.proc_run_use_exec
- If 1, use the exec system call in proc_run to run background tasks. By default
- we use proc_open and proc_close. On some (currently rare) systems this does not work well.
+ [b]system.proc_run_use_exec[/b]
+ If 1, use the exec system call in proc_run to run background tasks. By default
+ we use proc_open and proc_close. On some (currently rare) systems this does not work well.
[b]system.paranoia[/b]
As the pconfig, but on a site-wide basis. Can be overwritten
by member settings.
- [b]system.transport_security_header[/b]
- if non-zero and SSL is being used, include a strict-transport-security header on webpages
- [b]system.poke_basic[/b]
- Reduce the number of poke verbs to exactly 1 ("poke"). Disable other verbs.
+ [b]system.transport_security_header[/b]
+ if non-zero and SSL is being used, include a strict-transport-security header on webpages
+ [b]system.poke_basic[/b]
+ Reduce the number of poke verbs to exactly 1 ("poke"). Disable other verbs.
[b]system.openssl_conf_file[/b]
- Specify a file containing OpenSSL configuration. Read the code first.
- If you can't read the code, don't play with it.
+ Specify a file containing OpenSSL configuration. Needed in some Windows installations to
+ locate the openssl configuration file on the system.
+ Read the code first. If you can't read the code, don't play with it.
[b]system.optimize_items[/b]
Runs optimise_table during some tasks to keep your database nice and
defragmented. This comes at a performance cost while the operations
are running, but also keeps things a bit faster while it's not.
There also exist CLI utilities for performing this operation, which you
may prefer, especially if you're a large site.
- [b]system.expire_limit
- Don't expire any more than this number of posts per channel per
- expiration run to keep from exhausting memory. Default 5000.
+ [b]system.expire_limit[/b]
+ Don't expire any more than this number of posts per channel per
+ expiration run to keep from exhausting memory. Default 5000.
[b]system.dlogfile[/b]
Logfile to use for logging development errors. Exactly the same as
logger otherwise. This isn't magic, and requires your own logging
@@ -138,13 +146,17 @@ This document assumes you're an administrator.
[b]system.cron_hour[/b]
Specify an hour in which to run cron_daily. By default with no config, this will run at midnight UTC.
[b]system.minimum_feedcheck_minutes[/b]
- The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds will be polled with each cronjob. Defaults to 60 if not set. The site setting can also be over-ridden on a channel by channel basis by a service class setting aptly named 'minimum_feedcheck_minutes'.
+ The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds
+ will be polled with each cronjob. Defaults to 60 if not set. The site setting can also be over-ridden
+ on a channel by channel basis by a service class setting aptly named 'minimum_feedcheck_minutes'.
[b]system.blacklisted_sites[/b]
An array of specific hubs to block from this hub completely.
[b]system.ignore_imagick[/b]
Ignore imagick and use GD, even if imagick is installed on the server. Prevents some issues with PNG files in older versions of imagick.
[b]system.no_age_restriction[/b]
- Do not restrict registration to people over the age of 13. This carries legal responsibilities in many countries to require that age be provided and to block all personal information from minors, so please check your local laws before changing.
+ Do not restrict registration to people over the age of 13. This carries legal responsibilities in
+ many countries to require that age be provided and to block all personal information from minors,
+ so please check your local laws before changing.
[b]system.override_poll_lockfile[/b]
Ignore the lock file in the poller process to allow more than one process to run at a time.
[b]system.projecthome[/b]
@@ -158,16 +170,23 @@ This document assumes you're an administrator.
[b]system.photo_cache_time[/b]
How long to cache photos, in seconds. Default is 86400 (1 day).
Longer time increases performance, but it also means it takes longer for changed permissions to apply.
- [b]system.poco_rating_enable[/b]
- Distributed reputation reporting and data collection may be disabled. If your site does not participate in distributed reputation you will also not be able to make use of the data from your connections on other sites. By default and in the absence of any setting it is enabled. Individual members can opt out by restricting who can see their connections or by not providing any reputation information for their connections.
- [b]system.register_link[/b]
- path to direct to from the "register" link on the login form. On closed sites this will direct to 'pubsites'. For open sites it will normally redirect to 'register' but you may change this to a custom site page offering subscriptions or whatever.
- [b]system.max_import_size[/b]
- If configured, the maximum length of an imported text message. This is normally left at 200Kbytes or more to accomodate Friendica private photos, which are embedded.
- [b]system.tempdir[/b]
- Place to store temporary files (currently unused), default is defined in the PHP configuration
- [b]system.uploaddir[/b]
- Location to upload files (default is system.tempdir, currently used only by js_upload plugin)
+ [b]system.poco_rating_enable[/b]
+ Distributed reputation reporting and data collection may be disabled. If your site does not participate
+ in distributed reputation you will also not be able to make use of the data from your connections on
+ other sites. By default and in the absence of any setting it is enabled. Individual members can opt out
+ by restricting who can see their connections or by not providing any reputation information for their
+ connections.
+ [b]system.register_link[/b]
+ path to direct to from the "register" link on the login form. On closed sites this will direct to
+ 'pubsites'. For open sites it will normally redirect to 'register' but you may change this to a
+ custom site page offering subscriptions or whatever.
+ [b]system.max_import_size[/b]
+ If configured, the maximum length of an imported text message. This is normally left at 200Kbytes
+ or more to accomodate Friendica private photos, which are embedded.
+ [b]system.tempdir[/b]
+ Place to store temporary files (currently unused), default is defined in the PHP configuration
+ [b]system.uploaddir[/b]
+ Location to upload files (default is system.tempdir, currently used only by js_upload plugin)
[b]system.disable_discover_tab[/b]
This allows you to completely disable the ability to discover public content from external sites.
[b]system.sys_expire_days[/b]
@@ -175,9 +194,8 @@ This document assumes you're an administrator.
[b]system.openssl_encrypt[/b]
Use openssl encryption engine, default is false (uses mcrypt for AES encryption)
[b]system.max_tagged_forums[/b]
- Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery.
- [b]system.openssl_conf_file[/b]
- Needed in some Windows installations to locate the openssl configuration file on the system.
+ Spam prevention. Limits the number of tagged forums which are recognised in any post.
+ Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery.
[b]system.hide_help[/b]
Don't display help documentation link in nav bar
[b]system.expire_delivery_reports[/b]
@@ -187,7 +205,8 @@ This document assumes you're an administrator.
[b]system.hide_version[/b] *
If true, do not report the software version on webpages and tools. (*) Must be set in .htconfig.php
[b]system.hidden_version_siteinfo[/b]
- If true, do not report the software version on siteinfo pages (system.hide_version also hides the version on these pages, this setting *only* hides the version on siteinfo pages).
+ If true, do not report the software version on siteinfo pages (system.hide_version also hides
+ the version on these pages, this setting *only* hides the version on siteinfo pages).
[b]system.email_notify_icon_url[/b]
URL of image (32x32) to display in email notifications (HTML bodies).
diff --git a/doc/hooklist.bb b/doc/hooklist.bb
index bae641585..994d0dbb2 100644
--- a/doc/hooklist.bb
+++ b/doc/hooklist.bb
@@ -34,12 +34,18 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/activity_received]activity_received[/zrl]
Called when an activity (post, comment, like, etc.) has been received from a zot source
+[zrl=[baseurl]/help/hook/admin_aside]admin_aside[/zrl]
+ Called when generating the admin page sidebar widget
+
[zrl=[baseurl]/help/hook/affinity_labels]affinity_labels[/zrl]
Used to generate alternate labels for the affinity slider.
[zrl=[baseurl]/help/hook/api_perm_is_allowed]api_perm_is_allowed[/zrl]
Called when perm_is_allowed() is executed from an API call.
+[zrl=[baseurl]/help/hook/app_menu]app_menu[/zrl]
+ Called when generating the app_menu dropdown (may be obsolete)
+
[zrl=[baseurl]/help/hook/atom_author]atom_author[/zrl]
Called when generating an author or owner element for an Atom ActivityStream feed
@@ -88,6 +94,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/check_siteallowed]check_siteallowed[/zrl]
Used to over-ride or bypass the site black/white block lists
+[zrl=[baseurl]/help/hook/comment_buttons]comment_buttons[/zrl]
+ Called when rendering the edit buttons for comments
+
[zrl=[baseurl]/help/hook/connect_premium]connect_premium[/zrl]
Called when connecting to a premium channel
@@ -112,6 +121,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/conversation_start]conversation_start[/zrl]
Called in the beginning of rendering a conversation (message or message collection or stream)
+[zrl=[baseurl]/help/hook/cover_photo_content_end]cover_photo_content_end[/zrl]
+ Called after a cover photo has been uplaoded
+
[zrl=[baseurl]/help/hook/create_identity]create_identity[/zrl]
Called when creating a channel
@@ -184,6 +196,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/follow]follow[/zrl]
called when a follow operation takes place
+[zrl=[baseurl]/help/hook/follow_from_feed]follow_from_feed[/zrl]
+ called when a follow operation takes place on an RSS feed
+
[zrl=[baseurl]/help/hook/follow_allow]follow_allow[/zrl]
called before storing the results of a follow operation
@@ -206,6 +221,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/get_all_perms]get_all_perms[/zrl]
called when get_all_perms() is used
+[zrl=[baseurl]/help/hook/get_best_language]get_best_language[/zrl]
+ called when choosing the preferred language for the page
+
[zrl=[baseurl]/help/hook/get_features]get_features[/zrl]
Called when get_features() is called
@@ -266,6 +284,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/local_dir_update]local_dir_update[/zrl]
Called when processing a directory update from a channel on the directory server
+[zrl=[baseurl]/help/hook/location_move]location_move[/zrl]
+ Called when a new location has been provided to a UNO channel (indicating a move rather than a clone)
+
[zrl=[baseurl]/help/hook/logged_in]logged_in[/zrl]
Called when authentication by any means has succeeeded
@@ -281,6 +302,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/magic_auth]magic_auth[/zrl]
Called when processing a magic-auth sequence
+[zrl=[baseurl]/help/hook/match_webfinger_location]match_webfinger_location[/zrl]
+ Called when processing webfinger requests
+
[zrl=[baseurl]/help/hook/magic_auth_openid_success]magic_auth_openid_success[/zrl]
Called when a magic-auth was successful due to openid credentials
@@ -324,7 +348,10 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
Called when a hub is delivered
[zrl=[baseurl]/help/hook/notifier_normal]notifier_normal[/zrl]
- Called when the notofoer is invoked for a 'normal' delivery
+ Called when the notifier is invoked for a 'normal' delivery
+
+[zrl=[baseurl]/help/hook/notifier_process]notifier_process[/zrl]
+ Called when the notifier is processing a message/event
[zrl=[baseurl]/help/hook/obj_verbs]obj_verbs[/zrl]
Called when creating the list of verbs available for profile "things".
@@ -445,6 +472,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/profile_tabs]profile_tabs[/zrl]
Called when generating the tabs for channel related pages (channel,profile,files,etc.)
+
+[zrl=[baseurl]/help/hook/queue_deliver]queue_deliver[/zrl]
+ Called when delivering a queued message
[zrl=[baseurl]/help/hook/register_account]register_account[/zrl]
Called when an account has been created
@@ -458,6 +488,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/reverse_magic_auth]reverse_magic_auth[/zrl]
Called before invoking reverse magic auth to send you to your own site to authenticate on this site
+[zrl=[baseurl]/help/hook/settings_account]settings_account[/zrl]
+ Called when generating the account settings form
+
[zrl=[baseurl]/help/hook/settings_form]settings_form[/zrl]
Called when generating the channel settings form
diff --git a/doc/plugins.bb b/doc/plugins.bb
index f96fb8dee..f2f0b04e8 100644
--- a/doc/plugins.bb
+++ b/doc/plugins.bb
@@ -264,6 +264,30 @@ we will create an argc/argv list for use by your module functions
3 whatever
[/code]
+[h3]Using class methods as hook handler functions[/h3]
+
+To register a hook using a class method as a callback, a couple of things need to be considered. The first is that the functions need to be declared static public so that they are available from all contexts, and they need to have a namespace attached because they can be called from within multiple namespaces. You can then register them as strings or arrays (using the PHP internal calling method).
+
+[code]
+<?php
+/*
+ * plugin info block goes here
+ */
+
+function myplugin_load() {
+ Zotlabs\Extend\Hook::register('hook_name','addon/myplugin/myplugin.php','\\Myplugin::foo');
+[b]or[/b]
+ Zotlabs\Extend\Hook::register('hook_name','addon/myplugin/myplugin.php',array('\\Myplugin','foo'));
+}
+
+class Myplugin {
+
+ public static function foo($params) {
+ // handler for 'hook_name'
+ }
+}
+[/code]
+
If you want to keep your plugin hidden from the siteinfo page, simply create a file called '.hidden' in your addon directory
[code]
touch addon/<addon name>/.hidden
diff --git a/doc/webpages.bb b/doc/webpages.bb
index 040ad0c5c..6b3a800cb 100644
--- a/doc/webpages.bb
+++ b/doc/webpages.bb
@@ -1,6 +1,6 @@
[b]Creating Web Pages[/b]
-Red enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section.
+Hubzilla enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section.
Once enabled, a new tab will appear on your channel page labelled &quot;Webpages&quot;. Clicking this link will take you to the webpage editor.
Pages will be accessible at mydomain/page/username/pagelinktitle
diff --git a/include/nav.php b/include/nav.php
index c59aaae37..70faec598 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -143,19 +143,17 @@ EOT;
if((App::$module != 'home') && (! (local_channel())))
$nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn');
-
if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel()))
$nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn');
- $help_url = z_root() . '/help?f=&cmd=' . App::$cmd;
-
if(! get_config('system','hide_help')) {
+ $help_url = z_root() . '/help?f=&cmd=' . App::$cmd;
$context_help = '';
$enable_context_help = ((intval(get_config('system','enable_context_help')) === 1 || get_config('system','enable_context_help') === false) ? true : false);
if($enable_context_help === true) {
require_once('include/help.php');
$context_help = load_context_help();
- //direct directly to /help if $context_help is empty - this can be removed once we have context help for all modules
+ //point directly to /help if $context_help is empty - this can be removed once we have context help for all modules
$enable_context_help = (($context_help) ? true : false);
}
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help);
@@ -166,7 +164,6 @@ EOT;
$nav['search'] = array('search', t('Search'), "", t('Search site @name, #tag, ?docs, content'));
-
$nav['directory'] = array('directory', t('Directory'), "", t('Channel Directory'),'directory_nav_btn');
@@ -240,16 +237,10 @@ $powered_by = '';
// $powered_by = '<strong>red<img class="smiley" src="' . z_root() . '/images/rm-16.png" alt="r#" />matrix</strong>';
- $tpl = get_markup_template('nav_header.tpl');
-
- App::$page['htmlhead'] .= replace_macros($tpl, array(
- '$enable_context_help' => $enable_context_help
- ));
-
$tpl = get_markup_template('nav.tpl');
App::$page['nav'] .= replace_macros($tpl, array(
- '$baseurl' => z_root(),
+ '$baseurl' => z_root(),
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
'$banner' => $banner,
@@ -260,7 +251,7 @@ $powered_by = '';
'$powered_by' => $powered_by,
'$help' => t('@name, #tag, ?doc, content'),
'$pleasewait' => t('Please wait...')
- ));
+ ));
call_hooks('page_header', App::$page['nav']);
}
diff --git a/include/plugin.php b/include/plugin.php
index 80e3ae20e..8dd67bb0c 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -282,10 +282,21 @@ function call_hooks($name, &$data = null) {
$a = 0;
if((is_array(App::$hooks)) && (array_key_exists($name, App::$hooks))) {
foreach(App::$hooks[$name] as $hook) {
+ $origfn = $hook[1];
if($hook[0])
@include_once($hook[0]);
+ if(preg_match('|^a:[0-9]+:{.*}$|s', $hook[1])) {
+ $hook[1] = unserialize($hook[1]);
+ }
+ elseif(strpos($hook[1],'::')) {
+ // We shouldn't need to do this, but it appears that PHP
+ // isn't able to directly execute a string variable with a class
+ // method in the manner we are attempting it, so we'll
+ // turn it into an array.
+ $hook[1] = explode('::',$hook[1]);
+ }
- if(function_exists($hook[1])) {
+ if(is_callable($hook[1])) {
$func = $hook[1];
if($hook[3])
$func($data);
@@ -295,7 +306,7 @@ function call_hooks($name, &$data = null) {
q("DELETE FROM hook WHERE hook = '%s' AND file = '%s' AND function = '%s'",
dbesc($name),
dbesc($hook[0]),
- dbesc($hook[1])
+ dbesc($origfn)
);
}
}
diff --git a/library/Smarty/NEW_FEATURES.txt b/library/Smarty/NEW_FEATURES.txt
index 595dc4d3c..1a51c71d9 100644
--- a/library/Smarty/NEW_FEATURES.txt
+++ b/library/Smarty/NEW_FEATURES.txt
@@ -21,17 +21,17 @@ Smarty 3.1.28
fetch() and display()
=====================
The fetch() and display() methods of the template object accept now optionally the same parameter
- as the corresponding Smarty methods to get tne content of another template.
+ as the corresponding Smarty methods to get the content of another template.
Example:
$template->display(); Does display template of template object
- $template->dispaly('foo.tpl'); Does display template 'foo.bar'
+ $template->display('foo.tpl'); Does display template 'foo.bar'
File: resource
==============
Multiple template_dir entries can now be selected by a comma separated list of indices.
The template_dir array is searched in the order of the indices. (Could be used to change the default search order)
Example:
- $smarty->display([1],[0]foo.bar');
+ $smarty->display('[1],[0]foo.bar');
Filter support
==============
@@ -130,4 +130,4 @@ Smarty 3.1.22
Smarty::DEBUG_INDIVIDUAL will create for each display() and fetch() call an individual debug window.
.
- \ No newline at end of file
+
diff --git a/library/Smarty/change_log.txt b/library/Smarty/change_log.txt
index cecda63d1..dadc5d17d 100644
--- a/library/Smarty/change_log.txt
+++ b/library/Smarty/change_log.txt
@@ -1,14 +1,50 @@
- ===== 3.1.28 ===== (13.12.2015)
+ ===== 3.1.29 ===== (21.12.2015)
+ 21.12.2015
+ - optimization improve speed of filetime checks on extends and extendsall resource
+
+ 20.12.2015
+ - bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123
+ - update compilation of Smarty special variables
+ - bugfix add addition check for OS type on normalizaition of file path https://github.com/smarty-php/smarty/issues/134
+ - bugfix the source uid of the extendsall resource must contain $template_dir settings https://github.com/smarty-php/smarty/issues/123
+
+ 19.12.2015
+ - bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138
+ - bugfix broken PHP 5.2 compatibility https://github.com/smarty-php/smarty/issues/139
+ - remove no longer used code
+ - improvement make sure that compiled and cache templates never can contain a trailing '?>?
+
+ 18.12.2015
+ - bugfix regression when modifier parameter was follow by math https://github.com/smarty-php/smarty/issues/132
+
+ 17.12.2015
+ - bugfix {$smarty.capture.nameFail} did lowercase capture name https://github.com/smarty-php/smarty/issues/135
+ - bugfix using {block append/prepend} on same block in multiple levels of inheritance templates could fail (forum topic 25827)
+ - bugfix text content consisting of just a single '0' like in {if true}0{/if} was suppressed (forum topic 25834)
+
+ 16.12.2015
+ - bugfix {foreach} did fail if from atrribute is a Generator class https://github.com/smarty-php/smarty/issues/128
+ - bugfix direct access $smarty->template_dir = 'foo'; should call Smarty::setTemplateDir() https://github.com/smarty-php/smarty/issues/121
+
+ 15.12.2015
+ - bugfix {$smarty.cookies.foo} did return the $_COOKIE array not the 'foo' value https://github.com/smarty-php/smarty/issues/122
+ - bugfix a call to clearAllCache() and other should clear all internal template object caches (forum topic 25828)
+
+ 14.12.2015
+ - bugfix {$smarty.config.foo} broken in 3.1.28 https://github.com/smarty-php/smarty/issues/120
+ - bugfix multiple calls of {section} with same name droped E_NOTICE error https://github.com/smarty-php/smarty/issues/118
+
+ ===== 3.1.28 ===== (13.12.2015)
13.12.2015
- bugfix {foreach} and {section} with uppercase characters in name attribute did not work (forum topic 25819)
- bugfix $smarty->debugging_ctrl = 'URL' did not work (forum topic 25811)
- bugfix Debug Console could display incorrect data when using subtemplates
09.12.2015
- - bugix Smarty did fail under PHP 7.0.0 with use_include_path = true;
+ - bugfix Smarty did fail under PHP 7.0.0 with use_include_path = true;
09.12.2015
- -bugfix {strip} should exclude some html tags from stripping, related to fix for https://github.com/smarty-php/smarty/issues/111
+ - bugfix {strip} should exclude some html tags from stripping, related to fix for https://github.com/smarty-php/smarty/issues/111
08.12.2015
- bugfix internal template function data got stored in wrong compiled file https://github.com/smarty-php/smarty/issues/114
diff --git a/library/Smarty/libs/Smarty.class.php b/library/Smarty/libs/Smarty.class.php
index 17457131c..a029f942e 100644
--- a/library/Smarty/libs/Smarty.class.php
+++ b/library/Smarty/libs/Smarty.class.php
@@ -27,7 +27,7 @@
* @author Uwe Tews
* @author Rodney Rehm
* @package Smarty
- * @version 3.1.28
+ * @version 3.1.29
*/
/**
@@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
- const SMARTY_VERSION = '3.1.28';
+ const SMARTY_VERSION = '3.1.29';
/**
* define variable scopes
@@ -677,15 +677,20 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* removed properties
*
- * @var array
+ * @var string[]
*/
private static $obsoleteProperties = array('resource_caching', 'template_resource_caching',
'direct_access_security', '_dir_perms', '_file_perms',
'plugin_search_order', 'inheritance_merge_compiled_includes');
- private static $accessMap = array('template_dir' => 'getTemplateDir', 'config_dir' => 'getConfigDir',
- 'plugins_dir' => 'getPluginsDir', 'compile_dir' => 'getCompileDir',
- 'cache_dir' => 'getCacheDir',);
+ /**
+ * List of private properties which will call getter/setter ona direct access
+ *
+ * @var array
+ */
+ private static $accessMap = array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir',
+ 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir',
+ 'cache_dir' => 'CacheDir',);
/**#@-*/
@@ -1173,7 +1178,7 @@ class Smarty extends Smarty_Internal_TemplateBase
$path = str_replace($nds, DS, $path);
}
- if ($realpath === true && $path[0] !== '/' && $path[1] !== ':') {
+ if ($realpath === true && (($path[0] !== '/' && DS == '/') || ($path[1] !== ':' && DS != '/'))) {
$path = getcwd() . DS . $path;
}
while ((strpos($path, '.' . DS) !== false) || (strpos($path, DS . DS) !== false)) {
@@ -1344,7 +1349,8 @@ class Smarty extends Smarty_Internal_TemplateBase
{
if (isset(self::$accessMap[$name])) {
- return $this->{self::$accessMap[$name]}();
+ $method = 'get' . self::$accessMap[$name];
+ return $this->{$method}();
} elseif (in_array($name, self::$obsoleteProperties)) {
return null;
} else {
@@ -1363,7 +1369,8 @@ class Smarty extends Smarty_Internal_TemplateBase
public function __set($name, $value)
{
if (isset(self::$accessMap[$name])) {
- $this->{self::$accessMap[$name]}($value);
+ $method = 'set' . self::$accessMap[$name];
+ $this->{$method}($value);
} elseif (in_array($name, self::$obsoleteProperties)) {
return;
} else {
diff --git a/library/Smarty/libs/sysplugins/smarty_cacheresource.php b/library/Smarty/libs/sysplugins/smarty_cacheresource.php
index 8cd2805a5..14ab62fd9 100644
--- a/library/Smarty/libs/sysplugins/smarty_cacheresource.php
+++ b/library/Smarty/libs/sysplugins/smarty_cacheresource.php
@@ -215,12 +215,9 @@ abstract class Smarty_CacheResource
*/
public function invalidLoadedCache(Smarty $smarty)
{
- if (isset($smarty->_cache['template_objects'])) {
- foreach ($smarty->_cache['template_objects'] as $key => $tpl) {
- if (isset($tpl->cached)) {
- unset ($smarty->_cache['template_objects'][$key]);
- }
- }
+ $smarty->_cache['isCached'] = array();
+ if (isset($smarty->ext->_subtemplate)) {
+ $smarty->ext->_subtemplate->tplObjects = array();
}
}
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php
index 52a541ebd..ab1fc6e00 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php
@@ -142,7 +142,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
}
$compiler->suppressNocacheProcessing = true;
$compiler->has_code = true;
- $output = "<?php \n\$_smarty_tpl->ext->_inheritance->processBlock(\$_smarty_tpl, 3, {$compiler->_cache['blockName'][$compiler->_cache['blockNesting']]}, null, \$_blockParentStack);\n?>\n";
+ $output = "<?php \n\$_smarty_tpl->ext->_inheritance->processBlock(\$_smarty_tpl, 4, {$compiler->_cache['blockName'][$compiler->_cache['blockNesting']]}, null, \$_blockParentStack);\n?>\n";
return $output;
}
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php
index 95c75a4b1..be45f3e94 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php
@@ -69,13 +69,12 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase
*/
public static function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
- // make all lower case
- $parameter = array_map('strtolower', $parameter);
- $tag = trim($parameter[0], '"\'');
- if (!isset($parameter[1]) || false === $name = $compiler->getId($parameter[1])) {
+ $tag = strtolower(trim($parameter[ 0 ], '"\''));
+ $name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : false;
+ if (!$name) {
$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true);
}
- return "isset(\$_smarty_tpl->_cache['__smarty_capture']['{$name}']) ? \$_smarty_tpl->_cache['__smarty_capture']['{$name}'] : null";
+ return "(isset(\$_smarty_tpl->_cache['__smarty_capture']['{$name}']) ? \$_smarty_tpl->_cache['__smarty_capture']['{$name}'] : null)";
}
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php
index 876ed026a..178a0a52c 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php
@@ -59,7 +59,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
*
* @var array
*/
- public static $nameProperties = array('first', 'last', 'index', 'iteration', 'show', 'total');
+ public $nameProperties = array('first', 'last', 'index', 'iteration', 'show', 'total');
/**
* Valid properties of $item@xxx variable
@@ -183,8 +183,10 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
foreach ($saveVars as $k => $code) {
$output .= "{$local}{$k} = {$code}\n";
}
+ if (isset($itemAttr['show']) || isset($itemAttr['total']) || isset($namedAttr['total']) || isset($namedAttr['show']) || isset($itemAttr['last']) || isset($namedAttr['last'])) {
+ $output .= "{$local}total = \$_smarty_tpl->smarty->ext->_foreach->count(\$_from);\n";
+ }
$output .= "{$itemVar} = new Smarty_Variable();\n";
- $output .= "{$local}total = \$_smarty_tpl->smarty->ext->_foreach->count(\$_from);\n";
if (isset($itemAttr['show'])) {
$output .= "{$itemVar}->show = ({$local}total > 0);\n";
}
@@ -210,7 +212,6 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
$output .= "{$foreachVar} = new Smarty_Variable({$_vars});\n";
}
}
- $output .= "if ({$local}total) {\n";
if (isset($attributes['key'])) {
$output .= "\$_smarty_tpl->tpl_vars['{$key}'] = new Smarty_Variable();\n";
}
@@ -226,7 +227,9 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
if ($needIteration) {
$output .= "{$local}iteration=0;\n";
}
+ $output .= "{$itemVar}->_loop = false;\n";
$output .= "foreach (\$_from as {$keyTerm}{$itemVar}->value) {\n";
+ $output .= "{$itemVar}->_loop = true;\n";
if (isset($attributes['key']) && isset($itemAttr['key'])) {
$output .= "\$_smarty_tpl->tpl_vars['{$key}']->value = {$itemVar}->key;\n";
}
@@ -296,7 +299,7 @@ class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase
$output = "<?php\n";
$output .= "{$itemVar} = {$local}saved_local_item;\n";
$output .= "}\n";
- $output .= "} else {\n?>";
+ $output .= "if (!{$itemVar}->_loop) {\n?>";
return $output;
}
}
@@ -332,7 +335,6 @@ class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase
if ($restore) {
$output .= "{$itemVar} = {$local}saved_local_item;\n";
- $output .= "}\n";
}
$output .= "}\n";
foreach ($restoreVars as $restore) {
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
index 50c25bdb6..16f233359 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
@@ -50,7 +50,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
*
* @var array
*/
- public static $nameProperties = array();
+ public $nameProperties = array();
/**
* {section} tag has no item properties
@@ -112,8 +112,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
if ($named) {
$this->resultOffsets['named'] = $this->startOffset + 3;
$this->propertyPreg .= "([\$]smarty[.]{$this->tagName}[.]{$attributes['name']}[.](";
- $className = get_class($this);
- $properties = $className::$nameProperties;
+ $properties = $this->nameProperties;
} else {
$this->resultOffsets['item'] = $this->startOffset + 3;
$this->propertyPreg .= "([\$]{$attributes['item']}[@](";
@@ -204,17 +203,15 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
* @return string compiled code
* @throws \SmartyCompilerException
*/
- public static function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
$tag = strtolower(trim($parameter[ 0 ], '"\''));
$name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : false;
if (!$name) {
$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true);
}
- /* @var Smarty_Internal_Compile_Foreach|Smarty_Internal_Compile_Section $className */
- $className = 'Smarty_Internal_Compile_' . ucfirst($tag);
$property = isset($parameter[ 2 ]) ? strtolower($compiler->getId($parameter[ 2 ])) : false;
- if (!$property || !in_array($property, $className::$nameProperties)) {
+ if (!$property || !in_array($property, $this->nameProperties)) {
$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} property attribute", null, true);
}
$tagVar = "'__smarty_{$tag}_{$name}'";
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
index 5a8c54faa..b83e824af 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
@@ -29,7 +29,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
$_index = preg_split("/\]\[/", substr($parameter, 1, strlen($parameter) - 2));
- $variable = strtolower($compiler->getId($_index[0]));
+ $variable = strtolower($compiler->getId($_index[ 0 ]));
if ($variable === false) {
$compiler->trigger_template_error("special \$Smarty variable name index can not be variable", null, true);
}
@@ -39,7 +39,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
switch ($variable) {
case 'foreach':
case 'section':
- return Smarty_Internal_Compile_Private_ForeachSection::compileSpecialVariable(array(), $compiler, $_index);
+ if (!isset($compiler->_tag_objects[ $variable ])) {
+ $class = 'Smarty_Internal_Compile_' . ucfirst($variable);
+ $compiler->_tag_objects[ $variable ] = new $class;
+ }
+ return $compiler->_tag_objects[ $variable ]->compileSpecialVariable(array(), $compiler, $_index);
case 'capture':
if (class_exists('Smarty_Internal_Compile_Capture')) {
return Smarty_Internal_Compile_Capture::compileSpecialVariable(array(), $compiler, $_index);
@@ -54,7 +58,8 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
$compiler->trigger_template_error("(secure mode) super globals not permitted");
break;
}
- return '$_COOKIE';
+ $compiled_ref = '$_COOKIE';
+ break;
case 'get':
case 'post':
case 'env':
@@ -80,9 +85,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
return 'dirname($_smarty_tpl->source->filepath)';
case 'version':
- $_version = Smarty::SMARTY_VERSION;
-
- return "'$_version'";
+ return "Smarty::SMARTY_VERSION";
case 'const':
if (isset($compiler->smarty->security_policy) &&
@@ -91,33 +94,27 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
$compiler->trigger_template_error("(secure mode) constants not permitted");
break;
}
- if (strpos($_index[1], '$') === false && strpos($_index[1], '\'') === false) {
+ if (strpos($_index[ 1 ], '$') === false && strpos($_index[ 1 ], '\'') === false) {
return "@constant('{$_index[1]}')";
} else {
return "@constant({$_index[1]})";
}
case 'config':
- if (isset($_index[2])) {
- return "(is_array(\$tmp = \$_smarty_tpl->smarty->ext->_config->_getConfigVariable(\$_smarty_tpl, $_index[1])) ? \$tmp[$_index[2]] : null)";
+ if (isset($_index[ 2 ])) {
+ return "(is_array(\$tmp = \$_smarty_tpl->smarty->ext->configload->_getConfigVariable(\$_smarty_tpl, $_index[1])) ? \$tmp[$_index[2]] : null)";
} else {
- return "\$_smarty_tpl->smarty->ext->_config->_getConfigVariable(\$_smarty_tpl, $_index[1])";
+ return "\$_smarty_tpl->smarty->ext->configload->_getConfigVariable(\$_smarty_tpl, $_index[1])";
}
case 'ldelim':
- $_ldelim = $compiler->smarty->left_delimiter;
-
- return "'$_ldelim'";
-
+ return "\$_smarty_tpl->smarty->left_delimiter";
case 'rdelim':
- $_rdelim = $compiler->smarty->right_delimiter;
-
- return "'$_rdelim'";
-
+ return "\$_smarty_tpl->smarty->right_delimiter";
default:
- $compiler->trigger_template_error('$smarty.' . trim($_index[0], "'") . ' is invalid');
+ $compiler->trigger_template_error('$smarty.' . trim($_index[ 0 ], "'") . ' is not defined');
break;
}
- if (isset($_index[1])) {
+ if (isset($_index[ 1 ])) {
array_shift($_index);
foreach ($_index as $_ind) {
$compiled_ref = $compiled_ref . "[$_ind]";
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php
index 079903c2b..40b297a64 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php
@@ -59,7 +59,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
*
* @var array
*/
- public static $nameProperties = array('first', 'last', 'index', 'iteration', 'show', 'total', 'rownum',
+ public $nameProperties = array('first', 'last', 'index', 'iteration', 'show', 'total', 'rownum',
'index_prev', 'index_next');
/**
@@ -103,7 +103,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
// maybe nocache because of nocache variables
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
- $initLocal = array('saved' => "isset(\$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}']) ? \$_smarty_tpl->tpl_vars['__section_{$attributes['name']}'] : false",);
+ $initLocal = array('saved' => "isset(\$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}']) ? \$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}'] : false",);
$initNamedProperty = array();
$initFor = array();
$incFor = array();
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_data.php b/library/Smarty/libs/sysplugins/smarty_internal_data.php
index 53f351b41..bba95d303 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_data.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_data.php
@@ -188,6 +188,21 @@ class Smarty_Internal_Data
}
/**
+ * gets the object of a Smarty variable
+ *
+ * @param string $variable the name of the Smarty variable
+ * @param Smarty_Internal_Data $_ptr optional pointer to data object
+ * @param boolean $searchParents search also in parent data
+ * @param bool $error_enable
+ *
+ * @return Smarty_Variable|Smarty_Undefined_Variable the object of the variable
+ * @deprecated since 3.1.28 please use Smarty_Internal_Data::getTemplateVars() instead.
+ */
+ public function getVariable($variable = null, Smarty_Internal_Data $_ptr = null, $searchParents = true, $error_enable = true){
+ return $this->ext->getTemplateVars->_getVariable($this, $variable, $_ptr, $searchParents, $error_enable);
+ }
+
+ /**
* Follow the parent chain an merge template and config variables
*
* @param \Smarty_Internal_Data|null $data
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_extension_clear.php b/library/Smarty/libs/sysplugins/smarty_internal_extension_clear.php
index c595214d8..00edc5abf 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_extension_clear.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_extension_clear.php
@@ -114,14 +114,6 @@ class Smarty_Internal_Extension_Clear
}
}
}
- // remove from template cache
- if (isset($smarty->_cache['template_objects'])) {
- foreach ($smarty->_cache['template_objects'] as $key => $tpl) {
- if (isset($tpl->cached) && $tpl->cached->filepath == (string) $_file) {
- unset($smarty->_cache['template_objects'][$key]);
- }
- }
- }
$_count += @unlink((string) $_file) ? 1 : 0;
if (function_exists('opcache_invalidate')) {
opcache_invalidate((string) $_file);
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_clearallcache.php b/library/Smarty/libs/sysplugins/smarty_internal_method_clearallcache.php
index 1fe37892e..6ae0af15f 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_method_clearallcache.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_method_clearallcache.php
@@ -34,10 +34,7 @@ class Smarty_Internal_Method_ClearAllCache
{
// load cache resource and call clearAll
$_cache_resource = Smarty_CacheResource::load($smarty, $type);
- if ($smarty->caching_type != 'file') {
- $_cache_resource->invalidLoadedCache($smarty);
- }
-
+ $_cache_resource->invalidLoadedCache($smarty);
return $_cache_resource->clearAll($smarty, $exp_time);
}
} \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_clearcache.php b/library/Smarty/libs/sysplugins/smarty_internal_method_clearcache.php
index a923b3ae1..063c57cde 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_method_clearcache.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_method_clearcache.php
@@ -37,10 +37,7 @@ class Smarty_Internal_Method_ClearCache
{
// load cache resource and call clear
$_cache_resource = Smarty_CacheResource::load($smarty, $type);
- if ($smarty->caching_type != 'file' && !isset($template_name)) {
- $_cache_resource->invalidLoadedCache($smarty);
- }
-
+ $_cache_resource->invalidLoadedCache($smarty);
return $_cache_resource->clear($smarty, $template_name, $cache_id, $compile_id, $exp_time);
}
} \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
index ae1003238..cce8553f5 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
@@ -107,13 +107,6 @@ class Smarty_Internal_Method_ClearCompiledTemplate
}
if ($unlink && @unlink($_filepath)) {
- if (isset($smarty->_cache['template_objects'])) {
- foreach ($smarty->_cache['template_objects'] as $key => $tpl) {
- if (isset($tpl->compiled) && $tpl->compiled->filepath == $_filepath) {
- unset($smarty->_cache['template_objects'][$key]);
- }
- }
- }
$_count ++;
if (function_exists('opcache_invalidate')) {
opcache_invalidate($_filepath);
@@ -121,11 +114,10 @@ class Smarty_Internal_Method_ClearCompiledTemplate
}
}
}
- // clear compiled cache
- if (!isset($resource_name) && isset($smarty->_cache['source_objects'])) {
- foreach ($smarty->_cache['source_objects'] as $source) {
- $source->compileds = array();
- }
+ // clear template objects cache
+ $smarty->_cache['isCached'] = array();
+ if (isset($smarty->ext->_subtemplate)) {
+ $smarty->ext->_subtemplate->tplObjects = array();
}
return $_count;
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_configload.php b/library/Smarty/libs/sysplugins/smarty_internal_method_configload.php
index ec023ec8f..7b99e35c6 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_method_configload.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_method_configload.php
@@ -162,7 +162,7 @@ class Smarty_Internal_Method_ConfigLoad
*
* @return mixed the value of the config variable
*/
- public function _getConfigVariable(\Smarty_Internal_Template $tpl, $varName, $errorEnable = true)
+ public function _getConfigVariable(Smarty_Internal_Template $tpl, $varName, $errorEnable = true)
{
$_ptr = $tpl;
while ($_ptr !== null) {
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php
index 0c0802d62..3d687dca8 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php
@@ -44,7 +44,7 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource
if ($_s->type == 'php') {
throw new SmartyException("Resource type {$_s->type} cannot be used with the extends resource type");
}
- $sources[$_s->uid] = $_s;
+ $sources[ $_s->uid ] = $_s;
$uid .= $_s->filepath;
if ($_template) {
$exists = $exists && $_s->exists;
@@ -110,4 +110,15 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource
{
return str_replace(':', '.', basename($source->filepath));
}
+
+ /*
+ * Disable timestamp checks for extends resource.
+ * The individual source components will be checked.
+ *
+ * @return bool
+ */
+ public function checkTimestamps()
+ {
+ return false;
+ }
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_codeframe.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_codeframe.php
index 21e6e5221..ce6749770 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_codeframe.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_codeframe.php
@@ -89,6 +89,6 @@ class Smarty_Internal_Runtime_CodeFrame
$output .= $functions;
$output .= "<?php }\n";
// remove unneeded PHP tags
- return preg_replace('/\s*\?>[\n]?<\?php\s*/', "\n", $output);
+ return preg_replace(array('/\s*\?>[\n]?<\?php\s*/', '/\?>\s*$/'), array("\n", ''), $output);
}
} \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_foreach.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_foreach.php
index 87bb0cf4a..689636adb 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_foreach.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_foreach.php
@@ -27,6 +27,9 @@ class Smarty_Internal_Runtime_Foreach
// thus rewind() and valid() methods may not be present
return iterator_count($value->getIterator());
} elseif ($value instanceof Iterator) {
+ if ($value instanceof Generator) {
+ return 1;
+ }
return iterator_count($value);
} elseif ($value instanceof PDOStatement) {
return $value->rowCount();
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php
index ed21281d0..08a560606 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php
@@ -127,8 +127,11 @@ class Smarty_Internal_Runtime_Inheritance
* - search in inheritance template hierarchy for child blocks
* if found call it, otherwise ignore
*
- * $type 3 = {$smarty.block.parent}:
- * - get block id from parent stack and call parent block
+ * $type 3 = {block append} {block prepend}:
+ * - call parent block
+ *
+ * $type 4 = {$smarty.block.parent}:
+ * - call parent block
*
* @param \Smarty_Internal_Template $tpl template object of caller
* @param int $type call type see above
@@ -140,17 +143,23 @@ class Smarty_Internal_Runtime_Inheritance
*/
public function processBlock(Smarty_Internal_Template $tpl, $type = 0, $name, $block, $callStack = array())
{
- if (!isset($this->blockParameter[$name])) {
- $this->blockParameter[$name] = array();
+ if (!isset($this->blockParameter[ $name ])) {
+ $this->blockParameter[ $name ] = array();
}
if ($this->state == 1) {
- $block[2] = count($this->blockParameter[$name]);
- $block[3] = $this->tplIndex;
- $this->blockParameter[$name][] = $block;
+ $block[ 2 ] = count($this->blockParameter[ $name ]);
+ $block[ 3 ] = $this->tplIndex;
+ $this->blockParameter[ $name ][] = $block;
return;
}
if ($type == 3) {
if (!empty($callStack)) {
+ $block = array_shift($callStack);
+ } else {
+ return;
+ }
+ } elseif ($type == 4) {
+ if (!empty($callStack)) {
array_shift($callStack);
if (empty($callStack)) {
throw new SmartyException("inheritance: tag {\$smarty.block.parent} used in parent template block '{$name}'");
@@ -160,23 +169,23 @@ class Smarty_Internal_Runtime_Inheritance
return;
}
} else {
- $blockParameter = &$this->blockParameter[$name];
+ $index = 0;
+ $blockParameter = &$this->blockParameter[ $name ];
if ($type == 0) {
- $index = $block[2] = count($blockParameter);
- $block[3] = $this->tplIndex;
+ $index = $block[ 2 ] = count($blockParameter);
+ $block[ 3 ] = $this->tplIndex;
$callStack = array(&$block);
} elseif ($type == 1) {
- $block[3] = $callStack[0][3];
- $index = 0;
+ $block[ 3 ] = $callStack[ 0 ][ 3 ];
for ($i = 0; $i < count($blockParameter); $i ++) {
- if ($blockParameter[$i][3] <= $block[3]) {
- $index = $blockParameter[$i][2];
+ if ($blockParameter[ $i ][ 3 ] <= $block[ 3 ]) {
+ $index = $blockParameter[ $i ][ 2 ];
}
}
- $block[2] = $index;
+ $block[ 2 ] = $index;
$callStack = array(&$block);
- } else {
- $index = $callStack[0][2];
+ } elseif ($type == 2) {
+ $index = $callStack[ 0 ][ 2 ];
if ($index == 0) {
return;
}
@@ -184,29 +193,40 @@ class Smarty_Internal_Runtime_Inheritance
}
$index --;
// find lowest level child block
- while ($index >= 0 && ($type || !$block[1])) {
- $block = &$blockParameter[$index];
+ while ($index >= 0 && ($type || !$block[ 1 ])) {
+ $block = &$blockParameter[ $index ];
array_unshift($callStack, $block);
- if ($block[1]) {
+ if ($block[ 1 ]) {
break;
}
$index --;
}
- if (isset($block['hide']) && $index <= 0) {
+ if (isset($block[ 'hide' ]) && $index <= 0) {
return;
}
}
$this->blockNesting ++;
- if (isset($block['append'])) {
- $this->processBlock($tpl, 3, $name, null, $callStack);
+ // {block append} ?
+ if (isset($block[ 'append' ])) {
+ $appendStack = $callStack;
+ if ($type == 0) {
+ array_shift($appendStack);
+ }
+ $this->processBlock($tpl, 3, $name, null, $appendStack);
}
+ // call block of current stack level
if (isset($block[6])) {
$block[6]($tpl, $callStack);
} else {
$block[0]($tpl, $callStack);
}
- if (isset($block['prepend'])) {
- $this->processBlock($tpl, 3, $name, null, $callStack);
+ // {block prepend} ?
+ if (isset($block[ 'prepend' ])) {
+ $prependStack = $callStack;
+ if ($type == 0) {
+ array_shift($prependStack);
+ }
+ $this->processBlock($tpl, 3, $name, null, $prependStack);
}
$this->blockNesting --;
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_tplfunction.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_tplfunction.php
index cc529c633..634ed5dc6 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_tplfunction.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_tplfunction.php
@@ -20,7 +20,7 @@ class Smarty_Internal_Runtime_TplFunction
*
* @throws \SmartyException
*/
- public function callTemplateFunction(\Smarty_Internal_Template $tpl, $name, $params, $nocache)
+ public function callTemplateFunction(Smarty_Internal_Template $tpl, $name, $params, $nocache)
{
if (isset($tpl->tpl_function[$name])) {
if (!$tpl->caching || ($tpl->caching && $nocache)) {
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatecache.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatecache.php
index 73de954f3..a895a3070 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatecache.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatecache.php
@@ -73,7 +73,7 @@ class Smarty_Internal_Runtime_UpdateCache
/**
* Cache was invalid , so render from compiled and write to cache
- *
+ *
* @param \Smarty_Template_Cached $cached
* @param \Smarty_Internal_Template $_template
* @param $no_output_filter
@@ -129,20 +129,6 @@ class Smarty_Internal_Runtime_UpdateCache
return false;
}
$content = $_template->smarty->ext->_codeFrame->create($_template, $content, '', true);
- if (!empty($_template->cached->tpl_function)) {
- foreach ($_template->cached->tpl_function as $funcParam) {
- if (is_file($funcParam['compiled_filepath'])) {
- // read compiled file
- $code = file_get_contents($funcParam['compiled_filepath']);
- // grab template function
- if (preg_match("/\/\* {$funcParam['call_name']} \*\/([\S\s]*?)\/\*\/ {$funcParam['call_name']} \*\//",
- $code, $match)) {
- unset($code);
- $content .= "<?php " . $match[0] . "?>\n";
- }
- }
- }
- }
return $this->write($cached, $_template, $content);
}
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php
index 3d80c859a..5a125a4a7 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php
@@ -17,7 +17,7 @@ class Smarty_Internal_Runtime_UpdateScope
* @param string $varName variable name
* @param int $scope scope to which bubble up variable value
*/
- public function updateScope(\Smarty_Internal_Template $tpl, $varName, $scope = Smarty::SCOPE_LOCAL)
+ public function updateScope(Smarty_Internal_Template $tpl, $varName, $scope = Smarty::SCOPE_LOCAL)
{
if (!$scope && !$tpl->scope) {
return;
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_validatecompiled.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_validatecompiled.php
index 6624eb0bf..7defd6c92 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_validatecompiled.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_validatecompiled.php
@@ -43,8 +43,13 @@ class Smarty_Internal_Runtime_ValidateCompiled
} elseif ($_file_to_check[2] == 'string') {
continue;
} else {
- $source = Smarty_Template_Source::load(null, $tpl->smarty, $_file_to_check[0]);
- $mtime = $source->getTimeStamp();
+ $handler = Smarty_Resource::load($tpl->smarty, $_file_to_check[2]);
+ if ($handler->checkTimestamps()) {
+ $source = Smarty_Template_Source::load($tpl, $tpl->smarty, $_file_to_check[ 0 ]);
+ $mtime = $source->getTimeStamp();
+ } else {
+ continue;
+ }
}
if (!$mtime || $mtime > $_file_to_check[1]) {
$is_valid = false;
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_var.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_var.php
index fe4f94d91..8e09108fe 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_var.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_runtime_var.php
@@ -17,7 +17,7 @@ class Smarty_Internal_Runtime_Var
* @param string $varName template variable name
* @param bool $nocache cache mode of variable
*/
- public function createLocalArrayVariable(\Smarty_Internal_Template $tpl, $varName, $nocache = false)
+ public function createLocalArrayVariable(Smarty_Internal_Template $tpl, $varName, $nocache = false)
{
if (!isset($tpl->tpl_vars[$varName])) {
$tpl->tpl_vars[$varName] = new Smarty_Variable(array(), $nocache);
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php b/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
index 04584a40f..6c3ea5f5d 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
@@ -328,7 +328,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
$this->compileTemplateSource($template, $nocache,
$parent_compiler),
$this->postFilter($this->blockOrFunctionCode) .
- join('', $this->mergedSubTemplatesCode), false, $this);
+ join('', $this->mergedSubTemplatesCode), false,
+ $this);
return $_compiled_code;
}
@@ -374,7 +375,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
$this->has_variable_string = false;
$this->prefix_code = array();
// add file dependency
- $this->parent_compiler->template->compiled->file_dependency[$this->template->source->uid] =
+ $this->parent_compiler->template->compiled->file_dependency[ $this->template->source->uid ] =
array($this->template->source->filepath, $this->template->source->getTimeStamp(),
$this->template->source->type);
$this->smarty->_current_file = $this->template->source->filepath;
@@ -423,7 +424,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
{
// run post filter if on code
if (!empty($code) &&
- (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post']))
+ (isset($this->smarty->autoload_filters[ 'post' ]) || isset($this->smarty->registered_filters[ 'post' ]))
) {
return $this->smarty->ext->_filterHandler->runFilter('post', $code, $this->template);
} else {
@@ -443,7 +444,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
{
// run pre filter if required
if ($_content != '' &&
- ((isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])))
+ ((isset($this->smarty->autoload_filters[ 'pre' ]) || isset($this->smarty->registered_filters[ 'pre' ])))
) {
return $this->smarty->ext->_filterHandler->runFilter('pre', $_content, $this->template);
} else {
@@ -496,8 +497,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
$this->has_code = true;
$this->has_output = false;
// log tag/attributes
- if (isset($this->smarty->_cache['get_used_tags'])) {
- $this->template->_cache['used_tags'][] = array($tag, $args);
+ if (isset($this->smarty->_cache[ 'get_used_tags' ])) {
+ $this->template->_cache[ 'used_tags' ][] = array($tag, $args);
}
// check nocache option flag
if (in_array("'nocache'", $args) || in_array(array('nocache' => 'true'), $args) ||
@@ -507,9 +508,9 @@ abstract class Smarty_Internal_TemplateCompilerBase
}
// compile the smarty tag (required compile classes to compile the tag are auto loaded)
if (($_output = $this->callTagCompiler($tag, $args, $parameter)) === false) {
- if (isset($this->parent_compiler->template->tpl_function[$tag])) {
+ if (isset($this->parent_compiler->template->tpl_function[ $tag ])) {
// template defined by {template} tag
- $args['_attr']['name'] = "'" . $tag . "'";
+ $args[ '_attr' ][ 'name' ] = "'" . $tag . "'";
$_output = $this->callTagCompiler('call', $args, $parameter);
}
}
@@ -529,8 +530,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
return null;
} else {
// map_named attributes
- if (isset($args['_attr'])) {
- foreach ($args['_attr'] as $key => $attribute) {
+ if (isset($args[ '_attr' ])) {
+ foreach ($args[ '_attr' ] as $key => $attribute) {
if (is_array($attribute)) {
$args = array_merge($args, $attribute);
}
@@ -539,14 +540,14 @@ abstract class Smarty_Internal_TemplateCompilerBase
// not an internal compiler tag
if (strlen($tag) < 6 || substr($tag, - 5) != 'close') {
// check if tag is a registered object
- if (isset($this->smarty->registered_objects[$tag]) && isset($parameter['object_method'])) {
- $method = $parameter['object_method'];
- if (!in_array($method, $this->smarty->registered_objects[$tag][3]) &&
- (empty($this->smarty->registered_objects[$tag][1]) ||
- in_array($method, $this->smarty->registered_objects[$tag][1]))
+ if (isset($this->smarty->registered_objects[ $tag ]) && isset($parameter[ 'object_method' ])) {
+ $method = $parameter[ 'object_method' ];
+ if (!in_array($method, $this->smarty->registered_objects[ $tag ][ 3 ]) &&
+ (empty($this->smarty->registered_objects[ $tag ][ 1 ]) ||
+ in_array($method, $this->smarty->registered_objects[ $tag ][ 1 ]))
) {
return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $method);
- } elseif (in_array($method, $this->smarty->registered_objects[$tag][3])) {
+ } elseif (in_array($method, $this->smarty->registered_objects[ $tag ][ 3 ])) {
return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag,
$method);
} else {
@@ -558,7 +559,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
// check if tag is registered
foreach (array(Smarty::PLUGIN_COMPILER, Smarty::PLUGIN_FUNCTION, Smarty::PLUGIN_BLOCK) as $plugin_type)
{
- if (isset($this->smarty->registered_plugins[$plugin_type][$tag])) {
+ if (isset($this->smarty->registered_plugins[ $plugin_type ][ $tag ])) {
// if compiler function plugin call it now
if ($plugin_type == Smarty::PLUGIN_COMPILER) {
$new_args = array();
@@ -566,18 +567,18 @@ abstract class Smarty_Internal_TemplateCompilerBase
if (is_array($mixed)) {
$new_args = array_merge($new_args, $mixed);
} else {
- $new_args[$key] = $mixed;
+ $new_args[ $key ] = $mixed;
}
}
- if (!$this->smarty->registered_plugins[$plugin_type][$tag][1]) {
+ if (!$this->smarty->registered_plugins[ $plugin_type ][ $tag ][ 1 ]) {
$this->tag_nocache = true;
}
- $function = $this->smarty->registered_plugins[$plugin_type][$tag][0];
+ $function = $this->smarty->registered_plugins[ $plugin_type ][ $tag ][ 0 ];
if (!is_array($function)) {
return $function($new_args, $this);
- } elseif (is_object($function[0])) {
- return $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->{$function[1]}($new_args,
- $this);
+ } elseif (is_object($function[ 0 ])) {
+ return $this->smarty->registered_plugins[ $plugin_type ][ $tag ][ 0 ][ 0 ]->{$function[ 1 ]}($new_args,
+ $this);
} else {
return call_user_func_array($function, array($new_args, $this));
}
@@ -604,7 +605,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
if (is_array($mixed)) {
$new_args = array_merge($new_args, $mixed);
} else {
- $new_args[$key] = $mixed;
+ $new_args[ $key ] = $mixed;
}
}
@@ -632,7 +633,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
$found = false;
// look for already resolved tags
foreach ($this->plugin_search_order as $plugin_type) {
- if (isset($this->default_handler_plugins[$plugin_type][$tag])) {
+ if (isset($this->default_handler_plugins[ $plugin_type ][ $tag ])) {
$found = true;
break;
}
@@ -653,12 +654,12 @@ abstract class Smarty_Internal_TemplateCompilerBase
foreach ($args as $mixed) {
$new_args = array_merge($new_args, $mixed);
}
- $function = $this->default_handler_plugins[$plugin_type][$tag][0];
+ $function = $this->default_handler_plugins[ $plugin_type ][ $tag ][ 0 ];
if (!is_array($function)) {
return $function($new_args, $this);
- } elseif (is_object($function[0])) {
- return $this->default_handler_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args,
- $this);
+ } elseif (is_object($function[ 0 ])) {
+ return $this->default_handler_plugins[ $plugin_type ][ $tag ][ 0 ][ 0 ]->$function[ 1 ]($new_args,
+ $this);
} else {
return call_user_func_array($function, array($new_args, $this));
}
@@ -672,9 +673,9 @@ abstract class Smarty_Internal_TemplateCompilerBase
// compile closing tag of block function
$base_tag = substr($tag, 0, - 5);
// check if closing tag is a registered object
- if (isset($this->smarty->registered_objects[$base_tag]) && isset($parameter['object_method'])) {
- $method = $parameter['object_method'];
- if (in_array($method, $this->smarty->registered_objects[$base_tag][3])) {
+ if (isset($this->smarty->registered_objects[ $base_tag ]) && isset($parameter[ 'object_method' ])) {
+ $method = $parameter[ 'object_method' ];
+ if (in_array($method, $this->smarty->registered_objects[ $base_tag ][ 3 ])) {
return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag,
$method);
} else {
@@ -684,13 +685,13 @@ abstract class Smarty_Internal_TemplateCompilerBase
}
}
// registered block tag ?
- if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag]) ||
- isset($this->default_handler_plugins[Smarty::PLUGIN_BLOCK][$base_tag])
+ if (isset($this->smarty->registered_plugins[ Smarty::PLUGIN_BLOCK ][ $base_tag ]) ||
+ isset($this->default_handler_plugins[ Smarty::PLUGIN_BLOCK ][ $base_tag ])
) {
return $this->callTagCompiler('private_registered_block', $args, $parameter, $tag);
}
// registered function tag ?
- if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
+ if (isset($this->smarty->registered_plugins[ Smarty::PLUGIN_FUNCTION ][ $tag ])) {
return $this->callTagCompiler('private_registered_function', $args, $parameter, $tag);
}
// block plugin?
@@ -706,18 +707,18 @@ abstract class Smarty_Internal_TemplateCompilerBase
}
}
// registered compiler plugin ?
- if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag])) {
+ if (isset($this->smarty->registered_plugins[ Smarty::PLUGIN_COMPILER ][ $tag ])) {
// if compiler function plugin call it now
$args = array();
- if (!$this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][1]) {
+ if (!$this->smarty->registered_plugins[ Smarty::PLUGIN_COMPILER ][ $tag ][ 1 ]) {
$this->tag_nocache = true;
}
- $function = $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0];
+ $function = $this->smarty->registered_plugins[ Smarty::PLUGIN_COMPILER ][ $tag ][ 0 ];
if (!is_array($function)) {
return $function($args, $this);
- } elseif (is_object($function[0])) {
- return $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0][0]->$function[1]($args,
- $this);
+ } elseif (is_object($function[ 0 ])) {
+ return $this->smarty->registered_plugins[ Smarty::PLUGIN_COMPILER ][ $tag ][ 0 ][ 0 ]->$function[ 1 ]($args,
+ $this);
} else {
return call_user_func_array($function, array($args, $this));
}
@@ -783,58 +784,57 @@ abstract class Smarty_Internal_TemplateCompilerBase
*/
public function processText($text)
{
- $store = array();
- $_store = 0;
- $_offset = 0;
- if ($this->parser->strip) {
- if (strpos($text, '<') !== false) {
- // capture html elements not to be messed with
- $_offset = 0;
- if (preg_match_all('#(<script[^>]*>.*?</script[^>]*>)|(<textarea[^>]*>.*?</textarea[^>]*>)|(<pre[^>]*>.*?</pre[^>]*>)#is',
- $text, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
- foreach ($matches as $match) {
- $store[] = $match[ 0 ][ 0 ];
- $_length = strlen($match[ 0 ][ 0 ]);
- $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
- $text = substr_replace($text, $replace, $match[ 0 ][ 1 ] - $_offset, $_length);
-
- $_offset += $_length - strlen($replace);
- $_store ++;
+ if ((string) $text != '') {
+ $store = array();
+ $_store = 0;
+ $_offset = 0;
+ if ($this->parser->strip) {
+ if (strpos($text, '<') !== false) {
+ // capture html elements not to be messed with
+ $_offset = 0;
+ if (preg_match_all('#(<script[^>]*>.*?</script[^>]*>)|(<textarea[^>]*>.*?</textarea[^>]*>)|(<pre[^>]*>.*?</pre[^>]*>)#is',
+ $text, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $store[] = $match[ 0 ][ 0 ];
+ $_length = strlen($match[ 0 ][ 0 ]);
+ $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
+ $text = substr_replace($text, $replace, $match[ 0 ][ 1 ] - $_offset, $_length);
+
+ $_offset += $_length - strlen($replace);
+ $_store ++;
+ }
}
- }
- $expressions = array(// replace multiple spaces between tags by a single space
- // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements
- '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1 \2',
- // remove spaces between attributes (but not in attribute values!)
- '#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5',
- '#^\s+<#Ss' => '<',
- '#>\s+$#Ss' => '>',
- $this->stripRegEx => ''
- );
-
- $text = preg_replace(array_keys($expressions), array_values($expressions), $text);
- $_offset = 0;
- if (preg_match_all('#@!@SMARTY:([0-9]+):SMARTY@!@#is', $text, $matches,
- PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
- foreach ($matches as $match) {
- $_length = strlen($match[ 0 ][ 0 ]);
- $replace = $store[ $match[ 1 ][ 0 ] ];
- $text = substr_replace($text, $replace, $match[ 0 ][ 1 ] + $_offset, $_length);
-
- $_offset += strlen($replace) - $_length;
- $_store ++;
+ $expressions = array(// replace multiple spaces between tags by a single space
+ // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements
+ '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1 \2',
+ // remove spaces between attributes (but not in attribute values!)
+ '#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5',
+ '#^\s+<#Ss' => '<',
+ '#>\s+$#Ss' => '>',
+ $this->stripRegEx => '');
+
+ $text = preg_replace(array_keys($expressions), array_values($expressions), $text);
+ $_offset = 0;
+ if (preg_match_all('#@!@SMARTY:([0-9]+):SMARTY@!@#is', $text, $matches,
+ PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $_length = strlen($match[ 0 ][ 0 ]);
+ $replace = $store[ $match[ 1 ][ 0 ] ];
+ $text = substr_replace($text, $replace, $match[ 0 ][ 1 ] + $_offset, $_length);
+
+ $_offset += strlen($replace) - $_length;
+ $_store ++;
+ }
}
+ } else {
+ $text = preg_replace($this->stripRegEx, '', $text);
}
- } else {
- $text = preg_replace($this->stripRegEx, '', $text);
}
- }
- if ($text) {
return new Smarty_Internal_ParseTree_Text($text);
}
return null;
- }
+ }
/**
* lazy loads internal compile plugin for tag and calls the compile method
@@ -853,7 +853,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
public function callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null)
{
// re-use object if already exists
- if (!isset($this->_tag_objects[$tag])) {
+ if (!isset($this->_tag_objects[ $tag ])) {
// lazy load internal compiler plugin
$_tag = explode('_', $tag);
$_tag = array_map('ucfirst', $_tag);
@@ -861,15 +861,15 @@ abstract class Smarty_Internal_TemplateCompilerBase
if (class_exists($class_name) &&
(!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this))
) {
- $this->_tag_objects[$tag] = new $class_name;
+ $this->_tag_objects[ $tag ] = new $class_name;
} else {
- $this->_tag_objects[$tag] = false;
+ $this->_tag_objects[ $tag ] = false;
return false;
}
}
// compile this tag
- return $this->_tag_objects[$tag] === false ? false :
- $this->_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);
+ return $this->_tag_objects[ $tag ] === false ? false :
+ $this->_tag_objects[ $tag ]->compile($args, $this, $param1, $param2, $param3);
}
/**
@@ -884,29 +884,29 @@ abstract class Smarty_Internal_TemplateCompilerBase
{
$function = null;
if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
- if (isset($this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type])) {
+ if (isset($this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ])) {
$function =
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function'];
- } elseif (isset($this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type])) {
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type] =
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type];
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ][ 'function' ];
+ } elseif (isset($this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ])) {
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ];
$function =
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function'];
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ][ 'function' ];
}
} else {
- if (isset($this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type])) {
+ if (isset($this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ])) {
$function =
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function'];
- } elseif (isset($this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type])) {
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type] =
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type];
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ][ 'function' ];
+ } elseif (isset($this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ])) {
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ];
$function =
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function'];
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ][ 'function' ];
}
}
if (isset($function)) {
if ($plugin_type == 'modifier') {
- $this->modifier_plugins[$plugin_name] = true;
+ $this->modifier_plugins[ $plugin_name ] = true;
}
return $function;
@@ -917,18 +917,18 @@ abstract class Smarty_Internal_TemplateCompilerBase
if (is_string($file)) {
if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['file'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ][ 'file' ] =
$file;
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ $plugin_type ][ 'function' ] =
$function;
} else {
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['file'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ][ 'file' ] =
$file;
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ $plugin_type ][ 'function' ] =
$function;
}
if ($plugin_type == 'modifier') {
- $this->modifier_plugins[$plugin_name] = true;
+ $this->modifier_plugins[ $plugin_name ] = true;
}
return $function;
@@ -961,14 +961,14 @@ abstract class Smarty_Internal_TemplateCompilerBase
if ($script !== null) {
if (is_file($script)) {
if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$tag][$plugin_type]['file'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $tag ][ $plugin_type ][ 'file' ] =
$script;
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$tag][$plugin_type]['function'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $tag ][ $plugin_type ][ 'function' ] =
$callback;
} else {
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$tag][$plugin_type]['file'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $tag ][ $plugin_type ][ 'file' ] =
$script;
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$tag][$plugin_type]['function'] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $tag ][ $plugin_type ][ 'function' ] =
$callback;
}
require_once $script;
@@ -976,11 +976,13 @@ abstract class Smarty_Internal_TemplateCompilerBase
$this->trigger_template_error("Default plugin handler: Returned script file \"{$script}\" for \"{$tag}\" not found");
}
}
- if (!is_string($callback) && !(is_array($callback) && is_string($callback[0]) && is_string($callback[1]))) {
+ if (!is_string($callback) &&
+ !(is_array($callback) && is_string($callback[ 0 ]) && is_string($callback[ 1 ]))
+ ) {
$this->trigger_template_error("Default plugin handler: Returned callback for \"{$tag}\" must be a static function name or array of class and function name");
}
if (is_callable($callback)) {
- $this->default_handler_plugins[$plugin_type][$tag] = array($callback, true, array());
+ $this->default_handler_plugins[ $plugin_type ][ $tag ] = array($callback, true, array());
return true;
} else {
@@ -1036,9 +1038,9 @@ abstract class Smarty_Internal_TemplateCompilerBase
"/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n";
// make sure we include modifier plugins for nocache code
foreach ($this->modifier_plugins as $plugin_name => $dummy) {
- if (isset($this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name]['modifier'])) {
- $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name]['modifier'] =
- $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name]['modifier'];
+ if (isset($this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ 'modifier' ])) {
+ $this->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $plugin_name ][ 'modifier' ] =
+ $this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ 'modifier' ];
}
}
} else {
@@ -1064,7 +1066,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
public function getId($input)
{
if (preg_match('~^[\'"]*([0-9]*[a-zA-Z_]\w*)[\'"]*$~', $input, $match)) {
- return $match[1];
+ return $match[ 1 ];
}
return false;
}
@@ -1079,7 +1081,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
public function getVariableName($input)
{
if (preg_match('~^[$]_smarty_tpl->tpl_vars\[[\'"]*([0-9]*[a-zA-Z_]\w*)[\'"]*\]->value$~', $input, $match)) {
- return $match[1];
+ return $match[ 1 ];
}
return false;
}
@@ -1136,7 +1138,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
$error_text =
'Syntax error in template "' . (empty($this->trace_filepath) ? $templateName : $this->trace_filepath) .
'" on line ' . ($line + $this->trace_line_offset) . ' "' .
- trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1])) . '" ';
+ trim(preg_replace('![\t\r\n]+!', ' ', $match[ $line - 1 ])) . '" ';
if (isset($args)) {
// individual error message
$error_text .= $args;
@@ -1146,13 +1148,13 @@ abstract class Smarty_Internal_TemplateCompilerBase
$error_text .= ' - Unexpected "' . $lex->value . '"';
if (count($this->parser->yy_get_expected_tokens($this->parser->yymajor)) <= 4) {
foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {
- $exp_token = $this->parser->yyTokenName[$token];
- if (isset($lex->smarty_token_names[$exp_token])) {
+ $exp_token = $this->parser->yyTokenName[ $token ];
+ if (isset($lex->smarty_token_names[ $exp_token ])) {
// token type from lexer
- $expect[] = '"' . $lex->smarty_token_names[$exp_token] . '"';
+ $expect[] = '"' . $lex->smarty_token_names[ $exp_token ] . '"';
} else {
// otherwise internal token name
- $expect[] = $this->parser->yyTokenName[$token];
+ $expect[] = $this->parser->yyTokenName[ $token ];
}
}
$error_text .= ', expected one of: ' . implode(' , ', $expect);
@@ -1160,7 +1162,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
}
$e = new SmartyCompilerException($error_text);
$e->line = $line;
- $e->source = trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1]));
+ $e->source = trim(preg_replace('![\t\r\n]+!', ' ', $match[ $line - 1 ]));
$e->desc = $args;
$e->template = $this->template->source->filepath;
throw $e;
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php b/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php
index 57dbf61a3..a745d1dc2 100644
--- a/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php
+++ b/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php
@@ -28,18 +28,18 @@ class TP_yyToken implements ArrayAccess
public function offsetExists($offset)
{
- return isset($this->metadata[$offset]);
+ return isset($this->metadata[ $offset ]);
}
public function offsetGet($offset)
{
- return $this->metadata[$offset];
+ return $this->metadata[ $offset ];
}
public function offsetSet($offset, $value)
{
if ($offset === null) {
- if (isset($value[0])) {
+ if (isset($value[ 0 ])) {
$x = ($value instanceof TP_yyToken) ? $value->metadata : $value;
$this->metadata = array_merge($this->metadata, $x);
@@ -52,16 +52,16 @@ class TP_yyToken implements ArrayAccess
}
if ($value instanceof TP_yyToken) {
if ($value->metadata) {
- $this->metadata[$offset] = $value->metadata;
+ $this->metadata[ $offset ] = $value->metadata;
}
} elseif ($value) {
- $this->metadata[$offset] = $value;
+ $this->metadata[ $offset ] = $value;
}
}
public function offsetUnset($offset)
{
- unset($this->metadata[$offset]);
+ unset($this->metadata[ $offset ]);
}
}
@@ -382,291 +382,282 @@ class Smarty_Internal_Templateparser
const TP_BACKTICK = 59;
- const YY_NO_ACTION = 535;
-
- const YY_ACCEPT_ACTION = 534;
-
- const YY_ERROR_ACTION = 533;
-
- const YY_SZ_ACTTAB = 2082;
-
- static public $yy_action = array(278, 8, 134, 451, 281, 68, 207, 7, 85, 248, 29, 98, 168, 114, 252, 451, 367, 230,
- 315, 245, 235, 249, 233, 36, 28, 145, 38, 42, 140, 36, 27, 39, 41, 322, 222, 300,
- 27, 213, 195, 82, 1, 31, 265, 92, 164, 181, 53, 278, 8, 133, 97, 281, 201, 249, 7,
- 85, 35, 307, 35, 307, 114, 226, 227, 215, 230, 108, 245, 235, 265, 208, 195, 28,
- 195, 5, 42, 184, 268, 277, 39, 41, 322, 222, 218, 258, 213, 120, 82, 1, 333, 265,
- 181, 175, 3, 53, 278, 8, 135, 105, 281, 206, 249, 7, 85, 35, 307, 207, 24, 114, 16,
- 103, 305, 230, 17, 245, 235, 404, 233, 195, 28, 288, 15, 42, 96, 265, 20, 39, 41,
- 322, 222, 300, 404, 213, 450, 82, 1, 6, 265, 404, 52, 113, 53, 278, 8, 135, 450,
- 281, 206, 289, 7, 85, 261, 463, 228, 244, 114, 122, 296, 463, 230, 102, 245, 235,
- 236, 198, 182, 28, 262, 122, 42, 143, 274, 102, 39, 41, 322, 222, 300, 33, 213,
- 314, 82, 1, 274, 265, 207, 86, 311, 53, 278, 8, 136, 195, 281, 206, 362, 7, 85,
- 283, 285, 287, 229, 114, 33, 228, 309, 230, 326, 245, 235, 36, 233, 291, 28, 479,
- 479, 42, 27, 147, 479, 39, 41, 322, 222, 300, 159, 213, 249, 82, 1, 193, 265, 94,
- 169, 249, 53, 278, 8, 135, 251, 281, 197, 249, 7, 85, 248, 29, 91, 150, 114, 252,
- 193, 479, 230, 207, 245, 235, 249, 233, 195, 28, 288, 191, 42, 407, 450, 207, 39,
- 41, 322, 222, 300, 179, 213, 195, 82, 1, 450, 265, 407, 52, 249, 53, 278, 8, 135,
- 407, 281, 204, 195, 7, 85, 313, 251, 93, 155, 114, 226, 225, 12, 230, 108, 245,
- 235, 249, 233, 247, 28, 479, 479, 42, 282, 189, 479, 39, 41, 322, 222, 300, 161,
- 213, 195, 82, 1, 25, 265, 103, 177, 249, 53, 278, 8, 132, 142, 281, 206, 249, 7,
- 85, 195, 244, 34, 249, 114, 103, 193, 103, 230, 251, 245, 235, 207, 233, 289, 4,
- 237, 113, 42, 228, 146, 138, 39, 41, 322, 222, 300, 10, 213, 249, 82, 1, 148, 265,
- 251, 113, 99, 53, 278, 8, 137, 251, 281, 206, 288, 7, 85, 294, 103, 186, 246, 114,
- 237, 335, 33, 230, 319, 245, 235, 329, 233, 255, 23, 52, 331, 42, 188, 246, 264,
- 39, 41, 322, 222, 300, 167, 213, 138, 82, 1, 34, 265, 288, 10, 249, 53, 278, 8,
- 135, 153, 281, 199, 207, 7, 85, 234, 226, 250, 249, 114, 108, 193, 190, 230, 308,
- 245, 235, 337, 209, 232, 28, 128, 160, 42, 128, 193, 207, 39, 41, 322, 222, 300,
- 11, 213, 463, 82, 1, 158, 265, 27, 463, 108, 53, 278, 8, 137, 176, 281, 206, 180,
- 7, 85, 220, 14, 276, 249, 114, 269, 207, 172, 230, 251, 245, 235, 106, 233, 286,
- 23, 407, 115, 42, 259, 193, 141, 39, 41, 322, 222, 300, 267, 213, 312, 82, 407,
- 144, 265, 207, 207, 38, 53, 407, 187, 246, 272, 273, 271, 270, 266, 184, 318, 207,
- 13, 278, 8, 22, 242, 281, 2, 173, 7, 85, 36, 84, 265, 19, 114, 6, 156, 27, 230,
- 137, 245, 235, 223, 217, 304, 249, 237, 248, 29, 228, 214, 163, 252, 119, 66, 112,
- 40, 43, 37, 102, 249, 126, 298, 260, 265, 192, 212, 297, 301, 284, 274, 295, 170,
- 324, 257, 256, 82, 304, 185, 265, 211, 302, 228, 214, 336, 221, 123, 73, 112, 166,
- 334, 183, 102, 248, 29, 298, 260, 253, 252, 212, 297, 301, 275, 274, 279, 195, 304,
- 36, 294, 165, 205, 228, 214, 171, 27, 123, 58, 109, 225, 117, 251, 102, 139, 149,
- 298, 260, 89, 151, 212, 297, 301, 304, 274, 301, 181, 157, 228, 214, 248, 29, 123,
- 73, 112, 252, 249, 87, 102, 35, 307, 298, 260, 88, 36, 212, 297, 301, 174, 274, 90,
- 27, 304, 195, 95, 301, 216, 228, 214, 301, 301, 123, 46, 109, 110, 301, 301, 102,
- 301, 207, 298, 260, 450, 405, 212, 297, 301, 231, 274, 401, 301, 304, 238, 301,
- 450, 301, 228, 214, 405, 327, 119, 66, 112, 301, 36, 405, 102, 301, 450, 298, 260,
- 27, 301, 212, 297, 301, 304, 274, 301, 301, 450, 228, 214, 301, 301, 123, 73, 112,
- 303, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 137, 274, 301,
- 254, 304, 301, 301, 301, 210, 228, 214, 248, 29, 123, 75, 112, 252, 301, 301, 102,
- 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 301, 301, 304, 301, 243,
- 301, 82, 228, 214, 265, 301, 123, 60, 112, 301, 301, 301, 102, 241, 301, 298, 260,
- 301, 301, 212, 297, 301, 304, 274, 301, 301, 301, 228, 214, 301, 301, 104, 71, 112,
- 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 301,
- 301, 304, 301, 301, 301, 301, 228, 81, 301, 301, 83, 47, 107, 301, 301, 301, 102,
- 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 301, 301, 304, 301, 301,
- 301, 301, 228, 214, 301, 301, 123, 76, 112, 301, 301, 301, 102, 301, 301, 298, 260,
- 301, 301, 212, 297, 301, 304, 274, 301, 301, 301, 228, 214, 301, 301, 123, 67, 112,
- 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 301,
- 301, 304, 301, 301, 301, 301, 228, 214, 301, 301, 123, 64, 112, 301, 301, 301, 102,
- 301, 301, 298, 260, 301, 310, 212, 297, 301, 301, 274, 301, 278, 9, 299, 301, 281,
- 301, 301, 7, 85, 301, 301, 301, 301, 114, 310, 301, 301, 230, 301, 245, 235, 278,
- 9, 299, 301, 281, 301, 301, 7, 85, 301, 301, 301, 301, 114, 301, 301, 301, 230,
- 301, 245, 235, 301, 301, 181, 154, 316, 21, 301, 181, 152, 301, 301, 301, 249, 304,
- 301, 35, 307, 249, 228, 203, 35, 307, 123, 61, 112, 325, 21, 301, 102, 195, 301,
- 298, 260, 301, 195, 212, 297, 301, 301, 274, 304, 301, 301, 181, 162, 228, 214,
- 301, 301, 123, 62, 112, 301, 249, 301, 102, 35, 307, 298, 260, 301, 301, 212, 297,
- 301, 301, 274, 301, 301, 304, 195, 207, 301, 301, 228, 214, 301, 301, 123, 65, 112,
- 196, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304,
- 301, 301, 301, 301, 228, 214, 301, 301, 123, 48, 112, 40, 43, 37, 102, 301, 301,
- 298, 260, 301, 301, 212, 297, 301, 301, 274, 304, 301, 324, 257, 256, 228, 214,
- 301, 301, 123, 63, 112, 301, 301, 301, 102, 18, 200, 298, 260, 292, 301, 212, 297,
- 301, 301, 274, 301, 301, 304, 301, 207, 301, 301, 228, 202, 301, 293, 116, 59, 112,
- 320, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304,
- 265, 301, 301, 301, 228, 79, 301, 301, 83, 45, 107, 40, 43, 37, 102, 301, 301, 298,
- 260, 301, 301, 212, 297, 301, 301, 274, 304, 301, 324, 257, 256, 228, 214, 301,
- 301, 123, 58, 112, 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301,
- 301, 274, 301, 301, 304, 301, 207, 301, 301, 228, 214, 301, 301, 123, 72, 112, 40,
- 43, 37, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304, 178, 324,
- 257, 256, 228, 214, 301, 301, 123, 55, 112, 40, 43, 37, 102, 301, 301, 298, 260,
- 301, 301, 212, 297, 301, 301, 274, 304, 301, 324, 257, 256, 228, 214, 301, 301,
- 123, 54, 112, 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301,
- 274, 301, 301, 304, 301, 207, 301, 301, 228, 214, 301, 301, 101, 77, 112, 280, 301,
- 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304, 301, 301,
- 301, 301, 228, 214, 301, 301, 123, 80, 112, 40, 43, 37, 102, 301, 301, 298, 260,
- 301, 301, 212, 297, 301, 301, 274, 304, 301, 324, 257, 256, 228, 214, 301, 301,
- 123, 56, 112, 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301,
- 274, 301, 301, 304, 301, 207, 301, 301, 228, 214, 301, 301, 123, 70, 112, 194, 301,
- 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304, 301, 301,
- 301, 301, 228, 214, 301, 301, 123, 74, 112, 40, 43, 37, 102, 301, 301, 298, 260,
- 301, 301, 212, 297, 301, 301, 274, 304, 301, 324, 257, 256, 228, 214, 301, 301,
- 123, 49, 112, 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301,
- 274, 301, 301, 304, 301, 207, 301, 301, 228, 214, 301, 301, 100, 57, 112, 301, 301,
- 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304, 301, 301,
- 301, 301, 228, 214, 301, 301, 123, 44, 112, 40, 43, 37, 102, 301, 301, 298, 260,
- 301, 301, 212, 297, 301, 301, 274, 304, 301, 324, 257, 256, 228, 214, 301, 301,
- 123, 69, 112, 301, 301, 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301,
- 274, 301, 301, 304, 301, 301, 301, 301, 228, 214, 301, 301, 118, 50, 112, 301, 301,
- 301, 102, 301, 301, 298, 260, 301, 301, 212, 297, 301, 301, 274, 304, 301, 301,
- 301, 301, 228, 214, 301, 301, 123, 78, 112, 301, 301, 301, 102, 301, 301, 298, 260,
- 207, 301, 212, 297, 301, 301, 274, 304, 301, 301, 359, 301, 228, 224, 301, 301,
- 121, 301, 112, 301, 301, 288, 102, 301, 301, 36, 306, 301, 301, 212, 297, 301, 27,
- 274, 301, 301, 304, 301, 301, 301, 52, 228, 224, 301, 301, 131, 301, 112, 301, 301,
- 301, 102, 301, 301, 219, 321, 301, 301, 212, 297, 301, 301, 274, 219, 479, 479,
- 301, 301, 301, 479, 463, 301, 301, 479, 479, 301, 30, 301, 479, 463, 417, 417, 301,
- 301, 301, 301, 479, 479, 301, 207, 301, 479, 463, 301, 301, 301, 301, 301, 463,
- 328, 463, 301, 479, 301, 463, 332, 207, 463, 301, 463, 288, 479, 301, 463, 36, 450,
- 290, 417, 417, 417, 463, 27, 463, 301, 479, 301, 463, 450, 301, 52, 301, 36, 301,
- 301, 417, 417, 417, 301, 27, 301, 301, 304, 301, 40, 43, 37, 228, 224, 301, 301,
- 127, 301, 112, 301, 301, 301, 102, 301, 301, 301, 324, 257, 256, 212, 297, 301,
- 301, 274, 301, 301, 304, 301, 301, 219, 301, 228, 224, 301, 301, 125, 301, 112,
- 301, 479, 479, 102, 15, 301, 479, 463, 301, 301, 212, 297, 301, 301, 274, 534, 51,
- 263, 285, 287, 229, 304, 301, 228, 301, 301, 228, 224, 207, 301, 124, 301, 112,
- 301, 301, 463, 102, 463, 207, 479, 301, 463, 301, 212, 297, 301, 304, 274, 207,
- 301, 301, 228, 224, 36, 301, 130, 301, 112, 301, 301, 27, 102, 301, 301, 301, 40,
- 43, 37, 212, 297, 301, 32, 274, 36, 239, 40, 43, 37, 301, 301, 27, 301, 324, 257,
- 256, 40, 43, 37, 301, 301, 301, 301, 324, 257, 256, 301, 301, 301, 301, 301, 304,
- 301, 324, 257, 256, 228, 224, 301, 301, 129, 301, 112, 301, 301, 301, 102, 301,
- 301, 26, 301, 301, 219, 212, 297, 301, 301, 274, 301, 479, 479, 301, 479, 479, 479,
- 463, 207, 479, 463, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301,
- 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 463, 301, 463, 463,
- 479, 463, 463, 479, 207, 463, 40, 43, 37, 301, 301, 301, 301, 301, 301, 301, 301,
- 301, 301, 301, 301, 301, 301, 324, 257, 256, 301, 330, 301, 301, 301, 301, 301,
- 301, 301, 301, 301, 301, 301, 411, 301, 40, 43, 37, 207, 301, 301, 301, 301, 411,
- 301, 411, 301, 207, 411, 301, 317, 301, 324, 257, 256, 411, 301, 411, 301, 411,
- 301, 301, 301, 301, 301, 301, 301, 111, 237, 301, 301, 301, 301, 301, 323, 40, 43,
- 37, 301, 207, 301, 301, 301, 301, 40, 43, 37, 301, 301, 373, 301, 301, 324, 257,
- 256, 301, 240, 301, 301, 301, 301, 324, 257, 256, 36, 301, 301, 301, 301, 301, 301,
- 27, 301, 301, 450, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 450,);
-
- static public $yy_lookahead = array(12, 13, 14, 36, 16, 17, 1, 19, 20, 12, 13, 71, 72, 25, 17, 48, 11, 29, 30, 31,
- 32, 81, 34, 26, 36, 28, 2, 39, 14, 26, 33, 43, 44, 45, 46, 47, 33, 49, 98, 51,
- 52, 23, 54, 71, 72, 71, 58, 12, 13, 14, 36, 16, 17, 81, 19, 20, 84, 85, 84, 85,
- 25, 75, 76, 77, 29, 79, 31, 32, 54, 34, 98, 36, 98, 36, 39, 8, 9, 10, 43, 44,
- 45, 46, 47, 14, 49, 48, 51, 52, 53, 54, 71, 72, 35, 58, 12, 13, 14, 67, 16, 17,
- 81, 19, 20, 84, 85, 1, 15, 25, 21, 18, 53, 29, 13, 31, 32, 11, 34, 98, 36, 22,
- 15, 39, 35, 54, 28, 43, 44, 45, 46, 47, 26, 49, 36, 51, 52, 36, 54, 33, 41, 48,
- 58, 12, 13, 14, 48, 16, 17, 64, 19, 20, 70, 46, 69, 99, 25, 75, 59, 52, 29, 79,
- 31, 32, 70, 34, 71, 36, 86, 75, 39, 51, 90, 79, 43, 44, 45, 46, 47, 35, 49, 37,
- 51, 52, 90, 54, 1, 102, 103, 58, 12, 13, 14, 98, 16, 17, 11, 19, 20, 63, 64, 65,
- 66, 25, 35, 69, 37, 29, 34, 31, 32, 26, 34, 17, 36, 12, 13, 39, 33, 72, 17, 43,
- 44, 45, 46, 47, 72, 49, 81, 51, 52, 98, 54, 71, 72, 81, 58, 12, 13, 14, 93, 16,
- 17, 81, 19, 20, 12, 13, 71, 72, 25, 17, 98, 50, 29, 1, 31, 32, 81, 34, 98, 36,
- 22, 71, 39, 11, 36, 1, 43, 44, 45, 46, 47, 72, 49, 98, 51, 52, 48, 54, 26, 41,
- 81, 58, 12, 13, 14, 33, 16, 17, 98, 19, 20, 53, 93, 71, 72, 25, 75, 76, 15, 29,
- 79, 31, 32, 81, 34, 22, 36, 12, 13, 39, 11, 71, 17, 43, 44, 45, 46, 47, 72, 49,
- 98, 51, 52, 15, 54, 18, 72, 81, 58, 12, 13, 14, 72, 16, 17, 81, 19, 20, 98, 99,
- 15, 81, 25, 18, 98, 18, 29, 93, 31, 32, 1, 34, 64, 36, 46, 48, 39, 69, 72, 46,
- 43, 44, 45, 46, 47, 52, 49, 81, 51, 52, 91, 54, 93, 48, 80, 58, 12, 13, 14, 93,
- 16, 17, 22, 19, 20, 92, 18, 94, 95, 25, 46, 103, 35, 29, 37, 31, 32, 53, 34, 17,
- 36, 41, 53, 39, 94, 95, 95, 43, 44, 45, 46, 47, 72, 49, 46, 51, 52, 15, 54, 22,
- 52, 81, 58, 12, 13, 14, 72, 16, 17, 1, 19, 20, 50, 75, 76, 81, 25, 79, 98, 80,
- 29, 89, 31, 32, 89, 34, 18, 36, 96, 51, 39, 96, 98, 1, 43, 44, 45, 46, 47, 26,
- 49, 46, 51, 52, 75, 54, 33, 52, 79, 58, 12, 13, 14, 72, 16, 17, 14, 19, 20, 17,
- 28, 65, 81, 25, 68, 1, 91, 29, 93, 31, 32, 79, 34, 37, 36, 11, 17, 39, 17, 98,
- 14, 43, 44, 45, 46, 47, 9, 49, 96, 51, 26, 27, 54, 1, 1, 2, 58, 33, 94, 95, 3,
- 4, 5, 6, 7, 8, 34, 1, 2, 12, 13, 13, 14, 16, 36, 17, 19, 20, 26, 17, 54, 42, 25,
- 36, 72, 33, 29, 14, 31, 32, 17, 17, 64, 81, 46, 12, 13, 69, 70, 72, 17, 73, 74,
- 75, 38, 39, 40, 79, 81, 17, 82, 83, 54, 17, 86, 87, 88, 17, 90, 17, 91, 55, 56,
- 57, 51, 64, 71, 54, 100, 101, 69, 70, 53, 50, 73, 74, 75, 91, 53, 80, 79, 12,
- 13, 82, 83, 17, 17, 86, 87, 88, 5, 90, 81, 98, 64, 26, 92, 28, 97, 69, 70, 91,
- 33, 73, 74, 75, 76, 78, 93, 79, 79, 91, 82, 83, 79, 91, 86, 87, 88, 64, 90, 104,
- 71, 72, 69, 70, 12, 13, 73, 74, 75, 17, 81, 79, 79, 84, 85, 82, 83, 79, 26, 86,
- 87, 88, 91, 90, 79, 33, 64, 98, 91, 104, 97, 69, 70, 104, 104, 73, 74, 75, 76,
- 104, 104, 79, 104, 1, 82, 83, 36, 11, 86, 87, 88, 15, 90, 11, 104, 64, 46, 104,
- 48, 104, 69, 70, 26, 53, 73, 74, 75, 104, 26, 33, 79, 104, 36, 82, 83, 33, 104,
- 86, 87, 88, 64, 90, 104, 104, 48, 69, 70, 104, 104, 73, 74, 75, 101, 104, 104,
- 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 14, 90, 104, 17, 64, 104, 104, 104,
- 97, 69, 70, 12, 13, 73, 74, 75, 17, 104, 104, 79, 104, 104, 82, 83, 104, 104,
- 86, 87, 88, 104, 90, 104, 104, 64, 104, 49, 104, 51, 69, 70, 54, 104, 73, 74,
- 75, 104, 104, 104, 79, 50, 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104,
- 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104,
- 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104,
- 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90,
- 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104,
- 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, 70, 104,
- 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104,
- 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104,
- 104, 79, 104, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104, 12, 13, 14, 104,
- 16, 104, 104, 19, 20, 104, 104, 104, 104, 25, 5, 104, 104, 29, 104, 31, 32, 12,
- 13, 14, 104, 16, 104, 104, 19, 20, 104, 104, 104, 104, 25, 104, 104, 104, 29,
- 104, 31, 32, 104, 104, 71, 72, 58, 59, 104, 71, 72, 104, 104, 104, 81, 64, 104,
- 84, 85, 81, 69, 70, 84, 85, 73, 74, 75, 58, 59, 104, 79, 98, 104, 82, 83, 104,
- 98, 86, 87, 88, 104, 90, 64, 104, 104, 71, 72, 69, 70, 104, 104, 73, 74, 75,
- 104, 81, 104, 79, 84, 85, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64,
- 98, 1, 104, 104, 69, 70, 104, 104, 73, 74, 75, 11, 104, 104, 79, 104, 104, 82,
- 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73,
- 74, 75, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64,
- 104, 55, 56, 57, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 13, 14, 82,
- 83, 17, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104,
- 34, 73, 74, 75, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104,
- 90, 64, 54, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 38, 39, 40, 79, 104,
- 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104,
- 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104,
- 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 104, 73, 74, 75, 38, 39, 40,
- 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 27, 55, 56, 57, 69, 70,
- 104, 104, 73, 74, 75, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
- 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79,
- 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104,
- 69, 70, 104, 104, 73, 74, 75, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86,
- 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 38, 39,
+ const YY_NO_ACTION = 527;
+
+ const YY_ACCEPT_ACTION = 526;
+
+ const YY_ERROR_ACTION = 525;
+
+ const YY_SZ_ACTTAB = 2021;
+
+ static public $yy_action = array(242, 10, 131, 178, 255, 76, 157, 5, 83, 293, 12, 149, 152, 116, 292, 93, 331, 217,
+ 284, 295, 221, 331, 226, 36, 21, 169, 35, 43, 308, 99, 26, 42, 39, 294, 235, 244,
+ 30, 200, 187, 80, 1, 251, 320, 206, 442, 123, 53, 242, 10, 130, 98, 255, 194, 399,
+ 5, 83, 442, 240, 298, 107, 116, 310, 174, 220, 217, 36, 295, 221, 399, 208, 135,
+ 21, 26, 161, 43, 399, 8, 174, 42, 39, 294, 235, 218, 331, 200, 187, 80, 1, 312,
+ 320, 11, 290, 313, 53, 242, 10, 133, 306, 255, 205, 187, 5, 83, 264, 266, 267, 211,
+ 116, 353, 220, 52, 217, 298, 295, 221, 206, 226, 220, 21, 290, 290, 43, 321, 36,
+ 249, 42, 39, 294, 235, 244, 26, 200, 206, 80, 1, 11, 320, 283, 52, 52, 53, 242, 10,
+ 132, 248, 255, 205, 455, 5, 83, 84, 301, 151, 455, 116, 323, 92, 36, 217, 2, 295,
+ 221, 331, 226, 26, 21, 290, 304, 43, 137, 36, 111, 42, 39, 294, 235, 244, 26, 200,
+ 187, 80, 1, 225, 320, 320, 52, 123, 53, 242, 10, 133, 98, 255, 193, 175, 5, 83,
+ 177, 280, 273, 234, 116, 310, 23, 278, 217, 13, 295, 221, 320, 203, 223, 21, 290,
+ 442, 43, 138, 187, 326, 42, 39, 294, 235, 244, 216, 200, 442, 80, 1, 4, 320, 329,
+ 52, 15, 53, 242, 10, 134, 91, 255, 205, 176, 5, 83, 293, 12, 16, 90, 116, 292, 300,
+ 99, 217, 241, 295, 221, 320, 226, 215, 28, 213, 201, 43, 105, 187, 286, 42, 39,
+ 294, 235, 244, 215, 200, 214, 80, 1, 105, 320, 11, 135, 285, 53, 242, 10, 133, 8,
+ 255, 205, 164, 5, 83, 442, 215, 19, 239, 116, 99, 105, 331, 217, 6, 295, 221, 442,
+ 192, 311, 21, 182, 289, 43, 308, 443, 32, 42, 39, 294, 235, 244, 296, 200, 17, 80,
+ 1, 443, 320, 262, 107, 26, 53, 242, 10, 133, 122, 255, 191, 172, 5, 83, 183, 188,
+ 148, 231, 116, 223, 168, 331, 217, 181, 295, 221, 331, 226, 206, 21, 331, 141, 43,
+ 308, 206, 38, 42, 39, 294, 235, 244, 331, 200, 188, 80, 1, 187, 320, 155, 206, 308,
+ 53, 242, 10, 133, 25, 255, 198, 188, 5, 83, 206, 145, 160, 308, 116, 228, 146, 206,
+ 217, 180, 295, 221, 331, 226, 286, 21, 331, 359, 43, 179, 289, 38, 42, 39, 294,
+ 235, 244, 250, 200, 271, 80, 1, 272, 320, 122, 94, 103, 53, 242, 10, 129, 3, 255,
+ 205, 144, 5, 83, 185, 289, 170, 99, 116, 270, 322, 331, 217, 184, 295, 221, 331,
+ 226, 99, 7, 171, 35, 43, 308, 89, 105, 42, 39, 294, 235, 244, 120, 200, 328, 80, 1,
+ 187, 320, 82, 223, 4, 53, 242, 10, 134, 142, 255, 205, 107, 5, 83, 309, 324, 302,
+ 20, 116, 316, 206, 291, 217, 290, 295, 221, 33, 226, 277, 28, 399, 243, 43, 257,
+ 219, 189, 42, 39, 294, 235, 244, 110, 200, 140, 80, 399, 147, 320, 253, 327, 258,
+ 53, 399, 14, 236, 220, 207, 154, 113, 65, 108, 319, 159, 238, 311, 98, 471, 471,
+ 330, 237, 279, 471, 210, 325, 245, 299, 310, 86, 308, 143, 268, 263, 259, 260, 269,
+ 177, 204, 287, 136, 242, 10, 150, 87, 255, 320, 139, 5, 83, 293, 12, 22, 195, 116,
+ 292, 247, 258, 217, 153, 295, 221, 220, 207, 36, 126, 50, 104, 109, 112, 88, 26,
+ 98, 246, 397, 330, 237, 85, 212, 210, 325, 245, 258, 310, 102, 299, 299, 220, 207,
+ 397, 113, 65, 108, 320, 299, 134, 397, 98, 222, 442, 330, 237, 299, 299, 210, 325,
+ 245, 258, 310, 299, 299, 442, 220, 207, 299, 126, 69, 108, 299, 288, 31, 299, 98,
+ 299, 299, 330, 237, 299, 299, 210, 325, 245, 80, 310, 299, 320, 299, 258, 299, 299,
+ 209, 299, 220, 207, 299, 126, 69, 108, 206, 299, 299, 455, 98, 299, 206, 330, 237,
+ 455, 365, 210, 325, 245, 299, 310, 355, 227, 258, 299, 299, 299, 199, 220, 207, 36,
+ 126, 64, 104, 299, 214, 36, 26, 98, 299, 442, 330, 237, 26, 299, 210, 325, 245,
+ 258, 310, 471, 471, 442, 220, 207, 471, 126, 69, 108, 293, 12, 299, 299, 98, 292,
+ 299, 330, 237, 299, 299, 210, 325, 245, 36, 310, 163, 299, 258, 299, 299, 26, 202,
+ 220, 207, 299, 126, 44, 108, 471, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299,
+ 210, 325, 245, 299, 310, 299, 299, 258, 134, 299, 299, 252, 220, 207, 206, 126, 72,
+ 108, 299, 299, 299, 299, 98, 299, 396, 330, 237, 299, 299, 210, 325, 245, 258, 310,
+ 299, 299, 299, 220, 207, 396, 126, 74, 108, 254, 299, 80, 396, 98, 320, 299, 330,
+ 237, 299, 297, 210, 325, 245, 299, 310, 299, 242, 9, 299, 299, 255, 299, 258, 5,
+ 83, 299, 299, 220, 207, 116, 126, 68, 108, 217, 299, 295, 221, 98, 299, 299, 330,
+ 237, 299, 299, 210, 325, 245, 299, 310, 299, 258, 299, 299, 299, 299, 220, 207,
+ 299, 100, 70, 108, 299, 303, 29, 299, 98, 299, 299, 330, 237, 299, 297, 210, 325,
+ 245, 299, 310, 299, 242, 9, 299, 299, 255, 299, 299, 5, 83, 299, 299, 299, 299,
+ 116, 299, 299, 258, 217, 299, 295, 221, 220, 207, 299, 126, 66, 108, 299, 299, 299,
+ 299, 98, 293, 12, 330, 237, 299, 292, 210, 325, 245, 299, 310, 258, 299, 299, 305,
+ 29, 220, 207, 299, 126, 60, 108, 299, 293, 12, 299, 98, 299, 292, 330, 237, 299,
+ 299, 210, 325, 245, 299, 310, 232, 299, 258, 299, 206, 299, 299, 220, 207, 299,
+ 126, 49, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 230, 210, 325, 245,
+ 299, 310, 258, 167, 299, 299, 299, 220, 207, 299, 126, 58, 108, 299, 41, 40, 37,
+ 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282,
+ 220, 97, 299, 81, 45, 106, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299,
+ 210, 325, 245, 299, 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 63,
+ 108, 299, 186, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310,
+ 258, 299, 299, 299, 299, 220, 197, 299, 114, 59, 108, 299, 41, 40, 37, 98, 299,
+ 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220,
+ 207, 299, 126, 55, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210,
+ 325, 245, 299, 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 57, 108,
+ 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258,
+ 299, 256, 275, 282, 220, 95, 299, 81, 48, 106, 233, 41, 40, 37, 98, 299, 299, 330,
+ 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299,
+ 126, 78, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245,
+ 299, 310, 299, 299, 258, 299, 206, 18, 299, 220, 207, 299, 96, 61, 108, 299, 299,
+ 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299,
+ 299, 299, 220, 207, 299, 126, 47, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237,
+ 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 126, 75,
+ 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310,
+ 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 64, 108, 299, 299, 299, 299,
+ 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299,
+ 220, 207, 299, 126, 56, 108, 317, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299,
+ 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 115, 46, 108, 299,
+ 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299,
+ 258, 299, 206, 299, 299, 220, 207, 299, 126, 79, 108, 299, 190, 299, 299, 98, 299,
+ 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220,
+ 207, 299, 126, 62, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210,
+ 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 126, 71, 108, 299, 299,
+ 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258,
+ 299, 206, 299, 299, 220, 207, 299, 101, 67, 108, 299, 318, 299, 299, 98, 299, 299,
+ 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 207,
+ 299, 126, 77, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325,
+ 245, 299, 310, 258, 299, 256, 275, 282, 220, 196, 299, 126, 54, 108, 299, 299, 299,
+ 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258, 299,
+ 206, 299, 299, 220, 207, 299, 126, 73, 108, 299, 274, 299, 299, 98, 299, 299, 330,
+ 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 224, 299,
+ 118, 299, 108, 299, 41, 40, 37, 98, 299, 299, 299, 261, 299, 299, 210, 325, 245,
+ 299, 310, 258, 299, 256, 275, 282, 220, 224, 299, 128, 299, 108, 299, 299, 299,
+ 299, 98, 299, 299, 229, 315, 206, 299, 210, 325, 245, 299, 310, 299, 471, 471, 307,
+ 27, 299, 471, 455, 526, 51, 265, 266, 267, 211, 299, 299, 220, 299, 36, 299, 409,
+ 409, 299, 299, 299, 26, 299, 299, 299, 299, 41, 40, 37, 206, 299, 455, 299, 455,
+ 299, 471, 299, 455, 299, 299, 299, 299, 299, 256, 275, 282, 229, 299, 299, 117,
+ 299, 442, 299, 409, 409, 409, 471, 471, 299, 299, 299, 471, 455, 442, 299, 299, 41,
+ 40, 37, 299, 409, 409, 409, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 256,
+ 275, 282, 299, 299, 299, 299, 455, 299, 455, 258, 471, 299, 455, 281, 220, 224,
+ 299, 127, 299, 108, 299, 299, 299, 299, 98, 299, 299, 299, 299, 299, 299, 210, 325,
+ 245, 258, 310, 206, 156, 299, 220, 224, 175, 121, 299, 108, 299, 299, 331, 299, 98,
+ 23, 278, 299, 299, 299, 299, 210, 325, 245, 34, 310, 36, 299, 299, 187, 299, 299,
+ 299, 26, 299, 299, 258, 299, 41, 40, 37, 220, 224, 299, 125, 299, 108, 299, 299,
+ 299, 299, 98, 299, 299, 229, 256, 275, 282, 210, 325, 245, 299, 310, 299, 471, 471,
+ 258, 31, 299, 471, 455, 220, 224, 299, 124, 299, 108, 299, 299, 299, 299, 98, 299,
+ 299, 299, 299, 299, 299, 210, 325, 245, 258, 310, 206, 299, 299, 220, 224, 455,
+ 119, 455, 108, 471, 299, 455, 299, 98, 299, 299, 229, 299, 299, 24, 210, 325, 245,
+ 299, 310, 299, 471, 471, 299, 471, 471, 471, 455, 299, 471, 455, 206, 41, 40, 37,
+ 299, 299, 299, 471, 471, 299, 299, 299, 471, 455, 299, 299, 276, 299, 256, 275,
+ 282, 299, 299, 299, 455, 36, 455, 455, 471, 455, 455, 471, 26, 455, 299, 206, 403,
+ 41, 40, 37, 206, 455, 299, 455, 299, 471, 403, 455, 403, 299, 299, 403, 299, 299,
+ 256, 275, 282, 299, 403, 299, 403, 299, 403, 299, 299, 299, 299, 299, 299, 299,
+ 299, 223, 41, 40, 37, 299, 299, 41, 40, 37, 299, 299, 299, 299, 299, 299, 299, 299,
+ 173, 256, 275, 282, 175, 314, 256, 275, 282, 299, 331, 166, 299, 23, 278, 175, 162,
+ 299, 299, 299, 175, 331, 299, 299, 23, 278, 331, 187, 299, 23, 278, 158, 299, 299,
+ 299, 175, 299, 299, 187, 299, 299, 331, 165, 187, 23, 278, 175, 299, 299, 299, 299,
+ 299, 331, 299, 299, 23, 278, 299, 187, 299, 299, 299, 299, 299, 299, 299, 299, 299,
+ 299, 187,);
+
+ static public $yy_lookahead = array(12, 13, 14, 80, 16, 17, 71, 19, 20, 12, 13, 71, 91, 25, 17, 75, 81, 29, 30, 31,
+ 32, 81, 34, 26, 36, 28, 15, 39, 93, 18, 33, 43, 44, 45, 46, 47, 28, 49, 98, 51,
+ 52, 70, 54, 1, 36, 74, 58, 12, 13, 14, 79, 16, 17, 11, 19, 20, 48, 86, 64, 48,
+ 25, 90, 75, 69, 29, 26, 31, 32, 26, 34, 46, 36, 33, 71, 39, 33, 52, 75, 43, 44,
+ 45, 46, 47, 81, 49, 98, 51, 52, 53, 54, 35, 22, 37, 58, 12, 13, 14, 103, 16, 17,
+ 98, 19, 20, 63, 64, 65, 66, 25, 11, 69, 41, 29, 64, 31, 32, 1, 34, 69, 36, 22,
+ 22, 39, 53, 26, 95, 43, 44, 45, 46, 47, 33, 49, 1, 51, 52, 35, 54, 37, 41, 41,
+ 58, 12, 13, 14, 14, 16, 17, 46, 19, 20, 102, 103, 71, 52, 25, 11, 75, 26, 29,
+ 36, 31, 32, 81, 34, 33, 36, 22, 17, 39, 14, 26, 48, 43, 44, 45, 46, 47, 33, 49,
+ 98, 51, 52, 70, 54, 54, 41, 74, 58, 12, 13, 14, 79, 16, 17, 75, 19, 20, 8, 9,
+ 10, 50, 25, 90, 84, 85, 29, 13, 31, 32, 54, 34, 46, 36, 22, 36, 39, 14, 98, 53,
+ 43, 44, 45, 46, 47, 46, 49, 48, 51, 52, 36, 54, 53, 41, 21, 58, 12, 13, 14, 36,
+ 16, 17, 75, 19, 20, 12, 13, 15, 35, 25, 17, 59, 18, 29, 22, 31, 32, 54, 34, 74,
+ 36, 76, 77, 39, 79, 98, 99, 43, 44, 45, 46, 47, 74, 49, 76, 51, 52, 79, 54, 35,
+ 46, 37, 58, 12, 13, 14, 52, 16, 17, 71, 19, 20, 36, 74, 15, 76, 25, 18, 79, 81,
+ 29, 35, 31, 32, 48, 34, 92, 36, 94, 95, 39, 93, 36, 15, 43, 44, 45, 46, 47, 53,
+ 49, 26, 51, 52, 48, 54, 89, 48, 33, 58, 12, 13, 14, 96, 16, 17, 71, 19, 20, 14,
+ 98, 71, 17, 25, 46, 71, 81, 29, 75, 31, 32, 81, 34, 1, 36, 81, 71, 39, 93, 1, 2,
+ 43, 44, 45, 46, 47, 81, 49, 98, 51, 52, 98, 54, 91, 1, 93, 58, 12, 13, 14, 28,
+ 16, 17, 98, 19, 20, 1, 91, 71, 93, 25, 18, 71, 1, 29, 80, 31, 32, 81, 34, 99,
+ 36, 81, 11, 39, 94, 95, 2, 43, 44, 45, 46, 47, 89, 49, 65, 51, 52, 68, 54, 96,
+ 80, 79, 58, 12, 13, 14, 36, 16, 17, 71, 19, 20, 94, 95, 71, 18, 25, 53, 96, 81,
+ 29, 75, 31, 32, 81, 34, 18, 36, 74, 15, 39, 93, 91, 79, 43, 44, 45, 46, 47, 17,
+ 49, 17, 51, 52, 98, 54, 17, 46, 36, 58, 12, 13, 14, 51, 16, 17, 48, 19, 20, 17,
+ 34, 17, 42, 25, 17, 1, 34, 29, 22, 31, 32, 23, 34, 37, 36, 11, 17, 39, 5, 17,
+ 17, 43, 44, 45, 46, 47, 17, 49, 51, 51, 26, 27, 54, 11, 53, 64, 58, 33, 13, 14,
+ 69, 70, 17, 72, 73, 74, 53, 91, 81, 92, 79, 12, 13, 82, 83, 9, 17, 86, 87, 88,
+ 104, 90, 79, 93, 91, 3, 4, 5, 6, 7, 8, 100, 101, 79, 12, 13, 91, 79, 16, 54, 91,
+ 19, 20, 12, 13, 13, 14, 25, 17, 17, 64, 29, 91, 31, 32, 69, 70, 26, 72, 73, 74,
+ 78, 76, 79, 33, 79, 34, 11, 82, 83, 79, 15, 86, 87, 88, 64, 90, 67, 104, 104,
+ 69, 70, 26, 72, 73, 74, 54, 104, 14, 33, 79, 17, 36, 82, 83, 104, 104, 86, 87,
+ 88, 64, 90, 104, 104, 48, 69, 70, 104, 72, 73, 74, 104, 101, 15, 104, 79, 104,
+ 104, 82, 83, 104, 104, 86, 87, 88, 51, 90, 104, 54, 104, 64, 104, 104, 97, 104,
+ 69, 70, 104, 72, 73, 74, 1, 104, 104, 46, 79, 104, 1, 82, 83, 52, 11, 86, 87,
+ 88, 104, 90, 11, 18, 64, 104, 104, 104, 97, 69, 70, 26, 72, 73, 74, 104, 76, 26,
+ 33, 79, 104, 36, 82, 83, 33, 104, 86, 87, 88, 64, 90, 12, 13, 48, 69, 70, 17,
+ 72, 73, 74, 12, 13, 104, 104, 79, 17, 104, 82, 83, 104, 104, 86, 87, 88, 26, 90,
+ 28, 104, 64, 104, 104, 33, 97, 69, 70, 104, 72, 73, 74, 50, 104, 104, 104, 79,
+ 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 14, 104, 104, 17,
+ 69, 70, 1, 72, 73, 74, 104, 104, 104, 104, 79, 104, 11, 82, 83, 104, 104, 86,
+ 87, 88, 64, 90, 104, 104, 104, 69, 70, 26, 72, 73, 74, 49, 104, 51, 33, 79, 54,
+ 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104, 12, 13, 14, 104, 16, 104, 64, 19,
+ 20, 104, 104, 69, 70, 25, 72, 73, 74, 29, 104, 31, 32, 79, 104, 104, 82, 83,
+ 104, 104, 86, 87, 88, 104, 90, 104, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73,
+ 74, 104, 58, 59, 104, 79, 104, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104,
+ 12, 13, 14, 104, 16, 104, 104, 19, 20, 104, 104, 104, 104, 25, 104, 104, 64, 29,
+ 104, 31, 32, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 12, 13, 82, 83,
+ 104, 17, 86, 87, 88, 104, 90, 64, 104, 104, 58, 59, 69, 70, 104, 72, 73, 74,
+ 104, 12, 13, 104, 79, 104, 17, 82, 83, 104, 104, 86, 87, 88, 104, 90, 50, 104,
+ 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104,
+ 82, 83, 104, 50, 86, 87, 88, 104, 90, 64, 27, 104, 104, 104, 69, 70, 104, 72,
+ 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90,
+ 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104,
+ 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70,
+ 104, 72, 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
+ 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40, 79,
+ 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70,
+ 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
+ 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39,
40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57,
- 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86,
- 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 104, 73, 74, 75,
- 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104,
- 104, 104, 69, 70, 104, 104, 73, 74, 75, 38, 39, 40, 79, 104, 104, 82, 83, 104,
- 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 104, 73, 74, 75,
- 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104,
- 64, 104, 1, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104,
- 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 104,
- 73, 74, 75, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64,
- 104, 55, 56, 57, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82,
- 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70,
- 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
- 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104,
- 79, 104, 104, 82, 83, 1, 104, 86, 87, 88, 104, 90, 64, 104, 104, 11, 104, 69,
- 70, 104, 104, 73, 104, 75, 104, 104, 22, 79, 104, 104, 26, 83, 104, 104, 86, 87,
- 88, 33, 90, 104, 104, 64, 104, 104, 104, 41, 69, 70, 104, 104, 73, 104, 75, 104,
- 104, 104, 79, 104, 104, 2, 83, 104, 104, 86, 87, 88, 104, 90, 2, 12, 13, 104,
- 104, 104, 17, 18, 104, 104, 12, 13, 104, 15, 104, 17, 18, 1, 2, 104, 104, 104,
- 104, 12, 13, 104, 1, 104, 17, 18, 104, 104, 104, 104, 104, 46, 11, 48, 104, 50,
- 104, 52, 53, 1, 46, 104, 48, 22, 50, 104, 52, 26, 36, 11, 38, 39, 40, 46, 33,
- 48, 104, 50, 104, 52, 48, 104, 41, 104, 26, 104, 104, 55, 56, 57, 104, 33, 104,
- 104, 64, 104, 38, 39, 40, 69, 70, 104, 104, 73, 104, 75, 104, 104, 104, 79, 104,
- 104, 104, 55, 56, 57, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 2, 104, 69,
- 70, 104, 104, 73, 104, 75, 104, 12, 13, 79, 15, 104, 17, 18, 104, 104, 86, 87,
- 88, 104, 90, 61, 62, 63, 64, 65, 66, 64, 104, 69, 104, 104, 69, 70, 1, 104, 73,
- 104, 75, 104, 104, 46, 79, 48, 1, 50, 104, 52, 104, 86, 87, 88, 64, 90, 1, 104,
- 104, 69, 70, 26, 104, 73, 104, 75, 104, 104, 33, 79, 104, 104, 104, 38, 39, 40,
- 86, 87, 88, 24, 90, 26, 37, 38, 39, 40, 104, 104, 33, 104, 55, 56, 57, 38, 39,
- 40, 104, 104, 104, 104, 55, 56, 57, 104, 104, 104, 104, 104, 64, 104, 55, 56,
- 57, 69, 70, 104, 104, 73, 104, 75, 104, 104, 104, 79, 104, 104, 2, 104, 104, 2,
- 86, 87, 88, 104, 90, 104, 12, 13, 104, 12, 13, 17, 18, 1, 17, 18, 104, 104, 104,
- 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
- 104, 104, 104, 104, 104, 46, 104, 48, 46, 50, 48, 52, 50, 1, 52, 38, 39, 40,
- 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 55, 56,
- 57, 104, 59, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 11, 104, 38,
- 39, 40, 1, 104, 104, 104, 104, 21, 104, 23, 104, 1, 26, 104, 53, 104, 55, 56,
- 57, 33, 104, 35, 104, 37, 104, 104, 104, 104, 104, 104, 104, 21, 46, 104, 104,
- 104, 104, 104, 37, 38, 39, 40, 104, 1, 104, 104, 104, 104, 38, 39, 40, 104, 104,
- 11, 104, 104, 55, 56, 57, 104, 18, 104, 104, 104, 104, 55, 56, 57, 26, 104, 104,
- 104, 104, 104, 104, 33, 104, 104, 36, 104, 104, 104, 104, 104, 104, 104, 104,
- 104, 104, 104, 48,);
-
- const YY_SHIFT_USE_DFLT = - 34;
-
- const YY_SHIFT_MAX = 242;
-
- static public $yy_shift_ofst = array(517, 270, 82, 270, 317, 82, 82, 317, - 12, - 12, 35, 411, 82, 82, 82, 129, 82,
- 82, 82, 176, 82, 82, 82, 82, 82, 82, 223, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 411, 364, 364, 458, 458, 458, 458, 458, 1830, 1706, 1810, 1810, 1810, 1810,
- 1810, 517, 733, 933, 2001, 1306, 1389, 1223, 1820, 1952, 526, 1917, 1992, 1140,
- 1057, 1472, 1472, 1472, 2033, 1472, 1472, 1472, 1472, 1472, 1472, 1472, 1472,
- 1472, 1196, 1689, 1196, 1600, 533, 183, 512, 14, 954, - 3, 589, 634, 634, 684,
- 684, 512, 512, 368, 14, 14, 512, 513, 484, 104, 746, 518, 252, 67, 232, 91,
- 232, 325, 3, 486, 307, 462, 433, 428, 349, 3, 5, 452, 462, 264, 327, 264, 264,
- 264, 264, 264, 327, 264, 264, - 34, 1772, 1653, 1662, 1902, 1899, 1675, 1113,
- 543, 105, 295, 3, 415, 69, 69, 3, 3, 313, 313, 3, 313, 3, 3, 3, 3, 3, 3, 283,
- 3, 415, 3, 3, 3, 3, 69, 313, 3, 3, 3, 313, 313, 313, 99, 313, 3, 3, 3, 69, 3,
- 498, 264, 264, 24, 497, 264, 327, 327, 327, 264, 24, 264, - 34, - 34, - 34,
- - 34, - 34, 1680, 1977, 678, 201, 652, 238, 97, 96, 357, 228, 382, 344, 308,
- 142, 57, 37, - 33, 360, 87, 167, 539, 545, 562, 507, 194, 172, 118, 397, 456,
- 402, 18, 299, 605, 556, 588, 552, 508, 481, 479, 398, 492, 534, 499, 522, 560,
- 498,);
-
- const YY_REDUCE_USE_DFLT = - 61;
-
- const YY_REDUCE_MAX = 196;
-
- static public $yy_reduce_ofst = array(1737, 488, 575, 633, 550, 658, 521, 604, 770, 1102, 1075, 1407, 1461, 1517,
- 1351, 1158, 1212, 1295, 1046, 716, 992, 936, 853, 963, 1019, 687, 1268, 1241,
- 1129, 1185, 1490, 1434, 1378, 1324, 799, 824, 741, 1544, 1573, 1819, 1678,
- 1740, 1707, 1765, 923, - 28, 571, - 28, 19, 918, 959, 134, 80, 83, - 26, - 26,
- - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, 160,
- - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, 222, - 26, 222,
- 92, 175, - 60, - 14, 288, 145, 199, 286, 254, 152, 246, 354, 401, 293, 358,
- 221, 340, 240, 190, 190, 279, 412, 190, 416, 395, 310, 279, 310, 472, 389,
- 310, 352, 260, 93, 190, 487, 190, 190, 355, 190, 310, 190, 190, 190, 515, 190,
- 424, 190, 190, 190, 530, 530, 530, 530, 530, 530, 551, 535, 530, 530, 531,
- 540, 574, 555, 531, 531, 524, 524, 531, 524, 531, 531, 531, 531, 531, 531,
- 549, 531, 544, 531, 531, 531, 531, 587, 524, 531, 531, 531, 524, 524, 524,
- 573, 524, 531, 531, 531, 580, 531, 579, 131, 131, 54, 30, 131, 311, 311, 311,
- 131, 54, 131, 294, 519, 489, 359, 506,);
+ 69, 70, 104, 72, 73, 74, 37, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87,
+ 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104,
+ 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 2,
+ 104, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104,
+ 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104,
+ 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55,
+ 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104,
+ 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73,
+ 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64,
+ 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 37, 38, 39, 40, 79, 104, 104, 82,
+ 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74,
+ 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104,
+ 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11, 104, 104, 79, 104,
+ 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104,
+ 72, 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104,
+ 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104,
+ 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69,
+ 70, 104, 72, 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87,
+ 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40,
+ 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69,
+ 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87,
+ 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11,
+ 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104,
+ 104, 104, 69, 70, 104, 72, 104, 74, 104, 38, 39, 40, 79, 104, 104, 104, 83, 104,
+ 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 104, 74, 104,
+ 104, 104, 104, 79, 104, 104, 2, 83, 1, 104, 86, 87, 88, 104, 90, 104, 12, 13,
+ 11, 15, 104, 17, 18, 61, 62, 63, 64, 65, 66, 104, 104, 69, 104, 26, 104, 1, 2,
+ 104, 104, 104, 33, 104, 104, 104, 104, 38, 39, 40, 1, 104, 46, 104, 48, 104, 50,
+ 104, 52, 104, 104, 104, 104, 104, 55, 56, 57, 2, 104, 104, 21, 104, 36, 104, 38,
+ 39, 40, 12, 13, 104, 104, 104, 17, 18, 48, 104, 104, 38, 39, 40, 104, 55, 56,
+ 57, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 55, 56, 57, 104, 104, 104,
+ 104, 46, 104, 48, 64, 50, 104, 52, 53, 69, 70, 104, 72, 104, 74, 104, 104, 104,
+ 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88, 64, 90, 1, 71, 104, 69, 70,
+ 75, 72, 104, 74, 104, 104, 81, 104, 79, 84, 85, 104, 104, 104, 104, 86, 87, 88,
+ 24, 90, 26, 104, 104, 98, 104, 104, 104, 33, 104, 104, 64, 104, 38, 39, 40, 69,
+ 70, 104, 72, 104, 74, 104, 104, 104, 104, 79, 104, 104, 2, 55, 56, 57, 86, 87,
+ 88, 104, 90, 104, 12, 13, 64, 15, 104, 17, 18, 69, 70, 104, 72, 104, 74, 104,
+ 104, 104, 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88, 64, 90, 1, 104,
+ 104, 69, 70, 46, 72, 48, 74, 50, 104, 52, 104, 79, 104, 104, 2, 104, 104, 2, 86,
+ 87, 88, 104, 90, 104, 12, 13, 104, 12, 13, 17, 18, 104, 17, 18, 1, 38, 39, 40,
+ 104, 104, 104, 12, 13, 104, 104, 104, 17, 18, 104, 104, 53, 104, 55, 56, 57,
+ 104, 104, 104, 46, 26, 48, 46, 50, 48, 52, 50, 33, 52, 104, 1, 11, 38, 39, 40,
+ 1, 46, 104, 48, 104, 50, 21, 52, 23, 104, 104, 26, 104, 104, 55, 56, 57, 104,
+ 33, 104, 35, 104, 37, 104, 104, 104, 104, 104, 104, 104, 104, 46, 38, 39, 40,
+ 104, 104, 38, 39, 40, 104, 104, 104, 104, 104, 104, 104, 104, 71, 55, 56, 57,
+ 75, 59, 55, 56, 57, 104, 81, 71, 104, 84, 85, 75, 71, 104, 104, 104, 75, 81,
+ 104, 104, 84, 85, 81, 98, 104, 84, 85, 71, 104, 104, 104, 75, 104, 104, 98, 104,
+ 104, 81, 71, 98, 84, 85, 75, 104, 104, 104, 104, 104, 81, 104, 104, 84, 85, 104,
+ 98, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 98,);
+
+ const YY_SHIFT_USE_DFLT = - 13;
+
+ const YY_SHIFT_MAX = 236;
+
+ static public $yy_shift_ofst = array(542, 364, 82, 82, 82, 411, 364, 411, 35, - 12, - 12, 82, 82, 82, 82, 82, 82,
+ 176, 82, 82, 129, 82, 82, 82, 317, 82, 82, 82, 82, 82, 82, 270, 82, 82, 82, 82,
+ 176, 223, 223, 458, 458, 458, 458, 458, 1734, 1603, 1862, 1862, 1862, 1862,
+ 1862, 542, 749, 803, 1897, 1448, 1531, 1199, 1643, 1826, 1365, 950, 1282, 1033,
+ 1116, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 660,
+ 1902, 1089, 1089, 594, 666, 131, 202, 865, - 3, 703, 551, 551, 233, 202, 202,
+ 131, 131, 357, 97, 484, 144, 920, 505, 42, 768, 189, 232, 11, 232, 278, 324,
+ 428, 39, 372, 324, 39, 351, 384, 391, 294, 155, 114, 114, 114, 114, 417, 417,
+ 114, 114, 114, 114, - 13, 1786, 1659, 1600, 1844, 1841, 1858, 552, 897, 519,
+ 618, 24, 101, 39, 101, 24, 39, 24, 39, 130, 39, 39, 24, 39, 24, 24, 193, 24,
+ 39, 39, 39, 24, 39, 39, 39, 130, 39, 39, 39, 130, 39, 130, 39, 231, 39, 39,
+ 114, 114, 114, 526, 404, 417, 404, 114, 417, 390, 114, 417, - 13, - 13, - 13,
+ - 13, - 13, 1630, 1888, 576, 178, 694, 191, 69, 8, 100, 275, 212, 243, 297,
+ 265, 255, 150, 98, 165, 55, 123, 493, 479, 468, 456, 434, 482, 483, 473, 461,
+ 502, 489, 457, 452, 466, 422, 421, 449, 442, 444, 462, 432, 467, 440, 464, 446,
+ 390,);
+
+ const YY_REDUCE_USE_DFLT = - 80;
+
+ const YY_REDUCE_MAX = 190;
+
+ static public $yy_reduce_ofst = array(1558, 451, 556, 640, 586, 506, 531, 615, 995, 939, 1078, 723, 1244, 968, 856,
+ 912, 1354, 1134, 1105, 1161, 1051, 1217, 1022, 1188, 1300, 1466, 1383, 1271,
+ 1327, 1437, 1410, 757, 698, 669, 885, 829, 785, 1493, 1520, 1761, 1706, 1669,
+ 1644, 1736, 1880, 1665, 1896, 1911, 1665, 1891, 1922, 40, - 29, 48, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 81, 119, 119, 119, 112, 2, - 60, 184, - 6, 264, 358,
+ - 65, 217, 213, 218, 197, 284, 269, 166, 363, - 13, 363, 295, 342, - 13, - 13,
+ 349, 281, 310, 295, 310, 323, 310, 316, 272, 236, 273, - 13, - 13, - 13, 320,
+ 374, - 13, - 13, 366, - 13, 338, 310, - 13, - 13, - 13, - 13, - 13, 465, 465,
+ 465, 465, 465, 465, 474, 450, 465, 465, 437, 469, 447, 453, 437, 447, 437,
+ 447, 463, 447, 447, 437, 447, 437, 437, 481, 437, 447, 447, 447, 437, 447,
+ 447, 447, 478, 447, 447, 447, 511, 447, 504, 447, 503, 447, 447, 241, 241,
+ 241, 530, 300, 29, 300, 241, 29, 361, 241, 29, - 79, - 77, 314, 340, 436,);
static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,),
array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
@@ -683,13 +674,13 @@ class Smarty_Internal_Templateparser
46, 47, 49, 51, 52, 54, 58,),
array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 53, 54, 58,),
array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44,
45, 46, 47, 49, 51, 52, 54, 58,),
array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44,
45, 46, 47, 49, 51, 52, 54, 58,),
array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
- 46, 47, 49, 51, 52, 53, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
46, 47, 49, 51, 52, 54, 58,),
array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
46, 47, 49, 51, 52, 54, 58,),
@@ -765,70 +756,67 @@ class Smarty_Internal_Templateparser
array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,),
array(14, 17, 49, 51, 54,),
array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,),
- array(1, 21, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 55, 56, 57, 59,),
array(1, 11, 38, 39, 40, 55, 56, 57,),
+ array(1, 11, 38, 39, 40, 55, 56, 57,), array(1, 2, 38, 39, 40, 55, 56, 57,),
+ array(1, 21, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 53, 55, 56, 57,),
array(1, 11, 38, 39, 40, 55, 56, 57,),
array(1, 27, 38, 39, 40, 55, 56, 57,),
array(1, 37, 38, 39, 40, 55, 56, 57,),
- array(1, 38, 39, 40, 53, 55, 56, 57,), array(1, 2, 38, 39, 40, 55, 56, 57,),
- array(1, 38, 39, 40, 55, 56, 57, 59,),
- array(1, 37, 38, 39, 40, 55, 56, 57,),
array(1, 11, 38, 39, 40, 55, 56, 57,),
- array(1, 11, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 37, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
- array(1, 11, 18, 26, 33, 36, 48,), array(1, 38, 39, 40, 55, 56, 57,),
array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
- array(38, 39, 40, 55, 56, 57,), array(1, 11, 22, 26, 33, 41,),
- array(38, 39, 40, 55, 56, 57,), array(1, 11, 22, 26, 33, 41,),
+ array(1, 11, 18, 26, 33, 36, 48,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(38, 39, 40, 55, 56, 57,), array(38, 39, 40, 55, 56, 57,),
array(14, 17, 51, 54,), array(1, 11, 26, 33,), array(1, 26, 33,),
array(14, 36, 54,),
array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,),
array(12, 13, 17, 26, 28, 33,), array(12, 13, 17, 26, 28, 33,),
- array(12, 13, 17, 26, 33,), array(12, 13, 17, 26, 33,),
- array(1, 11, 26, 33,), array(1, 11, 26, 33,), array(1, 26, 33,),
- array(1, 26, 33,), array(18, 46, 52,), array(14, 36, 54,),
- array(14, 36, 54,), array(1, 26, 33,), array(1, 2,),
- array(1, 11, 26, 27, 33,), array(1, 11, 26, 33,), array(12, 13, 17, 50,),
- array(13, 14, 17, 54,), array(1, 11, 26, 33,), array(8, 9, 10,),
- array(12, 13, 17,), array(15, 18, 48,), array(12, 13, 17,),
- array(15, 18, 48,), array(26, 33,), array(14, 54,), array(18, 48,),
- array(14, 17,), array(26, 33,), array(1, 18,), array(1, 53,),
- array(26, 33,), array(1, 11,), array(1, 28,), array(14, 17,), array(1,),
- array(18,), array(1,), array(1,), array(1,), array(1,), array(1,),
- array(18,), array(1,), array(1,), array(),
+ array(12, 13, 17, 26, 33,), array(12, 13, 17, 26, 33,), array(18, 46, 52,),
+ array(14, 36, 54,), array(14, 36, 54,), array(1, 26, 33,),
+ array(1, 26, 33,), array(1, 2,), array(11, 22, 26, 33, 41,),
+ array(1, 11, 26, 27, 33,), array(11, 22, 26, 33, 41,),
+ array(12, 13, 17, 50,), array(13, 14, 17, 54,), array(1, 11, 26, 33,),
+ array(1, 11, 26, 33,), array(8, 9, 10,), array(12, 13, 17,),
+ array(15, 18, 48,), array(12, 13, 17,), array(15, 18, 48,), array(14, 17,),
+ array(18, 48,), array(26, 33,), array(1, 18,), array(14, 17,),
+ array(26, 33,), array(1, 28,), array(1, 53,), array(1, 11,), array(26, 33,),
+ array(14, 54,), array(1,), array(1,), array(1,), array(1,), array(18,),
+ array(18,), array(1,), array(1,), array(1,), array(1,), array(),
array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,),
array(2, 12, 13, 17, 18, 46, 48, 50, 52, 53,),
array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,),
array(2, 12, 13, 17, 18, 46, 48, 50, 52,),
array(2, 12, 13, 17, 18, 46, 48, 50, 52,),
array(12, 13, 17, 18, 46, 48, 50, 52,), array(13, 14, 17, 34, 54,),
- array(12, 13, 17, 50,), array(15, 46, 52,), array(12, 13, 17,),
- array(26, 33,), array(46, 52,), array(14, 54,), array(14, 54,),
- array(26, 33,), array(26, 33,), array(46, 52,), array(46, 52,),
- array(26, 33,), array(46, 52,), array(26, 33,), array(26, 33,),
- array(26, 33,), array(26, 33,), array(26, 33,), array(26, 33,),
- array(15, 22,), array(26, 33,), array(46, 52,), array(26, 33,),
- array(26, 33,), array(26, 33,), array(26, 33,), array(14, 54,),
+ array(12, 13, 17, 50,), array(12, 13, 17,), array(15, 46, 52,),
+ array(46, 52,), array(46, 52,), array(26, 33,), array(46, 52,),
+ array(46, 52,), array(26, 33,), array(46, 52,), array(26, 33,),
+ array(14, 54,), array(26, 33,), array(26, 33,), array(46, 52,),
+ array(26, 33,), array(46, 52,), array(46, 52,), array(13, 36,),
array(46, 52,), array(26, 33,), array(26, 33,), array(26, 33,),
- array(46, 52,), array(46, 52,), array(46, 52,), array(13, 36,),
array(46, 52,), array(26, 33,), array(26, 33,), array(26, 33,),
- array(14, 54,), array(26, 33,), array(36,), array(1,), array(1,), array(2,),
- array(9,), array(1,), array(18,), array(18,), array(18,), array(1,),
- array(2,), array(1,), array(), array(), array(), array(), array(),
- array(1, 2, 36, 38, 39, 40, 48, 55, 56, 57,),
+ array(14, 54,), array(26, 33,), array(26, 33,), array(26, 33,),
+ array(14, 54,), array(26, 33,), array(14, 54,), array(26, 33,),
+ array(15, 22,), array(26, 33,), array(26, 33,), array(1,), array(1,),
+ array(1,), array(9,), array(2,), array(18,), array(2,), array(1,),
+ array(18,), array(36,), array(1,), array(18,), array(), array(), array(),
+ array(), array(), array(1, 2, 36, 38, 39, 40, 48, 55, 56, 57,),
array(11, 21, 23, 26, 33, 35, 37, 46,), array(11, 15, 26, 33, 36, 48,),
- array(12, 13, 17, 50,), array(36, 46, 48, 53,), array(22, 41, 53,),
- array(22, 41, 59,), array(28, 36, 48,), array(35, 37,), array(36, 48,),
- array(17, 50,), array(46, 53,), array(15, 46,), array(35, 37,),
- array(35, 53,), array(36, 48,), array(36, 48,), array(22, 41,),
- array(21, 35,), array(35, 37,), array(53,), array(53,), array(17,),
- array(36,), array(17,), array(34,), array(51,), array(22,), array(37,),
- array(15,), array(23,), array(11,), array(5,), array(17,), array(17,),
- array(17,), array(46,), array(17,), array(17,), array(51,), array(34,),
- array(17,), array(42,), array(17,), array(17,), array(36,), array(),
+ array(36, 46, 48, 53,), array(12, 13, 17, 50,), array(22, 41, 59,),
+ array(22, 41, 53,), array(28, 36, 48,), array(35, 37,), array(36, 48,),
+ array(21, 35,), array(35, 37,), array(15, 46,), array(35, 53,),
+ array(36, 48,), array(17, 50,), array(22, 41,), array(46, 53,),
+ array(35, 37,), array(36, 48,), array(5,), array(17,), array(23,),
+ array(37,), array(15,), array(17,), array(17,), array(53,), array(53,),
+ array(11,), array(17,), array(51,), array(34,), array(22,), array(51,),
+ array(46,), array(17,), array(17,), array(17,), array(17,), array(36,),
+ array(17,), array(42,), array(17,), array(34,), array(36,), array(),
array(), array(), array(), array(), array(), array(), array(), array(),
array(), array(), array(), array(), array(), array(), array(), array(),
array(), array(), array(), array(), array(), array(), array(), array(),
@@ -842,36 +830,35 @@ class Smarty_Internal_Templateparser
array(), array(), array(), array(), array(), array(), array(), array(),
array(), array(), array(), array(), array(), array(),);
- static public $yy_default = array(341, 518, 498, 533, 533, 498, 498, 533, 533, 533, 533, 533, 533, 533, 533, 533,
- 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
- 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 401, 533, 377, 401,
- 401, 401, 368, 338, 533, 533, 533, 533, 533, 406, 533, 533, 533, 533, 533, 533,
- 533, 520, 521, 422, 440, 382, 496, 406, 412, 497, 519, 408, 413, 403, 429, 430,
- 428, 430, 533, 415, 401, 533, 533, 401, 401, 401, 401, 447, 421, 401, 401, 510,
- 533, 533, 401, 391, 415, 415, 463, 533, 415, 533, 463, 453, 463, 453, 379, 533,
- 453, 533, 401, 395, 415, 401, 415, 415, 533, 425, 453, 415, 433, 431, 397, 418,
- 507, 432, 419, 505, 452, 452, 452, 452, 452, 452, 533, 465, 479, 463, 386, 456,
- 533, 533, 388, 387, 461, 457, 364, 459, 384, 360, 385, 361, 380, 378, 533, 363,
- 458, 365, 369, 381, 366, 533, 490, 376, 375, 372, 491, 460, 489, 463, 488, 370,
- 374, 390, 533, 389, 463, 421, 396, 499, 354, 398, 511, 508, 485, 392, 500, 447,
- 504, 504, 463, 504, 463, 440, 436, 440, 464, 440, 430, 430, 440, 533, 440, 533,
- 436, 436, 533, 533, 533, 448, 430, 533, 533, 533, 443, 533, 509, 533, 533, 533,
- 430, 533, 533, 409, 533, 346, 533, 533, 533, 436, 533, 533, 533, 438, 533, 442,
- 533, 533, 479, 451, 503, 394, 486, 383, 483, 400, 410, 481, 482, 402, 450, 502,
- 514, 513, 479, 501, 420, 427, 426, 339, 487, 480, 350, 351, 352, 353, 349, 347,
- 344, 345, 455, 348, 355, 356, 358, 399, 484, 371, 357, 340, 454, 342, 414, 343,
- 434, 531, 530, 466, 467, 468, 462, 417, 526, 441, 416, 528, 443, 444, 516, 517,
- 446, 515, 424, 423, 445, 495, 532, 525, 492, 475, 493, 393, 522, 477, 437, 494,
- 469, 506, 435, 442, 512, 523, 439, 470, 529, 473, 527, 476, 474, 478, 472, 524,
- 471, 449,);
+ static public $yy_default = array(335, 510, 490, 490, 490, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
+ 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
+ 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 393, 525, 360, 393,
+ 357, 393, 369, 332, 525, 525, 525, 525, 525, 525, 525, 525, 525, 398, 525, 525,
+ 525, 513, 405, 395, 404, 489, 398, 374, 400, 511, 488, 414, 432, 512, 421, 420,
+ 525, 407, 393, 525, 525, 393, 393, 393, 393, 502, 525, 525, 393, 393, 383, 422,
+ 407, 422, 455, 525, 407, 407, 525, 455, 445, 455, 445, 525, 445, 393, 387, 525,
+ 371, 407, 407, 407, 393, 525, 417, 425, 389, 410, 499, 445, 423, 411, 407, 424,
+ 497, 444, 444, 444, 444, 444, 444, 525, 457, 455, 471, 449, 448, 366, 450, 451,
+ 379, 453, 378, 525, 368, 367, 452, 364, 483, 480, 455, 481, 358, 380, 362, 482,
+ 373, 356, 361, 525, 382, 370, 377, 525, 372, 525, 354, 525, 381, 376, 439, 413,
+ 384, 348, 492, 477, 491, 388, 503, 455, 390, 500, 455, 496, 496, 496, 455, 432,
+ 428, 432, 432, 456, 422, 422, 432, 525, 440, 525, 525, 428, 525, 432, 525, 422,
+ 428, 525, 525, 340, 525, 401, 525, 525, 525, 525, 435, 525, 525, 525, 525, 430,
+ 422, 525, 428, 525, 525, 525, 525, 501, 525, 434, 525, 525, 471, 412, 391, 402,
+ 418, 375, 352, 394, 435, 436, 460, 459, 471, 479, 437, 419, 442, 351, 443, 363,
+ 504, 342, 438, 341, 343, 416, 441, 339, 334, 333, 336, 337, 338, 344, 468, 349,
+ 347, 350, 476, 505, 469, 406, 415, 345, 346, 466, 506, 486, 385, 487, 495, 508,
+ 509, 478, 426, 429, 474, 475, 427, 386, 507, 524, 523, 520, 518, 517, 493, 514,
+ 494, 515, 516, 522, 473, 446, 447, 454, 470, 485, 519, 498, 458, 434, 461, 464,
+ 472, 467, 484, 521, 431, 433, 465, 463, 409, 462, 408, 392,);
const YYNOCODE = 105;
const YYSTACKDEPTH = 500;
- const YYNSTATE = 338;
+ const YYNSTATE = 332;
- const YYNRULE = 195;
+ const YYNRULE = 193;
const YYERRORSYMBOL = 60;
@@ -915,8 +902,8 @@ class Smarty_Internal_Templateparser
'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', 'CLOSEB',
'DOLLAR', 'LOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', 'error', 'start',
'template', 'template_element', 'smartytag', 'literal', 'text_content',
- 'literal_elements', 'literal_element', 'tag', 'variable', 'modifierlist', 'attributes',
- 'value', 'expr', 'varindexed', 'statement', 'statements', 'foraction', 'varvar',
+ 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', 'value', 'expr',
+ 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', 'varvar',
'modparameters', 'attribute', 'ternary', 'array', 'lop', 'scond', 'ns1', 'function',
'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex', 'indexdef',
'varvarele', 'objectchain', 'objectelement', 'method', 'params', 'modifier',
@@ -934,12 +921,10 @@ class Smarty_Internal_Templateparser
'literal_elements ::= literal_elements literal_element', 'literal_elements ::=',
'literal_element ::= literal', 'literal_element ::= LITERAL',
'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable',
- 'tag ::= LDEL variable modifierlist attributes',
'tag ::= LDEL variable attributes', 'tag ::= LDEL value',
- 'tag ::= LDEL value modifierlist attributes', 'tag ::= LDEL value attributes',
- 'tag ::= LDEL expr modifierlist attributes', 'tag ::= LDEL expr attributes',
- 'tag ::= LDEL DOLLARID EQUAL value', 'tag ::= LDEL DOLLARID EQUAL expr',
- 'tag ::= LDEL DOLLARID EQUAL expr attributes',
+ 'tag ::= LDEL value attributes', 'tag ::= LDEL expr',
+ 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value',
+ 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes',
'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG',
'tag ::= LDEL ID attributes', 'tag ::= LDEL ID',
'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes',
@@ -1034,7 +1019,7 @@ class Smarty_Internal_Templateparser
return 'End of Input';
}
if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
- return $this->yyTokenName[$tokenType];
+ return $this->yyTokenName[ $tokenType ];
} else {
return "Unknown";
}
@@ -1055,7 +1040,7 @@ class Smarty_Internal_Templateparser
}
$yytos = array_pop($this->yystack);
if ($this->yyTraceFILE && $this->yyidx >= 0) {
- fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n");
+ fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n");
}
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
@@ -1078,14 +1063,14 @@ class Smarty_Internal_Templateparser
{
static $res3 = array();
static $res4 = array();
- $state = $this->yystack[$this->yyidx]->stateno;
- $expected = self::$yyExpectedTokens[$state];
- if (isset($res3[$state][$token])) {
- if ($res3[$state][$token]) {
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ $expected = self::$yyExpectedTokens[ $state ];
+ if (isset($res3[ $state ][ $token ])) {
+ if ($res3[ $state ][ $token ]) {
return $expected;
}
} else {
- if ($res3[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) {
+ if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
return $expected;
}
}
@@ -1105,20 +1090,20 @@ class Smarty_Internal_Templateparser
return array_unique($expected);
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno][1];
- $nextstate = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno,
- self::$yyRuleInfo[$yyruleno][0]);
- if (isset(self::$yyExpectedTokens[$nextstate])) {
- $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
- if (isset($res4[$nextstate][$token])) {
- if ($res4[$nextstate][$token]) {
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
+ $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset(self::$yyExpectedTokens[ $nextstate ])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
+ if (isset($res4[ $nextstate ][ $token ])) {
+ if ($res4[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
}
} else {
- if ($res4[$nextstate][$token] =
- in_array($token, self::$yyExpectedTokens[$nextstate], true)
+ if ($res4[ $nextstate ][ $token ] =
+ in_array($token, self::$yyExpectedTokens[ $nextstate ], true)
) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
@@ -1131,8 +1116,8 @@ class Smarty_Internal_Templateparser
$this->yyidx ++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno][0];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
@@ -1166,13 +1151,13 @@ class Smarty_Internal_Templateparser
if ($token === 0) {
return true; // 0 is not part of this
}
- $state = $this->yystack[$this->yyidx]->stateno;
- if (isset($res[$state][$token])) {
- if ($res[$state][$token]) {
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ if (isset($res[ $state ][ $token ])) {
+ if ($res[ $state ][ $token ]) {
return true;
}
} else {
- if ($res[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) {
+ if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
return true;
}
}
@@ -1192,18 +1177,18 @@ class Smarty_Internal_Templateparser
return true;
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno][1];
- $nextstate = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno,
- self::$yyRuleInfo[$yyruleno][0]);
- if (isset($res2[$nextstate][$token])) {
- if ($res2[$nextstate][$token]) {
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
+ $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset($res2[ $nextstate ][ $token ])) {
+ if ($res2[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
} else {
- if ($res2[$nextstate][$token] = (isset(self::$yyExpectedTokens[$nextstate]) &&
- in_array($token, self::$yyExpectedTokens[$nextstate], true))
+ if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) &&
+ in_array($token, self::$yyExpectedTokens[ $nextstate ], true))
) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
@@ -1215,8 +1200,8 @@ class Smarty_Internal_Templateparser
$this->yyidx ++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno][0];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
@@ -1249,37 +1234,37 @@ class Smarty_Internal_Templateparser
public function yy_find_shift_action($iLookAhead)
{
- $stateno = $this->yystack[$this->yyidx]->stateno;
+ $stateno = $this->yystack[ $this->yyidx ]->stateno;
/* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
- if (!isset(self::$yy_shift_ofst[$stateno])) {
+ if (!isset(self::$yy_shift_ofst[ $stateno ])) {
// no shift actions
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_shift_ofst[$stateno];
+ $i = self::$yy_shift_ofst[ $stateno ];
if ($i === self::YY_SHIFT_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
- if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) {
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) {
if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) &&
- ($iFallback = self::$yyFallback[$iLookAhead]) != 0
+ ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0
) {
if ($this->yyTraceFILE) {
fwrite($this->yyTraceFILE,
- $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " .
- $this->yyTokenName[$iFallback] . "\n");
+ $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " .
+ $this->yyTokenName[ $iFallback ] . "\n");
}
return $this->yy_find_shift_action($iFallback);
}
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
@@ -1287,21 +1272,21 @@ class Smarty_Internal_Templateparser
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
- if (!isset(self::$yy_reduce_ofst[$stateno])) {
- return self::$yy_default[$stateno];
+ if (!isset(self::$yy_reduce_ofst[ $stateno ])) {
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_reduce_ofst[$stateno];
+ $i = self::$yy_reduce_ofst[ $stateno ];
if ($i == self::YY_REDUCE_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
- if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) {
- return self::$yy_default[$stateno];
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) {
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
@@ -1332,7 +1317,7 @@ class Smarty_Internal_Templateparser
fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState);
fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
for ($i = 1; $i <= $this->yyidx; $i ++) {
- fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]);
+ fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]);
}
fwrite($this->yyTraceFILE, "\n");
}
@@ -1345,93 +1330,92 @@ class Smarty_Internal_Templateparser
array(0 => 63, 1 => 1), array(0 => 65, 1 => 2), array(0 => 65, 1 => 3),
array(0 => 67, 1 => 2), array(0 => 67, 1 => 0), array(0 => 68, 1 => 1),
array(0 => 68, 1 => 1), array(0 => 64, 1 => 2), array(0 => 64, 1 => 1),
- array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 3),
- array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 3),
- array(0 => 69, 1 => 4), array(0 => 69, 1 => 3), array(0 => 69, 1 => 4),
- array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 69, 1 => 5),
- array(0 => 64, 1 => 1), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2),
- array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 69, 1 => 6),
array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2),
- array(0 => 69, 1 => 3), array(0 => 69, 1 => 8), array(0 => 78, 1 => 2),
- array(0 => 78, 1 => 1), array(0 => 69, 1 => 5), array(0 => 69, 1 => 7),
- array(0 => 69, 1 => 2), array(0 => 69, 1 => 6), array(0 => 69, 1 => 8),
- array(0 => 69, 1 => 6), array(0 => 69, 1 => 8), array(0 => 69, 1 => 3),
- array(0 => 69, 1 => 4), array(0 => 69, 1 => 2), array(0 => 64, 1 => 1),
- array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 4),
- array(0 => 69, 1 => 5), array(0 => 72, 1 => 2), array(0 => 72, 1 => 1),
- array(0 => 72, 1 => 0), array(0 => 81, 1 => 4), array(0 => 81, 1 => 2),
+ array(0 => 69, 1 => 3), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 4), array(0 => 69, 1 => 4), array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 5), array(0 => 64, 1 => 1), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 6), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 8),
+ array(0 => 78, 1 => 2), array(0 => 78, 1 => 1), array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 7), array(0 => 69, 1 => 2), array(0 => 69, 1 => 6),
+ array(0 => 69, 1 => 8), array(0 => 69, 1 => 6), array(0 => 69, 1 => 8),
+ array(0 => 69, 1 => 3), array(0 => 69, 1 => 4), array(0 => 69, 1 => 2),
+ array(0 => 64, 1 => 1), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 71, 1 => 2),
+ array(0 => 71, 1 => 1), array(0 => 71, 1 => 0), array(0 => 81, 1 => 4),
array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 2),
- array(0 => 81, 1 => 2), array(0 => 81, 1 => 4), array(0 => 77, 1 => 1),
- array(0 => 77, 1 => 3), array(0 => 76, 1 => 3), array(0 => 76, 1 => 3),
- array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), array(0 => 74, 1 => 1),
- array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3),
- array(0 => 74, 1 => 3), array(0 => 74, 1 => 1), array(0 => 74, 1 => 2),
- array(0 => 74, 1 => 3), array(0 => 74, 1 => 2), array(0 => 74, 1 => 3),
- array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3),
- array(0 => 82, 1 => 7), array(0 => 82, 1 => 7), array(0 => 73, 1 => 1),
- array(0 => 73, 1 => 2), array(0 => 73, 1 => 2), array(0 => 73, 1 => 2),
- array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 1),
- array(0 => 73, 1 => 3), array(0 => 73, 1 => 2), array(0 => 73, 1 => 2),
- array(0 => 73, 1 => 1), array(0 => 73, 1 => 1), array(0 => 73, 1 => 3),
+ array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 4),
+ array(0 => 77, 1 => 1), array(0 => 77, 1 => 3), array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), array(0 => 76, 1 => 3),
array(0 => 73, 1 => 1), array(0 => 73, 1 => 1), array(0 => 73, 1 => 3),
- array(0 => 73, 1 => 1), array(0 => 73, 1 => 2), array(0 => 73, 1 => 1),
- array(0 => 73, 1 => 3), array(0 => 86, 1 => 1), array(0 => 86, 1 => 1),
- array(0 => 70, 1 => 1), array(0 => 70, 1 => 1), array(0 => 70, 1 => 3),
- array(0 => 70, 1 => 1), array(0 => 70, 1 => 3), array(0 => 70, 1 => 4),
- array(0 => 70, 1 => 3), array(0 => 70, 1 => 4), array(0 => 75, 1 => 2),
- array(0 => 75, 1 => 2), array(0 => 91, 1 => 2), array(0 => 91, 1 => 0),
- array(0 => 92, 1 => 2), array(0 => 92, 1 => 2), array(0 => 92, 1 => 4),
- array(0 => 92, 1 => 2), array(0 => 92, 1 => 2), array(0 => 92, 1 => 4),
- array(0 => 92, 1 => 3), array(0 => 92, 1 => 5), array(0 => 92, 1 => 3),
+ array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 1),
+ array(0 => 73, 1 => 2), array(0 => 73, 1 => 3), array(0 => 73, 1 => 2),
+ array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 3),
+ array(0 => 73, 1 => 3), array(0 => 82, 1 => 7), array(0 => 82, 1 => 7),
+ array(0 => 72, 1 => 1), array(0 => 72, 1 => 2), array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 2), array(0 => 72, 1 => 2), array(0 => 72, 1 => 1),
+ array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 2), array(0 => 72, 1 => 1), array(0 => 72, 1 => 1),
+ array(0 => 72, 1 => 3), array(0 => 72, 1 => 1), array(0 => 72, 1 => 1),
+ array(0 => 72, 1 => 3), array(0 => 72, 1 => 1), array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 86, 1 => 1),
+ array(0 => 86, 1 => 1), array(0 => 70, 1 => 1), array(0 => 70, 1 => 1),
+ array(0 => 70, 1 => 3), array(0 => 70, 1 => 1), array(0 => 70, 1 => 3),
+ array(0 => 70, 1 => 4), array(0 => 70, 1 => 3), array(0 => 70, 1 => 4),
+ array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 91, 1 => 2),
+ array(0 => 91, 1 => 0), array(0 => 92, 1 => 2), array(0 => 92, 1 => 2),
+ array(0 => 92, 1 => 4), array(0 => 92, 1 => 2), array(0 => 92, 1 => 2),
+ array(0 => 92, 1 => 4), array(0 => 92, 1 => 3), array(0 => 92, 1 => 5),
array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3),
- array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 2),
- array(0 => 79, 1 => 1), array(0 => 79, 1 => 1), array(0 => 79, 1 => 2),
- array(0 => 93, 1 => 1), array(0 => 93, 1 => 1), array(0 => 93, 1 => 3),
- array(0 => 90, 1 => 2), array(0 => 94, 1 => 1), array(0 => 94, 1 => 2),
- array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 5),
- array(0 => 95, 1 => 6), array(0 => 95, 1 => 2), array(0 => 87, 1 => 4),
- array(0 => 96, 1 => 4), array(0 => 96, 1 => 4), array(0 => 97, 1 => 3),
- array(0 => 97, 1 => 1), array(0 => 97, 1 => 0), array(0 => 71, 1 => 3),
- array(0 => 71, 1 => 2), array(0 => 98, 1 => 3), array(0 => 98, 1 => 2),
- array(0 => 80, 1 => 2), array(0 => 80, 1 => 0), array(0 => 99, 1 => 2),
- array(0 => 99, 1 => 2), array(0 => 89, 1 => 1), array(0 => 89, 1 => 2),
- array(0 => 89, 1 => 1), array(0 => 89, 1 => 2), array(0 => 89, 1 => 3),
- array(0 => 84, 1 => 1), array(0 => 84, 1 => 1), array(0 => 85, 1 => 1),
- array(0 => 83, 1 => 3), array(0 => 100, 1 => 1), array(0 => 100, 1 => 3),
- array(0 => 100, 1 => 0), array(0 => 101, 1 => 3), array(0 => 101, 1 => 3),
- array(0 => 101, 1 => 1), array(0 => 88, 1 => 2), array(0 => 88, 1 => 3),
- array(0 => 102, 1 => 2), array(0 => 102, 1 => 1), array(0 => 103, 1 => 3),
- array(0 => 103, 1 => 3), array(0 => 103, 1 => 1), array(0 => 103, 1 => 3),
- array(0 => 103, 1 => 3), array(0 => 103, 1 => 1), array(0 => 103, 1 => 1),);
+ array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3),
+ array(0 => 92, 1 => 2), array(0 => 79, 1 => 1), array(0 => 79, 1 => 1),
+ array(0 => 79, 1 => 2), array(0 => 93, 1 => 1), array(0 => 93, 1 => 1),
+ array(0 => 93, 1 => 3), array(0 => 90, 1 => 2), array(0 => 94, 1 => 1),
+ array(0 => 94, 1 => 2), array(0 => 95, 1 => 3), array(0 => 95, 1 => 3),
+ array(0 => 95, 1 => 5), array(0 => 95, 1 => 6), array(0 => 95, 1 => 2),
+ array(0 => 87, 1 => 4), array(0 => 96, 1 => 4), array(0 => 96, 1 => 4),
+ array(0 => 97, 1 => 3), array(0 => 97, 1 => 1), array(0 => 97, 1 => 0),
+ array(0 => 75, 1 => 3), array(0 => 75, 1 => 2), array(0 => 98, 1 => 3),
+ array(0 => 98, 1 => 2), array(0 => 80, 1 => 2), array(0 => 80, 1 => 0),
+ array(0 => 99, 1 => 2), array(0 => 99, 1 => 2), array(0 => 89, 1 => 1),
+ array(0 => 89, 1 => 2), array(0 => 89, 1 => 1), array(0 => 89, 1 => 2),
+ array(0 => 89, 1 => 3), array(0 => 84, 1 => 1), array(0 => 84, 1 => 1),
+ array(0 => 85, 1 => 1), array(0 => 83, 1 => 3), array(0 => 100, 1 => 1),
+ array(0 => 100, 1 => 3), array(0 => 100, 1 => 0), array(0 => 101, 1 => 3),
+ array(0 => 101, 1 => 3), array(0 => 101, 1 => 1), array(0 => 88, 1 => 2),
+ array(0 => 88, 1 => 3), array(0 => 102, 1 => 2), array(0 => 102, 1 => 1),
+ array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), array(0 => 103, 1 => 1),
+ array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), array(0 => 103, 1 => 1),
+ array(0 => 103, 1 => 1),);
public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9,
- 17 => 9, 18 => 9, 45 => 9, 68 => 9, 69 => 9, 77 => 9, 78 => 9, 82 => 9, 92 => 9,
- 97 => 9, 98 => 9, 103 => 9, 105 => 9, 106 => 9, 110 => 9, 112 => 9, 117 => 9,
- 178 => 9, 183 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14,
- 76 => 14, 15 => 15, 93 => 15, 95 => 15, 96 => 15, 124 => 15, 19 => 19, 20 => 20,
- 21 => 21, 24 => 21, 22 => 22, 25 => 22, 23 => 23, 26 => 23, 28 => 23, 27 => 27,
- 29 => 29, 30 => 29, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36,
- 37 => 37, 38 => 38, 39 => 39, 40 => 40, 42 => 40, 41 => 41, 43 => 43, 44 => 44,
- 46 => 46, 47 => 47, 48 => 48, 49 => 49, 51 => 49, 50 => 50, 52 => 50, 53 => 53,
- 54 => 54, 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 61 => 61,
- 62 => 62, 71 => 62, 159 => 62, 163 => 62, 167 => 62, 168 => 62, 63 => 63,
- 160 => 63, 166 => 63, 64 => 64, 65 => 65, 66 => 65, 67 => 67, 144 => 67,
- 70 => 70, 72 => 72, 73 => 73, 74 => 73, 75 => 75, 79 => 79, 80 => 80, 81 => 80,
- 83 => 83, 109 => 83, 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, 89 => 88,
- 90 => 90, 91 => 91, 94 => 94, 99 => 99, 100 => 100, 101 => 101, 102 => 102,
- 104 => 104, 107 => 107, 108 => 108, 111 => 111, 113 => 113, 114 => 114,
- 115 => 115, 116 => 116, 118 => 118, 119 => 119, 120 => 120, 121 => 121,
- 122 => 122, 123 => 123, 125 => 125, 180 => 125, 126 => 126, 127 => 127,
- 128 => 128, 129 => 129, 130 => 130, 131 => 131, 139 => 131, 132 => 132,
- 133 => 133, 134 => 134, 135 => 134, 137 => 134, 138 => 134, 136 => 136,
- 140 => 140, 141 => 141, 142 => 142, 184 => 142, 143 => 143, 145 => 145,
- 146 => 146, 147 => 147, 148 => 148, 149 => 149, 150 => 150, 151 => 151,
- 152 => 152, 153 => 153, 154 => 154, 155 => 155, 156 => 156, 157 => 157,
- 158 => 158, 161 => 161, 162 => 162, 164 => 164, 165 => 165, 169 => 169,
- 170 => 170, 171 => 171, 172 => 172, 173 => 173, 174 => 174, 175 => 175,
- 176 => 176, 177 => 177, 179 => 179, 181 => 181, 182 => 182, 185 => 185,
- 186 => 186, 187 => 187, 188 => 188, 189 => 188, 191 => 188, 190 => 190,
- 192 => 192, 193 => 193, 194 => 194,);
+ 17 => 9, 18 => 9, 43 => 9, 66 => 9, 67 => 9, 75 => 9, 76 => 9, 80 => 9, 90 => 9,
+ 95 => 9, 96 => 9, 101 => 9, 103 => 9, 104 => 9, 108 => 9, 110 => 9, 115 => 9,
+ 176 => 9, 181 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14,
+ 74 => 14, 15 => 15, 91 => 15, 93 => 15, 94 => 15, 122 => 15, 19 => 19, 20 => 20,
+ 21 => 21, 23 => 21, 25 => 21, 22 => 22, 24 => 22, 26 => 22, 27 => 27, 28 => 27,
+ 29 => 29, 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36,
+ 37 => 37, 38 => 38, 40 => 38, 39 => 39, 41 => 41, 42 => 42, 44 => 44, 45 => 45,
+ 46 => 46, 47 => 47, 49 => 47, 48 => 48, 50 => 48, 51 => 51, 52 => 52, 53 => 53,
+ 54 => 54, 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 69 => 60,
+ 157 => 60, 161 => 60, 165 => 60, 166 => 60, 61 => 61, 158 => 61, 164 => 61,
+ 62 => 62, 63 => 63, 64 => 63, 65 => 65, 142 => 65, 68 => 68, 70 => 70, 71 => 71,
+ 72 => 71, 73 => 73, 77 => 77, 78 => 78, 79 => 78, 81 => 81, 107 => 81, 82 => 82,
+ 83 => 83, 84 => 84, 85 => 85, 86 => 86, 87 => 86, 88 => 88, 89 => 89, 92 => 92,
+ 97 => 97, 98 => 98, 99 => 99, 100 => 100, 102 => 102, 105 => 105, 106 => 106,
+ 109 => 109, 111 => 111, 112 => 112, 113 => 113, 114 => 114, 116 => 116,
+ 117 => 117, 118 => 118, 119 => 119, 120 => 120, 121 => 121, 123 => 123,
+ 178 => 123, 124 => 124, 125 => 125, 126 => 126, 127 => 127, 128 => 128,
+ 129 => 129, 137 => 129, 130 => 130, 131 => 131, 132 => 132, 133 => 132,
+ 135 => 132, 136 => 132, 134 => 134, 138 => 138, 139 => 139, 140 => 140,
+ 182 => 140, 141 => 141, 143 => 143, 144 => 144, 145 => 145, 146 => 146,
+ 147 => 147, 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152,
+ 153 => 153, 154 => 154, 155 => 155, 156 => 156, 159 => 159, 160 => 160,
+ 162 => 162, 163 => 163, 167 => 167, 168 => 168, 169 => 169, 170 => 170,
+ 171 => 171, 172 => 172, 173 => 173, 174 => 174, 175 => 175, 177 => 177,
+ 179 => 179, 180 => 180, 183 => 183, 184 => 184, 185 => 185, 186 => 186,
+ 187 => 186, 189 => 186, 188 => 188, 190 => 190, 191 => 191, 192 => 192,);
#line 225 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r0()
@@ -1444,17 +1428,17 @@ class Smarty_Internal_Templateparser
#line 235 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r1()
{
- if ($this->yystack[$this->yyidx + 0]->minor != null) {
- $this->current_buffer->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor);
+ if ($this->yystack[ $this->yyidx + 0 ]->minor != null) {
+ $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
}
#line 242 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r2()
{
- if ($this->yystack[$this->yyidx + 0]->minor != null) {
+ if ($this->yystack[ $this->yyidx + 0 ]->minor != null) {
// because of possible code injection
- $this->current_buffer->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
}
@@ -1462,7 +1446,7 @@ class Smarty_Internal_Templateparser
function yy_r4()
{
if ($this->compiler->has_code) {
- $this->_retvalue = $this->mergePrefixCode($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor);
} else {
$this->_retvalue = null;
}
@@ -1473,14 +1457,14 @@ class Smarty_Internal_Templateparser
#line 267 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r5()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 271 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r6()
{
$code = $this->compiler->compileTag('private_php',
- array(array('code' => $this->yystack[$this->yyidx + 0]->minor),
+ array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor),
array('type' => $this->lex->phpType)), array());
if ($this->compiler->has_code && !empty($code)) {
$tmp = '';
@@ -1510,19 +1494,19 @@ class Smarty_Internal_Templateparser
#line 289 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r8()
{
- $this->_retvalue = $this->compiler->processText($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 293 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r9()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 297 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r10()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 302 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -1546,30 +1530,31 @@ class Smarty_Internal_Templateparser
#line 315 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r14()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
#line 319 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r15()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 335 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r19()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
#line 341 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r20()
{
- $var = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
- ' $');
+ $var =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
+ ' $');
if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) {
$this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'),
array('value' => $this->compiler->compileVariable('\'' .
- $match[1] .
+ $match[ 1 ] .
'\'')));
} else {
$this->_retvalue = $this->compiler->compileTag('private_print_expression', array(),
@@ -1583,71 +1568,51 @@ class Smarty_Internal_Templateparser
function yy_r21()
{
$this->_retvalue = $this->compiler->compileTag('private_print_expression', array(),
- array('value' => $this->yystack[$this->yyidx + 0]->minor));
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor));
}
#line 355 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r22()
{
$this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor,
- array('value' => $this->yystack[$this->yyidx + - 2]->minor,
- 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor));
- }
-
- #line 359 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r23()
- {
- $this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor,
- array('value' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor));
}
- #line 373 "../smarty/lexer/smarty_internal_templateparser.y"
+ #line 378 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r27()
{
- $this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor,
- array('value' => $this->yystack[$this->yyidx + - 2]->minor,
- 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx +
+ 0 ]->minor), array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'')));
}
#line 386 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r29()
{
$this->_retvalue = $this->compiler->compileTag('assign',
- array(array('value' => $this->yystack[$this->yyidx + 0]->minor),
- array('var' => '\'' .
- substr($this->yystack[$this->yyidx + - 2]->minor, 1) .
- '\'')));
+ array_merge(array(array('value' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor), array('var' => '\'' .
+ substr($this->yystack[ $this->yyidx + - 3 ]->minor, 1) .
+ '\'')), $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 394 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r31()
+ #line 390 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r30()
{
$this->_retvalue = $this->compiler->compileTag('assign',
- array_merge(array(array('value' => $this->yystack[$this->yyidx +
- - 1]->minor), array('var' => '\'' .
- substr($this->yystack[$this->yyidx + - 3]->minor, 1) .
- '\'')), $this->yystack[$this->yyidx + 0]->minor));
+ array_merge(array(array('value' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor), array('var' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor[ 'var' ])),
+ $this->yystack[ $this->yyidx + 0 ]->minor),
+ array('smarty_internal_index' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor[ 'smarty_internal_index' ]));
}
- #line 398 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r32()
- {
- $this->_retvalue = $this->compiler->compileTag('assign',
- array_merge(array(array('value' => $this->yystack[$this->yyidx +
- - 1]->minor), array('var' => $this->yystack[$this->yyidx +
- - 3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor),
- array('smarty_internal_index' => $this->yystack[$this->yyidx +
- - 3]->minor['smarty_internal_index']));
- }
-
- #line 403 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r33()
+ #line 395 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r31()
{
$tag =
- trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length));
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length));
if ($tag == 'strip') {
$this->strip = true;
$this->_retvalue = null;;
@@ -1660,7 +1625,7 @@ class Smarty_Internal_Templateparser
$this->compiler->compileTag('private_print_expression', array(), array('value' => $tag));
} else {
if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) {
- $this->_retvalue = $this->compiler->compileTag($match[1], array("'nocache'"));
+ $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'"));
} else {
$this->_retvalue = $this->compiler->compileTag($tag, array());
}
@@ -1668,199 +1633,200 @@ class Smarty_Internal_Templateparser
}
}
- #line 425 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r34()
+ #line 417 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r32()
{
- if (defined($this->yystack[$this->yyidx + - 1]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + - 1]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler);
}
$this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor,
- array('value' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor));
} else {
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor,
- $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor);
}
}
- #line 435 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r35()
+ #line 427 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r33()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
$this->_retvalue = $this->compiler->compileTag('private_print_expression', array(),
- array('value' => $this->yystack[$this->yyidx + 0]->minor));
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor));
} else {
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor, array());
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array());
}
}
- #line 448 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r36()
+ #line 440 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r34()
{
- if (defined($this->yystack[$this->yyidx + - 2]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + - 2]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler);
}
$this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor,
- array('value' => $this->yystack[$this->yyidx + - 2]->minor,
- 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor,
+ 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor));
} else {
$this->_retvalue = '<?php ob_start();?>' .
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor,
- $this->yystack[$this->yyidx + 0]->minor) . '<?php echo ';
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor) . '<?php echo ';
$this->_retvalue .= $this->compiler->compileTag('private_modifier', array(),
- array('modifierlist' => $this->yystack[$this->yyidx +
- - 1]->minor, 'value' => 'ob_get_clean()')) . ';?>';
+ array('modifierlist' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor, 'value' => 'ob_get_clean()')) . ';?>';
}
}
- #line 461 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r37()
+ #line 453 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r35()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor,
- $this->yystack[$this->yyidx + 0]->minor,
- array('object_method' => $this->yystack[$this->yyidx +
- - 1]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('object_method' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor));
}
- #line 466 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r38()
+ #line 458 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r36()
{
$this->_retvalue = '<?php ob_start();?>' .
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor,
- $this->yystack[$this->yyidx + 0]->minor,
- array('object_method' => $this->yystack[$this->yyidx + - 2]->minor)) .
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('object_method' => $this->yystack[ $this->yyidx + - 2 ]->minor)) .
'<?php echo ';
$this->_retvalue .= $this->compiler->compileTag('private_modifier', array(),
- array('modifierlist' => $this->yystack[$this->yyidx +
- - 1]->minor, 'value' => 'ob_get_clean()')) . ';?>';
+ array('modifierlist' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor, 'value' => 'ob_get_clean()')) . ';?>';
}
- #line 472 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r39()
+ #line 464 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r37()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length));
+ $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(),
- array('if condition' => $this->yystack[$this->yyidx +
- 0]->minor));
+ array('if condition' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
- #line 477 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r40()
+ #line 469 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r38()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor, $this->lex->ldel_length));
- $this->_retvalue =
- $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, $this->yystack[$this->yyidx + 0]->minor,
- array('if condition' => $this->yystack[$this->yyidx + - 1]->minor));
+ $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('if condition' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor));
}
- #line 482 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r41()
+ #line 474 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r39()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length));
+ $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(),
- array('if condition' => $this->yystack[$this->yyidx +
- 0]->minor));
+ array('if condition' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
- #line 493 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r43()
+ #line 485 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r41()
{
- $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor,
- array(array('start' => $this->yystack[$this->yyidx +
- - 6]->minor),
- array('ifexp' => $this->yystack[$this->yyidx +
- - 4]->minor),
- array('var' => $this->yystack[$this->yyidx +
- - 2]->minor),
- array('step' => $this->yystack[$this->yyidx +
- - 1]->minor))), 1);
+ $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('start' => $this->yystack[ $this->yyidx +
+ - 6 ]->minor),
+ array('ifexp' => $this->yystack[ $this->yyidx +
+ - 4 ]->minor),
+ array('var' => $this->yystack[ $this->yyidx +
+ - 2 ]->minor),
+ array('step' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor))), 1);
}
- #line 497 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r44()
+ #line 489 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r42()
{
- $this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 505 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r46()
+ #line 497 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r44()
{
- $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor,
- array(array('start' => $this->yystack[$this->yyidx +
- - 3]->minor),
- array('to' => $this->yystack[$this->yyidx +
- - 1]->minor))), 0);
+ $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('start' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),
+ array('to' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor))), 0);
}
- #line 509 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r47()
+ #line 501 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r45()
{
- $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor,
- array(array('start' => $this->yystack[$this->yyidx +
- - 5]->minor),
- array('to' => $this->yystack[$this->yyidx +
- - 3]->minor),
- array('step' => $this->yystack[$this->yyidx +
- - 1]->minor))), 0);
+ $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('start' => $this->yystack[ $this->yyidx +
+ - 5 ]->minor),
+ array('to' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),
+ array('step' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor))), 0);
}
- #line 514 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r48()
+ #line 506 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r46()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 519 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r49()
+ #line 511 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r47()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor,
- array(array('from' => $this->yystack[$this->yyidx +
- - 3]->minor),
- array('item' => $this->yystack[$this->yyidx +
- - 1]->minor))));
+ $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('from' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),
+ array('item' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor))));
}
- #line 523 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r50()
+ #line 515 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r48()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor,
- array(array('from' => $this->yystack[$this->yyidx +
- - 5]->minor),
- array('item' => $this->yystack[$this->yyidx +
- - 1]->minor),
- array('key' => $this->yystack[$this->yyidx +
- - 3]->minor))));
+ $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('from' => $this->yystack[ $this->yyidx +
+ - 5 ]->minor),
+ array('item' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),
+ array('key' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor))));
}
- #line 536 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r53()
+ #line 528 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r51()
{
$this->_retvalue = $this->compiler->compileTag('setfilter', array(),
- array('modifier_list' => array(array_merge(array($this->yystack[$this->yyidx +
- - 1]->minor), $this->yystack[$this->yyidx + 0]->minor))));
+ array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx +
+ - 1 ]->minor), $this->yystack[ $this->yyidx + 0 ]->minor))));
}
- #line 540 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r54()
+ #line 532 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r52()
{
$this->_retvalue = $this->compiler->compileTag('setfilter', array(),
- array('modifier_list' => array_merge(array(array_merge(array($this->yystack[$this->yyidx +
- - 2]->minor), $this->yystack[$this->yyidx + - 1]->minor)),
- $this->yystack[$this->yyidx +
- 0]->minor)));
+ array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx +
+ - 2 ]->minor), $this->yystack[ $this->yyidx + - 1 ]->minor)),
+ $this->yystack[ $this->yyidx +
+ 0 ]->minor)));
}
- #line 545 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r55()
+ #line 537 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r53()
{
- $j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.');
- if ($this->yystack[$this->yyidx + 0]->minor[$j + 1] == 'c') {
+ $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.');
+ if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') {
// {$smarty.block.child}
$this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler);
} else {
@@ -1869,11 +1835,12 @@ class Smarty_Internal_Templateparser
}
}
- #line 558 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r56()
+ #line 550 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r54()
{
- $tag = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
- ' /');
+ $tag =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
+ ' /');
if ($tag == 'strip') {
$this->strip = false;
$this->_retvalue = null;
@@ -1882,574 +1849,582 @@ class Smarty_Internal_Templateparser
}
}
- #line 567 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r57()
+ #line 559 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r55()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor . 'close', array());
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array());
}
- #line 571 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r58()
+ #line 563 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r56()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor . 'close', array(),
- array('modifier_list' => $this->yystack[$this->yyidx +
- 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(),
+ array('modifier_list' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
- #line 576 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r59()
+ #line 568 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r57()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor . 'close', array(),
- array('object_method' => $this->yystack[$this->yyidx +
- 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(),
+ array('object_method' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
- #line 580 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r60()
+ #line 572 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r58()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor . 'close', array(),
- array('object_method' => $this->yystack[$this->yyidx +
- - 1]->minor, 'modifier_list' => $this->yystack[$this->yyidx +
- 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(),
+ array('object_method' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor, 'modifier_list' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
- #line 588 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r61()
+ #line 580 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r59()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
- $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
+ $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 594 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r62()
+ #line 586 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r60()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 599 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r63()
+ #line 591 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r61()
{
$this->_retvalue = array();
}
- #line 604 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r64()
+ #line 596 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r62()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor);
+ array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
} else {
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 2]->minor => '\'' . $this->yystack[$this->yyidx + 0]->minor .
+ array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor .
'\'');
}
}
+ #line 607 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r63()
+ {
+ $this->_retvalue =
+ array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx +
+ 0 ]->minor);
+ }
+
#line 615 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r65()
{
- $this->_retvalue =
- array(trim($this->yystack[$this->yyidx + - 1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx +
- 0]->minor);
+ $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
}
- #line 623 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r67()
+ #line 627 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r68()
{
- $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\'';
+ $this->_retvalue =
+ array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 635 "../smarty/lexer/smarty_internal_templateparser.y"
+ #line 640 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r70()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor);
+ $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor;
}
- #line 648 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r72()
+ #line 645 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r71()
{
- $this->yystack[$this->yyidx + - 2]->minor[] = $this->yystack[$this->yyidx + 0]->minor;
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor;
+ $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'',
+ 'value' => $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 653 "../smarty/lexer/smarty_internal_templateparser.y"
+ #line 652 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r73()
{
- $this->_retvalue = array('var' => '\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'',
- 'value' => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor,
+ 'value' => $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 660 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r75()
+ #line 676 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r77()
{
- $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 2]->minor,
- 'value' => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . '\')';
}
- #line 684 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r79()
+ #line 681 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r78()
{
$this->_retvalue =
- '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '://' .
- $this->yystack[$this->yyidx + 0]->minor . '\')';
+ $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
+ }
+
+ #line 695 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r81()
+ {
+ $this->_retvalue = $this->compiler->compileTag('private_modifier', array(),
+ array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor,
+ 'modifierlist' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
- #line 689 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r80()
+ #line 701 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r82()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . trim($this->yystack[$this->yyidx + - 1]->minor) .
- $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = (isset($this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ]) ?
+ $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] : '') .
+ $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ (isset($this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ]) ? ')' : '');
}
- #line 703 "../smarty/lexer/smarty_internal_templateparser.y"
+ #line 704 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r83()
{
- $this->_retvalue = $this->compiler->compileTag('private_modifier', array(),
- array('value' => $this->yystack[$this->yyidx + - 1]->minor,
- 'modifierlist' => $this->yystack[$this->yyidx +
- 0]->minor));
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')';
}
- #line 709 "../smarty/lexer/smarty_internal_templateparser.y"
+ #line 708 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r84()
{
- $this->_retvalue = (isset($this->yystack[$this->yyidx + - 1]->minor['pre']) ?
- $this->yystack[$this->yyidx + - 1]->minor['pre'] : '') . $this->yystack[$this->yyidx + - 2]->minor .
- $this->yystack[$this->yyidx + - 1]->minor['op'] . $this->yystack[$this->yyidx + 0]->minor .
- (isset($this->yystack[$this->yyidx + - 1]->minor['pre']) ? ')' : '');
+ $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ')';
}
#line 712 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r85()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ')';
}
#line 716 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r86()
{
- $this->_retvalue =
- 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor .
- ')';
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 720 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r87()
+ #line 728 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r88()
{
- $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',(array)' .
- $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' .
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'') .
+ ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 724 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r88()
+ #line 732 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r89()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor .
- $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 736 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r90()
+ #line 747 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r92()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 5]->minor . ' ? ' .
- $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'') .
- ' : ' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 740 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r91()
+ #line 768 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r97()
{
$this->_retvalue =
- $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' .
- $this->yystack[$this->yyidx + 0]->minor;
+ $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 755 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r94()
+ #line 772 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r98()
{
- $this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.';
}
#line 776 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r99()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 780 "../smarty/lexer/smarty_internal_templateparser.y"
+ #line 781 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r100()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.';
- }
-
- #line 784 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r101()
- {
- $this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor;
- }
-
- #line 789 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r102()
- {
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
} else {
- $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\'';
+ $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
}
}
- #line 806 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r104()
+ #line 798 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r102()
{
- $this->_retvalue = "(" . $this->yystack[$this->yyidx + - 1]->minor . ")";
+ $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")";
}
- #line 821 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r107()
+ #line 813 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r105()
{
self::$prefix_number ++;
- if ($this->yystack[$this->yyidx + - 2]->minor['var'] == '\'smarty\'') {
+ if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') {
$this->compiler->prefix_code[] = '<?php $_tmp' . self::$prefix_number . ' = ' .
$this->compiler->compileTag('private_special_variable', array(),
- $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index']) . ';?>';
+ $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ]) .
+ ';?>';
} else {
$this->compiler->prefix_code[] = '<?php $_tmp' . self::$prefix_number . ' = ' .
- $this->compiler->compileVariable($this->yystack[$this->yyidx + - 2]->minor['var']) .
- $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index'] . ';?>';
+ $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] . ';?>';
}
- $this->_retvalue = '$_tmp' . self::$prefix_number . '::' . $this->yystack[$this->yyidx + 0]->minor[0] .
- $this->yystack[$this->yyidx + 0]->minor[1];
+ $this->_retvalue = '$_tmp' . self::$prefix_number . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
}
- #line 832 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r108()
+ #line 824 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r106()
{
self::$prefix_number ++;
- $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[$this->yyidx + 0]->minor);
+ $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor);
$this->compiler->prefix_code[] =
$this->compiler->appendCode($tmp, '<?php $_tmp' . self::$prefix_number . '=ob_get_clean();?>');
$this->_retvalue = '$_tmp' . self::$prefix_number;
}
- #line 849 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r111()
+ #line 841 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r109()
{
- if (!in_array(strtolower($this->yystack[$this->yyidx + - 2]->minor), array('self', 'parent')) &&
- (!$this->security || $this->security->isTrustedStaticClassAccess($this->yystack[$this->yyidx + - 2]->minor,
- $this->yystack[$this->yyidx + 0]->minor,
- $this->compiler))
+ if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent')) &&
+ (!$this->security ||
+ $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler))
) {
- if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor])) {
- $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor] . '::' .
- $this->yystack[$this->yyidx + 0]->minor[0] . $this->yystack[$this->yyidx + 0]->minor[1];
- } else {
+ if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) {
$this->_retvalue =
- $this->yystack[$this->yyidx + - 2]->minor . '::' . $this->yystack[$this->yyidx + 0]->minor[0] .
- $this->yystack[$this->yyidx + 0]->minor[1];
+ $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
+ } else {
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
}
} else {
- $this->compiler->trigger_template_error("static class '" . $this->yystack[$this->yyidx + - 2]->minor .
+ $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor .
"' is undefined or not allowed by security setting");
}
}
- #line 868 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r113()
+ #line 860 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r111()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 879 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r114()
+ #line 871 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r112()
{
$this->_retvalue =
- $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'');
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'');
}
- #line 882 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r115()
+ #line 874 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r113()
{
- if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') {
+ if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') {
$smarty_var = $this->compiler->compileTag('private_special_variable', array(),
- $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);
+ $this->yystack[ $this->yyidx +
+ 0 ]->minor[ 'smarty_internal_index' ]);
$this->_retvalue = $smarty_var;
} else {
// used for array reset,next,prev,end,current
- $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var'];
- $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
- $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) .
- $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ];
+ $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
+ $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
}
}
- #line 895 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r116()
+ #line 887 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r114()
{
- $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[$this->yyidx + - 2]->minor . ']->' .
- $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 905 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r118()
+ #line 897 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r116()
{
$this->_retvalue =
- $this->compiler->compileConfigVariable("'" . $this->yystack[$this->yyidx + - 1]->minor . "'");
+ $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'");
}
- #line 909 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r119()
+ #line 901 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r117()
{
$this->_retvalue = '(is_array($tmp = ' .
- $this->compiler->compileConfigVariable("'" . $this->yystack[$this->yyidx + - 2]->minor . "'") . ') ? $tmp' .
- $this->yystack[$this->yyidx + 0]->minor . ' :null)';
+ $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor . "'") .
+ ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)';
}
- #line 913 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r120()
+ #line 905 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r118()
{
- $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + - 1]->minor);
+ $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor);
}
- #line 917 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r121()
+ #line 909 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r119()
{
$this->_retvalue =
- '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + - 2]->minor) .
- ') ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' : null)';
+ '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) .
+ ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)';
}
- #line 921 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r122()
+ #line 913 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r120()
{
- $this->_retvalue = array('var' => '\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'',
- 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'',
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 924 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r123()
+ #line 916 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r121()
{
- $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 1]->minor,
- 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor,
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 937 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r125()
+ #line 929 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r123()
{
return;
}
- #line 943 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r126()
+ #line 935 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r124()
{
$this->_retvalue =
- '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'') .
+ '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') .
']';
}
- #line 946 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r127()
+ #line 938 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r125()
{
- $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']';
+ $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']';
}
- #line 950 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r128()
+ #line 942 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r126()
{
- $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' .
- $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ']';
}
- #line 954 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r129()
+ #line 946 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r127()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']';
} else {
- $this->_retvalue = "['" . $this->yystack[$this->yyidx + 0]->minor . "']";
+ $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']";
}
}
- #line 965 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r130()
+ #line 957 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r128()
{
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']';
}
- #line 970 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r131()
+ #line 962 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r129()
{
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']';
}
- #line 975 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r132()
+ #line 967 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r130()
{
$this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' .
- $this->yystack[$this->yyidx +
- - 1]->minor . '\'][\'index\']') .
- ']';
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor .
+ '\'][\'index\']') . ']';
}
- #line 979 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r133()
+ #line 971 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r131()
{
$this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' .
- $this->yystack[$this->yyidx +
- - 3]->minor . '\'][\'' .
- $this->yystack[$this->yyidx +
- - 1]->minor . '\']') . ']';
+ $this->yystack[ $this->yyidx +
+ - 3 ]->minor . '\'][\'' .
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor . '\']') . ']';
}
- #line 982 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r134()
+ #line 974 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r132()
{
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']';
}
- #line 988 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r136()
+ #line 980 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r134()
{
- $this->_retvalue =
- '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'') .
+ $this->_retvalue = '[' .
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'') .
']';;
}
- #line 1004 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r140()
+ #line 996 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r138()
{
$this->_retvalue = '[]';
}
- #line 1014 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r141()
+ #line 1006 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r139()
{
- $this->_retvalue = '\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'';
+ $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'';
}
- #line 1018 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r142()
+ #line 1010 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r140()
{
$this->_retvalue = "''";
}
- #line 1023 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r143()
+ #line 1015 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r141()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1031 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r145()
+ #line 1023 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r143()
{
- $var = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
- ' $');
+ $var =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
+ ' $');
$this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\'');
}
- #line 1037 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r146()
+ #line 1029 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r144()
{
- $this->_retvalue = '(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')';
}
- #line 1044 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r147()
+ #line 1036 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r145()
{
- if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\'smarty\'') {
+ if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') {
$this->_retvalue = $this->compiler->compileTag('private_special_variable', array(),
- $this->yystack[$this->yyidx +
- - 1]->minor['smarty_internal_index']) .
- $this->yystack[$this->yyidx + 0]->minor;
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor[ 'smarty_internal_index' ]) .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
} else {
- $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) .
- $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] .
- $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
}
- #line 1053 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r148()
+ #line 1045 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r146()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1058 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r149()
+ #line 1050 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r147()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1063 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r150()
+ #line 1055 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r148()
{
- if ($this->security && substr($this->yystack[$this->yyidx + - 1]->minor, 0, 1) == '_') {
+ if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') {
$this->compiler->trigger_template_error(self::Err1);
}
- $this->_retvalue = '->' . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1070 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r151()
+ #line 1062 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r149()
{
if ($this->security) {
$this->compiler->trigger_template_error(self::Err2);
}
- $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor) .
- $this->yystack[$this->yyidx + 0]->minor . '}';
+ $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) .
+ $this->yystack[ $this->yyidx + 0 ]->minor . '}';
}
- #line 1077 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r152()
+ #line 1069 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r150()
{
if ($this->security) {
$this->compiler->trigger_template_error(self::Err2);
}
$this->_retvalue =
- '->{' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
+ '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}';
}
- #line 1084 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r153()
+ #line 1076 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r151()
{
if ($this->security) {
$this->compiler->trigger_template_error(self::Err2);
}
- $this->_retvalue =
- '->{\'' . $this->yystack[$this->yyidx + - 4]->minor . '\'.' . $this->yystack[$this->yyidx + - 2]->minor .
- $this->yystack[$this->yyidx + 0]->minor . '}';
+ $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' .
+ $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}';
}
- #line 1092 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r154()
+ #line 1084 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r152()
{
- $this->_retvalue = '->' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1100 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r155()
+ #line 1092 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r153()
{
if (!$this->security ||
- $this->security->isTrustedPhpFunction($this->yystack[$this->yyidx + - 3]->minor, $this->compiler)
+ $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler)
) {
- if (strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'isset') === 0 ||
- strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'empty') === 0 ||
- strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'array') === 0 ||
- is_callable($this->yystack[$this->yyidx + - 3]->minor)
+ if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 ||
+ strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 ||
+ strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 ||
+ is_callable($this->yystack[ $this->yyidx + - 3 ]->minor)
) {
- $func_name = strtolower($this->yystack[$this->yyidx + - 3]->minor);
+ $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor);
if ($func_name == 'isset') {
- if (count($this->yystack[$this->yyidx + - 1]->minor) == 0) {
+ if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) {
$this->compiler->trigger_template_error('Illegal number of paramer in "isset()"');
}
- $par = implode(',', $this->yystack[$this->yyidx + - 1]->minor);
+ $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor);
if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable',
strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0
) {
@@ -2460,131 +2435,130 @@ class Smarty_Internal_Templateparser
} else {
$isset_par = str_replace("')->value", "',null,true,false)->value", $par);
}
- $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . $isset_par . ")";
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")";
} elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) {
- if (count($this->yystack[$this->yyidx + - 1]->minor) != 1) {
+ if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) {
$this->compiler->trigger_template_error('Illegal number of paramer in "empty()"');
}
if ($func_name == 'empty') {
$this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value",
- $this->yystack[$this->yyidx +
- - 1]->minor[0]) . ')';
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor[ 0 ]) . ')';
} else {
- $this->_retvalue = $func_name . '(' . $this->yystack[$this->yyidx + - 1]->minor[0] . ')';
+ $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')';
}
} else {
- $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" .
- implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")";
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" .
+ implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")";
}
} else {
$this->compiler->trigger_template_error("unknown function \"" .
- $this->yystack[$this->yyidx + - 3]->minor . "\"");
+ $this->yystack[ $this->yyidx + - 3 ]->minor . "\"");
}
}
}
- #line 1139 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r156()
+ #line 1131 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r154()
{
- if ($this->security && substr($this->yystack[$this->yyidx + - 3]->minor, 0, 1) == '_') {
+ if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') {
$this->compiler->trigger_template_error(self::Err1);
}
- $this->_retvalue =
- $this->yystack[$this->yyidx + - 3]->minor . "(" . implode(',', $this->yystack[$this->yyidx + - 1]->minor) .
- ")";
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" .
+ implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")";
}
- #line 1146 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r157()
+ #line 1138 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r155()
{
if ($this->security) {
$this->compiler->trigger_template_error(self::Err2);
}
self::$prefix_number ++;
$this->compiler->prefix_code[] = '<?php $_tmp' . self::$prefix_number . '=' .
- $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 3]->minor, 1) . '\'') .
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + - 3 ]->minor, 1) . '\'') .
';?>';
$this->_retvalue =
- '$_tmp' . self::$prefix_number . '(' . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ')';
+ '$_tmp' . self::$prefix_number . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')';
}
- #line 1157 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r158()
+ #line 1149 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r156()
{
$this->_retvalue =
- array_merge($this->yystack[$this->yyidx + - 2]->minor, array($this->yystack[$this->yyidx + 0]->minor));
+ array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 1174 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r161()
+ #line 1166 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r159()
{
- $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 2]->minor,
- array(array_merge($this->yystack[$this->yyidx + - 1]->minor,
- $this->yystack[$this->yyidx + 0]->minor)));
+ $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor,
+ array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor)));
}
- #line 1178 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r162()
+ #line 1170 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r160()
{
$this->_retvalue =
- array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor));
+ array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 1186 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r164()
+ #line 1178 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r162()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 1194 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r165()
+ #line 1186 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r163()
{
$this->_retvalue =
- array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 1213 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r169()
+ #line 1205 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r167()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '', 'method');
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method');
}
- #line 1218 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r170()
+ #line 1210 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r168()
{
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'method');
+ array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method');
}
- #line 1223 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r171()
+ #line 1215 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r169()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '');
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '');
}
- #line 1228 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r172()
+ #line 1220 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r170()
{
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'property');
+ array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property');
}
- #line 1233 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r173()
+ #line 1225 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r171()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor,
- $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor,
- 'property');
+ $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor,
+ $this->yystack[ $this->yyidx + - 1 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor, 'property');
}
- #line 1239 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r174()
+ #line 1231 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r172()
{
- $this->_retvalue['op'] = ' ' . trim($this->yystack[$this->yyidx + 0]->minor) . ' ';
+ $this->_retvalue[ 'op' ] = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' ';
}
- #line 1243 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r175()
+ #line 1235 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r173()
{
static $lops = array('eq' => array('op' => ' == ', 'pre' => null),
'ne' => array('op' => ' != ', 'pre' => null),
@@ -2605,94 +2579,96 @@ class Smarty_Internal_Templateparser
'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),);
- $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor));
- $this->_retvalue = $lops[$op];
+ $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $lops[ $op ];
}
- #line 1269 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r176()
+ #line 1261 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r174()
{
- static $scond = array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ',
- 'isnotodd' => '!(1 & ',);
- $op = strtolower(str_replace(' ', '', $this->yystack[$this->yyidx + 0]->minor));
- $this->_retvalue = $scond[$op];
+ static $scond =
+ array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',);
+ $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $scond[ $op ];
+ }
+
+ #line 1275 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r175()
+ {
+ $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')';
}
#line 1283 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r177()
{
- $this->_retvalue = 'array(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1291 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r179()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1299 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r181()
+ #line 1295 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r180()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '=>' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 1303 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r182()
+ #line 1311 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r183()
{
- $this->_retvalue =
- '\'' . $this->yystack[$this->yyidx + - 2]->minor . '\'=>' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this);
}
- #line 1319 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r185()
+ #line 1316 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r184()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor->to_smarty_php($this);
+ $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
- #line 1324 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r186()
+ #line 1321 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r185()
{
- $this->yystack[$this->yyidx + - 1]->minor->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor);
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 1329 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r187()
+ #line 1325 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r186()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor);
}
#line 1333 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r188()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[$this->yyidx + - 1]->minor);
- }
-
- #line 1341 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r190()
- {
$this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' .
- substr($this->yystack[$this->yyidx + 0]->minor, 1) .
+ substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) .
'\']->value');
}
- #line 1349 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r192()
+ #line 1341 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r190()
{
$this->_retvalue =
- new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[$this->yyidx + - 1]->minor . ')');
+ new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')');
}
- #line 1353 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r193()
+ #line 1345 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r191()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 1357 "../smarty/lexer/smarty_internal_templateparser.y"
- function yy_r194()
+ #line 1349 "../smarty/lexer/smarty_internal_templateparser.y"
+ function yy_r192()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor);
}
private $_retvalue;
@@ -2701,24 +2677,24 @@ class Smarty_Internal_Templateparser
{
if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) {
fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno,
- self::$yyRuleName[$yyruleno]);
+ self::$yyRuleName[ $yyruleno ]);
}
$this->_retvalue = $yy_lefthand_side = null;
- if (isset(self::$yyReduceMap[$yyruleno])) {
+ if (isset(self::$yyReduceMap[ $yyruleno ])) {
// call the action
$this->_retvalue = null;
- $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}();
$yy_lefthand_side = $this->_retvalue;
}
- $yygoto = self::$yyRuleInfo[$yyruleno][0];
- $yysize = self::$yyRuleInfo[$yyruleno][1];
+ $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ];
$this->yyidx -= $yysize;
for ($i = $yysize; $i; $i --) {
// pop all of the right-hand side parameters
array_pop($this->yystack);
}
- $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto);
if ($yyact < self::YYNSTATE) {
if (!$this->yyTraceFILE && $yysize) {
$this->yyidx ++;
@@ -2726,7 +2702,7 @@ class Smarty_Internal_Templateparser
$x->stateno = $yyact;
$x->major = $yygoto;
$x->minor = $yy_lefthand_side;
- $this->yystack[$this->yyidx] = $x;
+ $this->yystack[ $this->yyidx ] = $x;
} else {
$this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
}
@@ -2785,7 +2761,7 @@ class Smarty_Internal_Templateparser
$yyendofinput = ($yymajor == 0);
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]);
}
do {
@@ -2812,11 +2788,11 @@ class Smarty_Internal_Templateparser
if ($this->yyerrcnt < 0) {
$this->yy_syntax_error($yymajor, $yytokenvalue);
}
- $yymx = $this->yystack[$this->yyidx]->major;
+ $yymx = $this->yystack[ $this->yyidx ]->major;
if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) {
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt,
- $this->yyTokenName[$yymajor]);
+ $this->yyTokenName[ $yymajor ]);
}
$this->yy_destructor($yymajor, $yytokenvalue);
$yymajor = self::YYNOCODE;
diff --git a/library/Smarty/libs/sysplugins/smarty_resource.php b/library/Smarty/libs/sysplugins/smarty_resource.php
index 72611255e..93d9fa7a3 100644
--- a/library/Smarty/libs/sysplugins/smarty_resource.php
+++ b/library/Smarty/libs/sysplugins/smarty_resource.php
@@ -240,6 +240,16 @@ abstract class Smarty_Resource
return $resource->buildUniqueResourceName($smarty, $name);
}
+ /*
+ * Check if resource must check time stamps when when loading complied or cached templates.
+ * Resources like 'extends' which use source components my disable timestamp checks on own resource.
+ *
+ * @return bool
+ */
+ public function checkTimestamps() {
+ return true;
+ }
+
/**
* initialize Source Object for given resource
* wrapper for backward compatibility to versions < 3.1.22
diff --git a/library/Smarty/libs/sysplugins/smarty_template_resource_base.php b/library/Smarty/libs/sysplugins/smarty_template_resource_base.php
index b9e2e2830..0911feb8d 100644
--- a/library/Smarty/libs/sysplugins/smarty_template_resource_base.php
+++ b/library/Smarty/libs/sysplugins/smarty_template_resource_base.php
@@ -80,13 +80,6 @@ abstract class Smarty_Template_Resource_Base
public $required_plugins = array();
/**
- * Known template functions
- *
- * @var array
- */
- public $tpl_function = array();
-
- /**
* Included subtemplates
*
* @var array
diff --git a/library/jquery-textcomplete/jquery.textcomplete.js b/library/jquery-textcomplete/jquery.textcomplete.js
index 3df84f3b4..95e75149c 100644
--- a/library/jquery-textcomplete/jquery.textcomplete.js
+++ b/library/jquery-textcomplete/jquery.textcomplete.js
@@ -1,3 +1,16 @@
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === "object" && module.exports) {
+ var $ = require('jquery');
+ module.exports = factory($);
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function (jQuery) {
+
/*!
* jQuery.textcomplete
*
@@ -17,13 +30,18 @@ if (typeof jQuery === 'undefined') {
if (console.warn) { console.warn(message); }
};
+ var id = 1;
+
$.fn.textcomplete = function (strategies, option) {
var args = Array.prototype.slice.call(arguments);
return this.each(function () {
+ var self = this;
var $this = $(this);
var completer = $this.data('textComplete');
if (!completer) {
- completer = new $.fn.textcomplete.Completer(this, option || {});
+ option || (option = {});
+ option._oid = id++; // unique object id
+ completer = new $.fn.textcomplete.Completer(this, option);
$this.data('textComplete', completer);
}
if (typeof strategies === 'string') {
@@ -45,7 +63,10 @@ if (typeof jQuery === 'undefined') {
}
});
});
- completer.register($.fn.textcomplete.Strategy.parse(strategies));
+ completer.register($.fn.textcomplete.Strategy.parse(strategies, {
+ el: self,
+ $el: $this
+ }));
}
});
};
@@ -115,6 +136,10 @@ if (typeof jQuery === 'undefined') {
return Object.prototype.toString.call(obj) === '[object String]';
};
+ var isFunction = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object Function]';
+ };
+
var uniqueId = 0;
function Completer(element, option) {
@@ -124,7 +149,7 @@ if (typeof jQuery === 'undefined') {
this.views = [];
this.option = $.extend({}, Completer._getDefaults(), option);
- if (!this.$el.is('input[type=text]') && !this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') {
+ if (!this.$el.is('input[type=text]') && !this.$el.is('input[type=search]') && !this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') {
throw new Error('textcomplete must be called on a Textarea or a ContentEditable.');
}
@@ -171,7 +196,7 @@ if (typeof jQuery === 'undefined') {
if (this.option.adapter) {
Adapter = this.option.adapter;
} else {
- if (this.$el.is('textarea') || this.$el.is('input[type=text]')) {
+ if (this.$el.is('textarea') || this.$el.is('input[type=text]') || this.$el.is('input[type=search]')) {
viewName = typeof element.selectionEnd === 'number' ? 'Textarea' : 'IETextarea';
} else {
viewName = 'ContentEditable';
@@ -192,6 +217,12 @@ if (typeof jQuery === 'undefined') {
this.$el = this.adapter = this.dropdown = null;
},
+ deactivate: function () {
+ if (this.dropdown) {
+ this.dropdown.deactivate();
+ }
+ },
+
// Invoke textcomplete.
trigger: function (text, skipUnchangedTerm) {
if (!this.dropdown) { this.initialize(); }
@@ -200,7 +231,7 @@ if (typeof jQuery === 'undefined') {
if (searchQuery.length) {
var term = searchQuery[1];
// Ignore shift-key, ctrl-key and so on.
- if (skipUnchangedTerm && this._term === term) { return; }
+ if (skipUnchangedTerm && this._term === term && term !== "") { return; }
this._term = term;
this._search.apply(this, searchQuery);
} else {
@@ -224,8 +255,10 @@ if (typeof jQuery === 'undefined') {
//
// value - The selected element of the array callbacked from search func.
// strategy - The Strategy object.
- select: function (value, strategy) {
- this.adapter.select(value, strategy);
+ // e - Click or keydown event object.
+ select: function (value, strategy, e) {
+ this._term = null;
+ this.adapter.select(value, strategy, e);
this.fire('change').fire('textComplete:select', value, strategy);
this.adapter.focus();
},
@@ -248,8 +281,9 @@ if (typeof jQuery === 'undefined') {
var strategy = this.strategies[i];
var context = strategy.context(text);
if (context || context === '') {
+ var matchRegexp = isFunction(strategy.match) ? strategy.match(text) : strategy.match;
if (isString(context)) { text = context; }
- var match = text.match(strategy.match);
+ var match = text.match(matchRegexp);
if (match) { return [strategy, match[strategy.index], match]; }
}
}
@@ -262,14 +296,14 @@ if (typeof jQuery === 'undefined') {
strategy.search(term, function (data, stillSearching) {
if (!self.dropdown.shown) {
self.dropdown.activate();
- self.dropdown.setPosition(self.adapter.getCaretPosition());
}
if (self._clearAtNext) {
// The first callback in the current lock.
self.dropdown.clear();
self._clearAtNext = false;
}
- self.dropdown.render(self._zip(data, strategy));
+ self.dropdown.setPosition(self.adapter.getCaretPosition());
+ self.dropdown.render(self._zip(data, strategy, term));
if (!stillSearching) {
// The last callback in the current lock.
free();
@@ -284,9 +318,9 @@ if (typeof jQuery === 'undefined') {
//
// this._zip(['a', 'b'], 's');
// //=> [{ value: 'a', strategy: 's' }, { value: 'b', strategy: 's' }]
- _zip: function (data, strategy) {
+ _zip: function (data, strategy, term) {
return $.map(data, function (value) {
- return { value: value, strategy: strategy };
+ return { value: value, strategy: strategy, term: term };
});
}
});
@@ -297,6 +331,8 @@ if (typeof jQuery === 'undefined') {
+function ($) {
'use strict';
+ var $window = $(window);
+
var include = function (zippedData, datum) {
var i, elem;
var idProperty = datum.strategy.idProperty
@@ -320,6 +356,16 @@ if (typeof jQuery === 'undefined') {
});
});
+ var commands = {
+ SKIP_DEFAULT: 0,
+ KEY_UP: 1,
+ KEY_DOWN: 2,
+ KEY_ENTER: 3,
+ KEY_PAGEUP: 4,
+ KEY_PAGEDOWN: 5,
+ KEY_ESCAPE: 6
+ };
+
// Dropdown view
// =============
@@ -327,7 +373,7 @@ if (typeof jQuery === 'undefined') {
//
// element - Textarea or contenteditable element.
function Dropdown(element, completer, option) {
- this.$el = Dropdown.findOrCreateElement(option);
+ this.$el = Dropdown.createElement(option);
this.completer = completer;
this.id = completer.id + 'dropdown';
this._data = []; // zipped data.
@@ -338,7 +384,7 @@ if (typeof jQuery === 'undefined') {
if (option.listPosition) { this.setPosition = option.listPosition; }
if (option.height) { this.$el.height(option.height); }
var self = this;
- $.each(['maxCount', 'placement', 'footer', 'header', 'className'], function (_i, name) {
+ $.each(['maxCount', 'placement', 'footer', 'header', 'noResultsMessage', 'className'], function (_i, name) {
if (option[name] != null) { self[name] = option[name]; }
});
this._bindEvents(element);
@@ -349,18 +395,19 @@ if (typeof jQuery === 'undefined') {
// Class methods
// -------------
- findOrCreateElement: function (option) {
+ createElement: function (option) {
var $parent = option.appendTo;
if (!($parent instanceof $)) { $parent = $($parent); }
- var $el = $parent.children('.dropdown-menu')
- if (!$el.length) {
- $el = $('<ul class="dropdown-menu"></ul>').css({
+ var $el = $('<ul></ul>')
+ .addClass('dropdown-menu textcomplete-dropdown')
+ .attr('id', 'textcomplete-dropdown-' + option._oid)
+ .css({
display: 'none',
left: 0,
position: 'absolute',
zIndex: option.zIndex
- }).appendTo($parent);
- }
+ })
+ .appendTo($parent);
return $el;
}
});
@@ -391,6 +438,7 @@ if (typeof jQuery === 'undefined') {
this.$el.off('.' + this.id);
this.$inputEl.off('.' + this.id);
this.clear();
+ this.$el.remove();
this.$el = this.$inputEl = this.completer = null;
delete dropdownViews[this.id]
},
@@ -399,34 +447,45 @@ if (typeof jQuery === 'undefined') {
var contentsHtml = this._buildContents(zippedData);
var unzippedData = $.map(this.data, function (d) { return d.value; });
if (this.data.length) {
+ var strategy = zippedData[0].strategy;
+ if (strategy.id) {
+ this.$el.attr('data-strategy', strategy.id);
+ } else {
+ this.$el.removeAttr('data-strategy');
+ }
this._renderHeader(unzippedData);
this._renderFooter(unzippedData);
if (contentsHtml) {
this._renderContents(contentsHtml);
+ this._fitToBottom();
+ this._fitToRight();
this._activateIndexedItem();
}
this._setScroll();
+ } else if (this.noResultsMessage) {
+ this._renderNoResultsMessage(unzippedData);
} else if (this.shown) {
this.deactivate();
}
},
- setPosition: function (position) {
- this.$el.css(this._applyPlacement(position));
-
+ setPosition: function (pos) {
// Make the dropdown fixed if the input is also fixed
// This can't be done during init, as textcomplete may be used on multiple elements on the same page
// Because the same dropdown is reused behind the scenes, we need to recheck every time the dropdown is showed
var position = 'absolute';
// Check if input or one of its parents has positioning we need to care about
- this.$inputEl.add(this.$inputEl.parents()).each(function() {
+ this.$inputEl.add(this.$inputEl.parents()).each(function() {
if($(this).css('position') === 'absolute') // The element has absolute positioning, so it's all OK
return false;
if($(this).css('position') === 'fixed') {
+ pos.top -= $window.scrollTop();
+ pos.left -= $window.scrollLeft();
position = 'fixed';
return false;
}
});
+ this.$el.css(this._applyPlacement(pos));
this.$el.css({ position: position }); // Update positioning
return this;
@@ -436,7 +495,7 @@ if (typeof jQuery === 'undefined') {
this.$el.html('');
this.data = [];
this._index = 0;
- this._$header = this._$footer = null;
+ this._$header = this._$footer = this._$noResultsMessage = null;
},
activate: function () {
@@ -481,19 +540,25 @@ if (typeof jQuery === 'undefined') {
return e.keyCode === 34; // PAGEDOWN
},
+ isEscape: function (e) {
+ return e.keyCode === 27; // ESCAPE
+ },
+
// Private properties
// ------------------
_data: null, // Currently shown zipped data.
_index: null,
_$header: null,
+ _$noResultsMessage: null,
_$footer: null,
// Private methods
// ---------------
_bindEvents: function () {
- this.$el.on('mousedown.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this))
+ this.$el.on('mousedown.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this));
+ this.$el.on('touchstart.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this));
this.$el.on('mouseover.' + this.id, '.textcomplete-item', $.proxy(this._onMouseover, this));
this.$inputEl.on('keydown.' + this.id, $.proxy(this._onKeydown, this));
},
@@ -506,11 +571,16 @@ if (typeof jQuery === 'undefined') {
$el = $el.closest('.textcomplete-item');
}
var datum = this.data[parseInt($el.data('index'), 10)];
- this.completer.select(datum.value, datum.strategy);
+ this.completer.select(datum.value, datum.strategy, e);
var self = this;
// Deactive at next tick to allow other event handlers to know whether
// the dropdown has been shown or not.
- setTimeout(function () { self.deactivate(); }, 0);
+ setTimeout(function () {
+ self.deactivate();
+ if (e.type === 'touchstart') {
+ self.$inputEl.focus();
+ }
+ }, 0);
},
// Activate hovered item.
@@ -526,21 +596,58 @@ if (typeof jQuery === 'undefined') {
_onKeydown: function (e) {
if (!this.shown) { return; }
+
+ var command;
+
+ if ($.isFunction(this.option.onKeydown)) {
+ command = this.option.onKeydown(e, commands);
+ }
+
+ if (command == null) {
+ command = this._defaultKeydown(e);
+ }
+
+ switch (command) {
+ case commands.KEY_UP:
+ e.preventDefault();
+ this._up();
+ break;
+ case commands.KEY_DOWN:
+ e.preventDefault();
+ this._down();
+ break;
+ case commands.KEY_ENTER:
+ e.preventDefault();
+ this._enter(e);
+ break;
+ case commands.KEY_PAGEUP:
+ e.preventDefault();
+ this._pageup();
+ break;
+ case commands.KEY_PAGEDOWN:
+ e.preventDefault();
+ this._pagedown();
+ break;
+ case commands.KEY_ESCAPE:
+ e.preventDefault();
+ this.deactivate();
+ break;
+ }
+ },
+
+ _defaultKeydown: function (e) {
if (this.isUp(e)) {
- e.preventDefault();
- this._up();
+ return commands.KEY_UP;
} else if (this.isDown(e)) {
- e.preventDefault();
- this._down();
+ return commands.KEY_DOWN;
} else if (this.isEnter(e)) {
- e.preventDefault();
- this._enter();
+ return commands.KEY_ENTER;
} else if (this.isPageup(e)) {
- e.preventDefault();
- this._pageup();
+ return commands.KEY_PAGEUP;
} else if (this.isPagedown(e)) {
- e.preventDefault();
- this._pagedown();
+ return commands.KEY_PAGEDOWN;
+ } else if (this.isEscape(e)) {
+ return commands.KEY_ESCAPE;
}
},
@@ -564,10 +671,10 @@ if (typeof jQuery === 'undefined') {
this._setScroll();
},
- _enter: function () {
+ _enter: function (e) {
var datum = this.data[parseInt(this._getActiveElement().data('index'), 10)];
- this.completer.select(datum.value, datum.strategy);
- this._setScroll();
+ this.completer.select(datum.value, datum.strategy, e);
+ this.deactivate();
},
_pageup: function () {
@@ -630,7 +737,7 @@ if (typeof jQuery === 'undefined') {
index = this.data.length;
this.data.push(datum);
html += '<li class="textcomplete-item" data-index="' + index + '"><a>';
- html += datum.strategy.template(datum.value);
+ html += datum.strategy.template(datum.value, datum.term);
html += '</a></li>';
}
return html;
@@ -656,6 +763,16 @@ if (typeof jQuery === 'undefined') {
}
},
+ _renderNoResultsMessage: function (unzippedData) {
+ if (this.noResultsMessage) {
+ if (!this._$noResultsMessage) {
+ this._$noResultsMessage = $('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el);
+ }
+ var html = $.isFunction(this.noResultsMessage) ? this.noResultsMessage(unzippedData) : this.noResultsMessage;
+ this._$noResultsMessage.html(html);
+ }
+ },
+
_renderContents: function (html) {
if (this._$footer) {
this._$footer.before(html);
@@ -664,7 +781,32 @@ if (typeof jQuery === 'undefined') {
}
},
- _applyPlacement: function (position) {
+ _fitToBottom: function() {
+ var windowScrollBottom = $window.scrollTop() + $window.height();
+ var height = this.$el.height();
+ if ((this.$el.position().top + height) > windowScrollBottom) {
+ this.$el.offset({top: windowScrollBottom - height});
+ }
+ },
+
+ _fitToRight: function() {
+ // We don't know how wide our content is until the browser positions us, and at that point it clips us
+ // to the document width so we don't know if we would have overrun it. As a heuristic to avoid that clipping
+ // (which makes our elements wrap onto the next line and corrupt the next item), if we're close to the right
+ // edge, move left. We don't know how far to move left, so just keep nudging a bit.
+ var tolerance = 30; // pixels. Make wider than vertical scrollbar because we might not be able to use that space.
+ var lastOffset = this.$el.offset().left, offset;
+ var width = this.$el.width();
+ var maxLeft = $window.width() - tolerance;
+ while (lastOffset + width > maxLeft) {
+ this.$el.offset({left: lastOffset - tolerance});
+ offset = this.$el.offset().left;
+ if (offset >= lastOffset) { break; }
+ lastOffset = offset;
+ }
+ },
+
+ _applyPlacement: function (position) {
// If the 'placement' option set to 'top', move the position above the element.
if (this.placement.indexOf('top') !== -1) {
// Overwrite the position object to set the 'bottom' property instead of the top.
@@ -688,6 +830,7 @@ if (typeof jQuery === 'undefined') {
});
$.fn.textcomplete.Dropdown = Dropdown;
+ $.extend($.fn.textcomplete, commands);
}(jQuery);
+function ($) {
@@ -713,9 +856,12 @@ if (typeof jQuery === 'undefined') {
if (this.cache) { this.search = memoize(this.search); }
}
- Strategy.parse = function (optionsArray) {
- return $.map(optionsArray, function (options) {
- return new Strategy(options);
+ Strategy.parse = function (strategiesArray, params) {
+ return $.map(strategiesArray, function (strategy) {
+ var strategyObj = new Strategy(strategy);
+ strategyObj.el = params.el;
+ strategyObj.$el = params.$el;
+ return strategyObj;
});
};
@@ -729,6 +875,7 @@ if (typeof jQuery === 'undefined') {
search: null,
// Optional
+ id: null,
cache: false,
context: function () { return true; },
index: 2,
@@ -818,11 +965,19 @@ if (typeof jQuery === 'undefined') {
},
// Returns the caret's relative coordinates from body's left top corner.
- //
- // FIXME: Calculate the left top corner of `this.option.appendTo` element.
getCaretPosition: function () {
var position = this._getCaretRelativePosition();
var offset = this.$el.offset();
+
+ // Calculate the left top corner of `this.option.appendTo` element.
+ var $parent = this.option.appendTo;
+ if ($parent) {
+ if (!($parent instanceof $)) { $parent = $($parent); }
+ var parentOffset = $parent.offsetParent().offset();
+ offset.top -= parentOffset.top;
+ offset.left -= parentOffset.left;
+ }
+
position.top += offset.top;
position.left += offset.left;
return position;
@@ -848,6 +1003,8 @@ if (typeof jQuery === 'undefined') {
// Suppress searching if it returns true.
_skipSearch: function (clickEvent) {
switch (clickEvent.keyCode) {
+ case 9: // TAB
+ case 13: // ENTER
case 40: // DOWN
case 38: // UP
return true;
@@ -874,89 +1031,58 @@ if (typeof jQuery === 'undefined') {
this.initialize(element, completer, option);
}
- Textarea.DIV_PROPERTIES = {
- left: -9999,
- position: 'absolute',
- top: 0,
- whiteSpace: 'pre-wrap'
- }
-
- Textarea.COPY_PROPERTIES = [
- 'border-width', 'font-family', 'font-size', 'font-style', 'font-variant',
- 'font-weight', 'height', 'letter-spacing', 'word-spacing', 'line-height',
- 'text-decoration', 'text-align', 'width', 'padding-top', 'padding-right',
- 'padding-bottom', 'padding-left', 'margin-top', 'margin-right',
- 'margin-bottom', 'margin-left', 'border-style', 'box-sizing', 'tab-size'
- ];
-
$.extend(Textarea.prototype, $.fn.textcomplete.Adapter.prototype, {
// Public methods
// --------------
// Update the textarea with the given value and strategy.
- select: function (value, strategy) {
+ select: function (value, strategy, e) {
var pre = this.getTextFromHeadToCaret();
var post = this.el.value.substring(this.el.selectionEnd);
- var newSubstr = strategy.replace(value);
- if ($.isArray(newSubstr)) {
- post = newSubstr[1] + post;
- newSubstr = newSubstr[0];
+ var newSubstr = strategy.replace(value, e);
+ if (typeof newSubstr !== 'undefined') {
+ if ($.isArray(newSubstr)) {
+ post = newSubstr[1] + post;
+ newSubstr = newSubstr[0];
+ }
+ pre = pre.replace(strategy.match, newSubstr);
+ this.$el.val(pre + post);
+ this.el.selectionStart = this.el.selectionEnd = pre.length;
}
- pre = pre.replace(strategy.match, newSubstr);
- this.$el.val(pre + post);
- this.el.selectionStart = this.el.selectionEnd = pre.length;
+ },
+
+ getTextFromHeadToCaret: function () {
+ return this.el.value.substring(0, this.el.selectionEnd);
},
// Private methods
// ---------------
- // Returns the caret's relative coordinates from textarea's left top corner.
- //
- // Browser native API does not provide the way to know the position of
- // caret in pixels, so that here we use a kind of hack to accomplish
- // the aim. First of all it puts a dummy div element and completely copies
- // the textarea's style to the element, then it inserts the text and a
- // span element into the textarea.
- // Consequently, the span element's position is the thing what we want.
_getCaretRelativePosition: function () {
- var dummyDiv = $('<div></div>').css(this._copyCss())
- .text(this.getTextFromHeadToCaret());
- var span = $('<span></span>').text('.').appendTo(dummyDiv);
- this.$el.before(dummyDiv);
- var position = span.position();
- position.top += span.height() - this.$el.scrollTop();
- position.lineHeight = span.height();
- dummyDiv.remove();
- return position;
- },
-
- _copyCss: function () {
- return $.extend({
- // Set 'scroll' if a scrollbar is being shown; otherwise 'auto'.
- overflow: this.el.scrollHeight > this.el.offsetHeight ? 'scroll' : 'auto'
- }, Textarea.DIV_PROPERTIES, this._getStyles());
+ var p = $.fn.textcomplete.getCaretCoordinates(this.el, this.el.selectionStart);
+ return {
+ top: p.top + this._calculateLineHeight() - this.$el.scrollTop(),
+ left: p.left - this.$el.scrollLeft()
+ };
},
- _getStyles: (function ($) {
- var color = $('<div></div>').css(['color']).color;
- if (typeof color !== 'undefined') {
- return function () {
- return this.$el.css(Textarea.COPY_PROPERTIES);
- };
- } else { // jQuery < 1.8
- return function () {
- var $el = this.$el;
- var styles = {};
- $.each(Textarea.COPY_PROPERTIES, function (i, property) {
- styles[property] = $el.css(property);
- });
- return styles;
- };
+ _calculateLineHeight: function () {
+ var lineHeight = parseInt(this.$el.css('line-height'), 10);
+ if (isNaN(lineHeight)) {
+ // http://stackoverflow.com/a/4515470/1297336
+ var parentNode = this.el.parentNode;
+ var temp = document.createElement(this.el.nodeName);
+ var style = this.el.style;
+ temp.setAttribute(
+ 'style',
+ 'margin:0px;padding:0px;font-family:' + style.fontFamily + ';font-size:' + style.fontSize
+ );
+ temp.innerHTML = 'test';
+ parentNode.appendChild(temp);
+ lineHeight = temp.clientHeight;
+ parentNode.removeChild(temp);
}
- })($),
-
- getTextFromHeadToCaret: function () {
- return this.el.value.substring(0, this.el.selectionEnd);
+ return lineHeight;
}
});
@@ -981,22 +1107,24 @@ if (typeof jQuery === 'undefined') {
// Public methods
// --------------
- select: function (value, strategy) {
+ select: function (value, strategy, e) {
var pre = this.getTextFromHeadToCaret();
var post = this.el.value.substring(pre.length);
- var newSubstr = strategy.replace(value);
- if ($.isArray(newSubstr)) {
- post = newSubstr[1] + post;
- newSubstr = newSubstr[0];
+ var newSubstr = strategy.replace(value, e);
+ if (typeof newSubstr !== 'undefined') {
+ if ($.isArray(newSubstr)) {
+ post = newSubstr[1] + post;
+ newSubstr = newSubstr[0];
+ }
+ pre = pre.replace(strategy.match, newSubstr);
+ this.$el.val(pre + post);
+ this.el.focus();
+ var range = this.el.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', pre.length);
+ range.moveStart('character', pre.length);
+ range.select();
}
- pre = pre.replace(strategy.match, newSubstr);
- this.$el.val(pre + post);
- this.el.focus();
- var range = this.el.createTextRange();
- range.collapse(true);
- range.moveEnd('character', pre.length);
- range.moveStart('character', pre.length);
- range.select();
},
getTextFromHeadToCaret: function () {
@@ -1032,7 +1160,7 @@ if (typeof jQuery === 'undefined') {
// Update the content with the given value and strategy.
// When an dropdown item is selected, it is executed.
- select: function (value, strategy) {
+ select: function (value, strategy, e) {
var pre = this.getTextFromHeadToCaret();
var sel = window.getSelection()
var range = sel.getRangeAt(0);
@@ -1040,20 +1168,41 @@ if (typeof jQuery === 'undefined') {
selection.selectNodeContents(range.startContainer);
var content = selection.toString();
var post = content.substring(range.startOffset);
- var newSubstr = strategy.replace(value);
- if ($.isArray(newSubstr)) {
- post = newSubstr[1] + post;
- newSubstr = newSubstr[0];
+ var newSubstr = strategy.replace(value, e);
+ if (typeof newSubstr !== 'undefined') {
+ if ($.isArray(newSubstr)) {
+ post = newSubstr[1] + post;
+ newSubstr = newSubstr[0];
+ }
+ pre = pre.replace(strategy.match, newSubstr);
+ range.selectNodeContents(range.startContainer);
+ range.deleteContents();
+
+ // create temporary elements
+ var preWrapper = document.createElement("div");
+ preWrapper.innerHTML = pre;
+ var postWrapper = document.createElement("div");
+ postWrapper.innerHTML = post;
+
+ // create the fragment thats inserted
+ var fragment = document.createDocumentFragment();
+ var childNode;
+ var lastOfPre;
+ while (childNode = preWrapper.firstChild) {
+ lastOfPre = fragment.appendChild(childNode);
+ }
+ while (childNode = postWrapper.firstChild) {
+ fragment.appendChild(childNode);
+ }
+
+ // insert the fragment & jump behind the last node in "pre"
+ range.insertNode(fragment);
+ range.setStartAfter(lastOfPre);
+
+ range.collapse(true);
+ sel.removeAllRanges();
+ sel.addRange(range);
}
- pre = pre.replace(strategy.match, newSubstr);
- range.selectNodeContents(range.startContainer);
- range.deleteContents();
- var node = document.createTextNode(pre + post);
- range.insertNode(node);
- range.setStart(node, pre.length);
- range.collapse(true);
- sel.removeAllRanges();
- sel.addRange(range);
},
// Private methods
@@ -1079,8 +1228,7 @@ if (typeof jQuery === 'undefined') {
position.left -= this.$el.offset().left;
position.top += $node.height() - this.$el.offset().top;
position.lineHeight = $node.height();
- var dir = this.$el.attr('dir') || this.$el.css('direction');
- if (dir === 'rtl') { position.left -= this.listView.$el.width(); }
+ $node.remove();
return position;
},
@@ -1102,3 +1250,152 @@ if (typeof jQuery === 'undefined') {
$.fn.textcomplete.ContentEditable = ContentEditable;
}(jQuery);
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2015 Jonathan Ong me@jongleberry.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+// associated documentation files (the "Software"), to deal in the Software without restriction,
+// including without limitation the rights to use, copy, modify, merge, publish, distribute,
+// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+// NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// https://github.com/component/textarea-caret-position
+
+(function ($) {
+
+// The properties that we copy into a mirrored div.
+// Note that some browsers, such as Firefox,
+// do not concatenate properties, i.e. padding-top, bottom etc. -> padding,
+// so we have to do every single property specifically.
+var properties = [
+ 'direction', // RTL support
+ 'boxSizing',
+ 'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does
+ 'height',
+ 'overflowX',
+ 'overflowY', // copy the scrollbar for IE
+
+ 'borderTopWidth',
+ 'borderRightWidth',
+ 'borderBottomWidth',
+ 'borderLeftWidth',
+ 'borderStyle',
+
+ 'paddingTop',
+ 'paddingRight',
+ 'paddingBottom',
+ 'paddingLeft',
+
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/font
+ 'fontStyle',
+ 'fontVariant',
+ 'fontWeight',
+ 'fontStretch',
+ 'fontSize',
+ 'fontSizeAdjust',
+ 'lineHeight',
+ 'fontFamily',
+
+ 'textAlign',
+ 'textTransform',
+ 'textIndent',
+ 'textDecoration', // might not make a difference, but better be safe
+
+ 'letterSpacing',
+ 'wordSpacing',
+
+ 'tabSize',
+ 'MozTabSize'
+
+];
+
+var isBrowser = (typeof window !== 'undefined');
+var isFirefox = (isBrowser && window.mozInnerScreenX != null);
+
+function getCaretCoordinates(element, position, options) {
+ if(!isBrowser) {
+ throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');
+ }
+
+ var debug = options && options.debug || false;
+ if (debug) {
+ var el = document.querySelector('#input-textarea-caret-position-mirror-div');
+ if ( el ) { el.parentNode.removeChild(el); }
+ }
+
+ // mirrored div
+ var div = document.createElement('div');
+ div.id = 'input-textarea-caret-position-mirror-div';
+ document.body.appendChild(div);
+
+ var style = div.style;
+ var computed = window.getComputedStyle? getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9
+
+ // default textarea styles
+ style.whiteSpace = 'pre-wrap';
+ if (element.nodeName !== 'INPUT')
+ style.wordWrap = 'break-word'; // only for textarea-s
+
+ // position off-screen
+ style.position = 'absolute'; // required to return coordinates properly
+ if (!debug)
+ style.visibility = 'hidden'; // not 'display: none' because we want rendering
+
+ // transfer the element's properties to the div
+ properties.forEach(function (prop) {
+ style[prop] = computed[prop];
+ });
+
+ if (isFirefox) {
+ // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
+ if (element.scrollHeight > parseInt(computed.height))
+ style.overflowY = 'scroll';
+ } else {
+ style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'
+ }
+
+ div.textContent = element.value.substring(0, position);
+ // the second special handling for input type="text" vs textarea: spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037
+ if (element.nodeName === 'INPUT')
+ div.textContent = div.textContent.replace(/\s/g, '\u00a0');
+
+ var span = document.createElement('span');
+ // Wrapping must be replicated *exactly*, including when a long word gets
+ // onto the next line, with whitespace at the end of the line before (#7).
+ // The *only* reliable way to do that is to copy the *entire* rest of the
+ // textarea's content into the <span> created at the caret position.
+ // for inputs, just '.' would be enough, but why bother?
+ span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all
+ div.appendChild(span);
+
+ var coordinates = {
+ top: span.offsetTop + parseInt(computed['borderTopWidth']),
+ left: span.offsetLeft + parseInt(computed['borderLeftWidth'])
+ };
+
+ if (debug) {
+ span.style.backgroundColor = '#aaa';
+ } else {
+ document.body.removeChild(div);
+ }
+
+ return coordinates;
+}
+
+$.fn.textcomplete.getCaretCoordinates = getCaretCoordinates;
+
+}(jQuery));
+
+return jQuery;
+}));
diff --git a/library/jquery-textcomplete/jquery.textcomplete.min.js b/library/jquery-textcomplete/jquery.textcomplete.min.js
new file mode 100644
index 000000000..d3a427f27
--- /dev/null
+++ b/library/jquery-textcomplete/jquery.textcomplete.min.js
@@ -0,0 +1,3 @@
+/*! jquery-textcomplete - v1.3.4 - 2016-04-19 */
+!function(a){if("function"==typeof define&&define.amd)define(["jquery"],a);else if("object"==typeof module&&module.exports){var b=require("jquery");module.exports=a(b)}else a(jQuery)}(function(a){if("undefined"==typeof a)throw new Error("jQuery.textcomplete requires jQuery");return+function(a){"use strict";var b=function(a){console.warn&&console.warn(a)},c=1;a.fn.textcomplete=function(d,e){var f=Array.prototype.slice.call(arguments);return this.each(function(){var g=this,h=a(this),i=h.data("textComplete");if(i||(e||(e={}),e._oid=c++,i=new a.fn.textcomplete.Completer(this,e),h.data("textComplete",i)),"string"==typeof d){if(!i)return;f.shift(),i[d].apply(i,f),"destroy"===d&&h.removeData("textComplete")}else a.each(d,function(c){a.each(["header","footer","placement","maxCount"],function(a){c[a]&&(i.option[a]=c[a],b(a+"as a strategy param is deprecated. Use option."),delete c[a])})}),i.register(a.fn.textcomplete.Strategy.parse(d,{el:g,$el:h}))})}}(a),+function(a){"use strict";function b(c,d){if(this.$el=a(c),this.id="textcomplete"+f++,this.strategies=[],this.views=[],this.option=a.extend({},b._getDefaults(),d),!(this.$el.is("input[type=text]")||this.$el.is("input[type=search]")||this.$el.is("textarea")||c.isContentEditable||"true"==c.contentEditable))throw new Error("textcomplete must be called on a Textarea or a ContentEditable.");if(c===document.activeElement)this.initialize();else{var e=this;this.$el.one("focus."+this.id,function(){e.initialize()})}}var c=function(a){var b,c;return function(){var d=Array.prototype.slice.call(arguments);if(b)return void(c=d);b=!0;var e=this;d.unshift(function f(){if(c){var d=c;c=void 0,d.unshift(f),a.apply(e,d)}else b=!1}),a.apply(this,d)}},d=function(a){return"[object String]"===Object.prototype.toString.call(a)},e=function(a){return"[object Function]"===Object.prototype.toString.call(a)},f=0;b._getDefaults=function(){return b.DEFAULTS||(b.DEFAULTS={appendTo:a("body"),zIndex:"100"}),b.DEFAULTS},a.extend(b.prototype,{id:null,option:null,strategies:null,adapter:null,dropdown:null,$el:null,initialize:function(){var b=this.$el.get(0);this.dropdown=new a.fn.textcomplete.Dropdown(b,this,this.option);var c,d;this.option.adapter?c=this.option.adapter:(d=this.$el.is("textarea")||this.$el.is("input[type=text]")||this.$el.is("input[type=search]")?"number"==typeof b.selectionEnd?"Textarea":"IETextarea":"ContentEditable",c=a.fn.textcomplete[d]),this.adapter=new c(b,this,this.option)},destroy:function(){this.$el.off("."+this.id),this.adapter&&this.adapter.destroy(),this.dropdown&&this.dropdown.destroy(),this.$el=this.adapter=this.dropdown=null},deactivate:function(){this.dropdown&&this.dropdown.deactivate()},trigger:function(a,b){this.dropdown||this.initialize(),null!=a||(a=this.adapter.getTextFromHeadToCaret());var c=this._extractSearchQuery(a);if(c.length){var d=c[1];if(b&&this._term===d&&""!==d)return;this._term=d,this._search.apply(this,c)}else this._term=null,this.dropdown.deactivate()},fire:function(a){var b=Array.prototype.slice.call(arguments,1);return this.$el.trigger(a,b),this},register:function(a){Array.prototype.push.apply(this.strategies,a)},select:function(a,b,c){this._term=null,this.adapter.select(a,b,c),this.fire("change").fire("textComplete:select",a,b),this.adapter.focus()},_clearAtNext:!0,_term:null,_extractSearchQuery:function(a){for(var b=0;b<this.strategies.length;b++){var c=this.strategies[b],f=c.context(a);if(f||""===f){var g=e(c.match)?c.match(a):c.match;d(f)&&(a=f);var h=a.match(g);if(h)return[c,h[c.index],h]}}return[]},_search:c(function(a,b,c,d){var e=this;b.search(c,function(d,f){e.dropdown.shown||e.dropdown.activate(),e._clearAtNext&&(e.dropdown.clear(),e._clearAtNext=!1),e.dropdown.setPosition(e.adapter.getCaretPosition()),e.dropdown.render(e._zip(d,b,c)),f||(a(),e._clearAtNext=!0)},d)}),_zip:function(b,c,d){return a.map(b,function(a){return{value:a,strategy:c,term:d}})}}),a.fn.textcomplete.Completer=b}(a),+function(a){"use strict";function b(c,d,f){this.$el=b.createElement(f),this.completer=d,this.id=d.id+"dropdown",this._data=[],this.$inputEl=a(c),this.option=f,f.listPosition&&(this.setPosition=f.listPosition),f.height&&this.$el.height(f.height);var g=this;a.each(["maxCount","placement","footer","header","noResultsMessage","className"],function(a,b){null!=f[b]&&(g[b]=f[b])}),this._bindEvents(c),e[this.id]=this}var c=a(window),d=function(a,b){var c,d,e=b.strategy.idProperty;for(c=0;c<a.length;c++)if(d=a[c],d.strategy===b.strategy)if(e){if(d.value[e]===b.value[e])return!0}else if(d.value===b.value)return!0;return!1},e={};a(document).on("click",function(b){var c=b.originalEvent&&b.originalEvent.keepTextCompleteDropdown;a.each(e,function(a,b){a!==c&&b.deactivate()})});var f={SKIP_DEFAULT:0,KEY_UP:1,KEY_DOWN:2,KEY_ENTER:3,KEY_PAGEUP:4,KEY_PAGEDOWN:5,KEY_ESCAPE:6};a.extend(b,{createElement:function(b){var c=b.appendTo;c instanceof a||(c=a(c));var d=a("<ul></ul>").addClass("dropdown-menu textcomplete-dropdown").attr("id","textcomplete-dropdown-"+b._oid).css({display:"none",left:0,position:"absolute",zIndex:b.zIndex}).appendTo(c);return d}}),a.extend(b.prototype,{$el:null,$inputEl:null,completer:null,footer:null,header:null,id:null,maxCount:10,placement:"",shown:!1,data:[],className:"",destroy:function(){this.deactivate(),this.$el.off("."+this.id),this.$inputEl.off("."+this.id),this.clear(),this.$el.remove(),this.$el=this.$inputEl=this.completer=null,delete e[this.id]},render:function(b){var c=this._buildContents(b),d=a.map(this.data,function(a){return a.value});if(this.data.length){var e=b[0].strategy;e.id?this.$el.attr("data-strategy",e.id):this.$el.removeAttr("data-strategy"),this._renderHeader(d),this._renderFooter(d),c&&(this._renderContents(c),this._fitToBottom(),this._fitToRight(),this._activateIndexedItem()),this._setScroll()}else this.noResultsMessage?this._renderNoResultsMessage(d):this.shown&&this.deactivate()},setPosition:function(b){var d="absolute";return this.$inputEl.add(this.$inputEl.parents()).each(function(){return"absolute"===a(this).css("position")?!1:"fixed"===a(this).css("position")?(b.top-=c.scrollTop(),b.left-=c.scrollLeft(),d="fixed",!1):void 0}),this.$el.css(this._applyPlacement(b)),this.$el.css({position:d}),this},clear:function(){this.$el.html(""),this.data=[],this._index=0,this._$header=this._$footer=this._$noResultsMessage=null},activate:function(){return this.shown||(this.clear(),this.$el.show(),this.className&&this.$el.addClass(this.className),this.completer.fire("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.className&&this.$el.removeClass(this.className),this.completer.fire("textComplete:hide"),this.shown=!1),this},isUp:function(a){return 38===a.keyCode||a.ctrlKey&&80===a.keyCode},isDown:function(a){return 40===a.keyCode||a.ctrlKey&&78===a.keyCode},isEnter:function(a){var b=a.ctrlKey||a.altKey||a.metaKey||a.shiftKey;return!b&&(13===a.keyCode||9===a.keyCode||this.option.completeOnSpace===!0&&32===a.keyCode)},isPageup:function(a){return 33===a.keyCode},isPagedown:function(a){return 34===a.keyCode},isEscape:function(a){return 27===a.keyCode},_data:null,_index:null,_$header:null,_$noResultsMessage:null,_$footer:null,_bindEvents:function(){this.$el.on("mousedown."+this.id,".textcomplete-item",a.proxy(this._onClick,this)),this.$el.on("touchstart."+this.id,".textcomplete-item",a.proxy(this._onClick,this)),this.$el.on("mouseover."+this.id,".textcomplete-item",a.proxy(this._onMouseover,this)),this.$inputEl.on("keydown."+this.id,a.proxy(this._onKeydown,this))},_onClick:function(b){var c=a(b.target);b.preventDefault(),b.originalEvent.keepTextCompleteDropdown=this.id,c.hasClass("textcomplete-item")||(c=c.closest(".textcomplete-item"));var d=this.data[parseInt(c.data("index"),10)];this.completer.select(d.value,d.strategy,b);var e=this;setTimeout(function(){e.deactivate(),"touchstart"===b.type&&e.$inputEl.focus()},0)},_onMouseover:function(b){var c=a(b.target);b.preventDefault(),c.hasClass("textcomplete-item")||(c=c.closest(".textcomplete-item")),this._index=parseInt(c.data("index"),10),this._activateIndexedItem()},_onKeydown:function(b){if(this.shown){var c;switch(a.isFunction(this.option.onKeydown)&&(c=this.option.onKeydown(b,f)),null==c&&(c=this._defaultKeydown(b)),c){case f.KEY_UP:b.preventDefault(),this._up();break;case f.KEY_DOWN:b.preventDefault(),this._down();break;case f.KEY_ENTER:b.preventDefault(),this._enter(b);break;case f.KEY_PAGEUP:b.preventDefault(),this._pageup();break;case f.KEY_PAGEDOWN:b.preventDefault(),this._pagedown();break;case f.KEY_ESCAPE:b.preventDefault(),this.deactivate()}}},_defaultKeydown:function(a){return this.isUp(a)?f.KEY_UP:this.isDown(a)?f.KEY_DOWN:this.isEnter(a)?f.KEY_ENTER:this.isPageup(a)?f.KEY_PAGEUP:this.isPagedown(a)?f.KEY_PAGEDOWN:this.isEscape(a)?f.KEY_ESCAPE:void 0},_up:function(){0===this._index?this._index=this.data.length-1:this._index-=1,this._activateIndexedItem(),this._setScroll()},_down:function(){this._index===this.data.length-1?this._index=0:this._index+=1,this._activateIndexedItem(),this._setScroll()},_enter:function(a){var b=this.data[parseInt(this._getActiveElement().data("index"),10)];this.completer.select(b.value,b.strategy,a),this.deactivate()},_pageup:function(){var b=0,c=this._getActiveElement().position().top-this.$el.innerHeight();this.$el.children().each(function(d){return a(this).position().top+a(this).outerHeight()>c?(b=d,!1):void 0}),this._index=b,this._activateIndexedItem(),this._setScroll()},_pagedown:function(){var b=this.data.length-1,c=this._getActiveElement().position().top+this.$el.innerHeight();this.$el.children().each(function(d){return a(this).position().top>c?(b=d,!1):void 0}),this._index=b,this._activateIndexedItem(),this._setScroll()},_activateIndexedItem:function(){this.$el.find(".textcomplete-item.active").removeClass("active"),this._getActiveElement().addClass("active")},_getActiveElement:function(){return this.$el.children(".textcomplete-item:nth("+this._index+")")},_setScroll:function(){var a=this._getActiveElement(),b=a.position().top,c=a.outerHeight(),d=this.$el.innerHeight(),e=this.$el.scrollTop();0===this._index||this._index==this.data.length-1||0>b?this.$el.scrollTop(b+e):b+c>d&&this.$el.scrollTop(b+c+e-d)},_buildContents:function(a){var b,c,e,f="";for(c=0;c<a.length&&this.data.length!==this.maxCount;c++)b=a[c],d(this.data,b)||(e=this.data.length,this.data.push(b),f+='<li class="textcomplete-item" data-index="'+e+'"><a>',f+=b.strategy.template(b.value,b.term),f+="</a></li>");return f},_renderHeader:function(b){if(this.header){this._$header||(this._$header=a('<li class="textcomplete-header"></li>').prependTo(this.$el));var c=a.isFunction(this.header)?this.header(b):this.header;this._$header.html(c)}},_renderFooter:function(b){if(this.footer){this._$footer||(this._$footer=a('<li class="textcomplete-footer"></li>').appendTo(this.$el));var c=a.isFunction(this.footer)?this.footer(b):this.footer;this._$footer.html(c)}},_renderNoResultsMessage:function(b){if(this.noResultsMessage){this._$noResultsMessage||(this._$noResultsMessage=a('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el));var c=a.isFunction(this.noResultsMessage)?this.noResultsMessage(b):this.noResultsMessage;this._$noResultsMessage.html(c)}},_renderContents:function(a){this._$footer?this._$footer.before(a):this.$el.append(a)},_fitToBottom:function(){var a=c.scrollTop()+c.height(),b=this.$el.height();this.$el.position().top+b>a&&this.$el.offset({top:a-b})},_fitToRight:function(){for(var a,b=30,d=this.$el.offset().left,e=this.$el.width(),f=c.width()-b;d+e>f&&(this.$el.offset({left:d-b}),a=this.$el.offset().left,!(a>=d));)d=a},_applyPlacement:function(a){return-1!==this.placement.indexOf("top")?a={top:"auto",bottom:this.$el.parent().height()-a.top+a.lineHeight,left:a.left}:(a.bottom="auto",delete a.lineHeight),-1!==this.placement.indexOf("absleft")?a.left=0:-1!==this.placement.indexOf("absright")&&(a.right=0,a.left="auto"),a}}),a.fn.textcomplete.Dropdown=b,a.extend(a.fn.textcomplete,f)}(a),+function(a){"use strict";function b(b){a.extend(this,b),this.cache&&(this.search=c(this.search))}var c=function(a){var b={};return function(c,d){b[c]?d(b[c]):a.call(this,c,function(a){b[c]=(b[c]||[]).concat(a),d.apply(null,arguments)})}};b.parse=function(c,d){return a.map(c,function(a){var c=new b(a);return c.el=d.el,c.$el=d.$el,c})},a.extend(b.prototype,{match:null,replace:null,search:null,id:null,cache:!1,context:function(){return!0},index:2,template:function(a){return a},idProperty:null}),a.fn.textcomplete.Strategy=b}(a),+function(a){"use strict";function b(){}var c=Date.now||function(){return(new Date).getTime()},d=function(a,b){var d,e,f,g,h,i=function(){var j=c()-g;b>j?d=setTimeout(i,b-j):(d=null,h=a.apply(f,e),f=e=null)};return function(){return f=this,e=arguments,g=c(),d||(d=setTimeout(i,b)),h}};a.extend(b.prototype,{id:null,completer:null,el:null,$el:null,option:null,initialize:function(b,c,e){this.el=b,this.$el=a(b),this.id=c.id+this.constructor.name,this.completer=c,this.option=e,this.option.debounce&&(this._onKeyup=d(this._onKeyup,this.option.debounce)),this._bindEvents()},destroy:function(){this.$el.off("."+this.id),this.$el=this.el=this.completer=null},select:function(){throw new Error("Not implemented")},getCaretPosition:function(){var b=this._getCaretRelativePosition(),c=this.$el.offset(),d=this.option.appendTo;if(d){d instanceof a||(d=a(d));var e=d.offsetParent().offset();c.top-=e.top,c.left-=e.left}return b.top+=c.top,b.left+=c.left,b},focus:function(){this.$el.focus()},_bindEvents:function(){this.$el.on("keyup."+this.id,a.proxy(this._onKeyup,this))},_onKeyup:function(a){this._skipSearch(a)||this.completer.trigger(this.getTextFromHeadToCaret(),!0)},_skipSearch:function(a){switch(a.keyCode){case 9:case 13:case 40:case 38:return!0}if(a.ctrlKey)switch(a.keyCode){case 78:case 80:return!0}}}),a.fn.textcomplete.Adapter=b}(a),+function(a){"use strict";function b(a,b,c){this.initialize(a,b,c)}a.extend(b.prototype,a.fn.textcomplete.Adapter.prototype,{select:function(b,c,d){var e=this.getTextFromHeadToCaret(),f=this.el.value.substring(this.el.selectionEnd),g=c.replace(b,d);"undefined"!=typeof g&&(a.isArray(g)&&(f=g[1]+f,g=g[0]),e=e.replace(c.match,g),this.$el.val(e+f),this.el.selectionStart=this.el.selectionEnd=e.length)},getTextFromHeadToCaret:function(){return this.el.value.substring(0,this.el.selectionEnd)},_getCaretRelativePosition:function(){var b=a.fn.textcomplete.getCaretCoordinates(this.el,this.el.selectionStart);return{top:b.top+this._calculateLineHeight()-this.$el.scrollTop(),left:b.left-this.$el.scrollLeft()}},_calculateLineHeight:function(){var a=parseInt(this.$el.css("line-height"),10);if(isNaN(a)){var b=this.el.parentNode,c=document.createElement(this.el.nodeName),d=this.el.style;c.setAttribute("style","margin:0px;padding:0px;font-family:"+d.fontFamily+";font-size:"+d.fontSize),c.innerHTML="test",b.appendChild(c),a=c.clientHeight,b.removeChild(c)}return a}}),a.fn.textcomplete.Textarea=b}(a),+function(a){"use strict";function b(b,d,e){this.initialize(b,d,e),a("<span>"+c+"</span>").css({position:"absolute",top:-9999,left:-9999}).insertBefore(b)}var c="吶";a.extend(b.prototype,a.fn.textcomplete.Textarea.prototype,{select:function(b,c,d){var e=this.getTextFromHeadToCaret(),f=this.el.value.substring(e.length),g=c.replace(b,d);if("undefined"!=typeof g){a.isArray(g)&&(f=g[1]+f,g=g[0]),e=e.replace(c.match,g),this.$el.val(e+f),this.el.focus();var h=this.el.createTextRange();h.collapse(!0),h.moveEnd("character",e.length),h.moveStart("character",e.length),h.select()}},getTextFromHeadToCaret:function(){this.el.focus();var a=document.selection.createRange();a.moveStart("character",-this.el.value.length);var b=a.text.split(c);return 1===b.length?b[0]:b[1]}}),a.fn.textcomplete.IETextarea=b}(a),+function(a){"use strict";function b(a,b,c){this.initialize(a,b,c)}a.extend(b.prototype,a.fn.textcomplete.Adapter.prototype,{select:function(b,c,d){var e=this.getTextFromHeadToCaret(),f=window.getSelection(),g=f.getRangeAt(0),h=g.cloneRange();h.selectNodeContents(g.startContainer);var i=h.toString(),j=i.substring(g.startOffset),k=c.replace(b,d);if("undefined"!=typeof k){a.isArray(k)&&(j=k[1]+j,k=k[0]),e=e.replace(c.match,k),g.selectNodeContents(g.startContainer),g.deleteContents();var l=document.createElement("div");l.innerHTML=e;var m=document.createElement("div");m.innerHTML=j;for(var n,o,p=document.createDocumentFragment();n=l.firstChild;)o=p.appendChild(n);for(;n=m.firstChild;)p.appendChild(n);g.insertNode(p),g.setStartAfter(o),g.collapse(!0),f.removeAllRanges(),f.addRange(g)}},_getCaretRelativePosition:function(){var b=window.getSelection().getRangeAt(0).cloneRange(),c=document.createElement("span");b.insertNode(c),b.selectNodeContents(c),b.deleteContents();var d=a(c),e=d.offset();return e.left-=this.$el.offset().left,e.top+=d.height()-this.$el.offset().top,e.lineHeight=d.height(),d.remove(),e},getTextFromHeadToCaret:function(){var a=window.getSelection().getRangeAt(0),b=a.cloneRange();return b.selectNodeContents(a.startContainer),b.toString().substring(0,a.startOffset)}}),a.fn.textcomplete.ContentEditable=b}(a),function(a){function b(a,b,f){if(!d)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var g=f&&f.debug||!1;if(g){var h=document.querySelector("#input-textarea-caret-position-mirror-div");h&&h.parentNode.removeChild(h)}var i=document.createElement("div");i.id="input-textarea-caret-position-mirror-div",document.body.appendChild(i);var j=i.style,k=window.getComputedStyle?getComputedStyle(a):a.currentStyle;j.whiteSpace="pre-wrap","INPUT"!==a.nodeName&&(j.wordWrap="break-word"),j.position="absolute",g||(j.visibility="hidden"),c.forEach(function(a){j[a]=k[a]}),e?a.scrollHeight>parseInt(k.height)&&(j.overflowY="scroll"):j.overflow="hidden",i.textContent=a.value.substring(0,b),"INPUT"===a.nodeName&&(i.textContent=i.textContent.replace(/\s/g," "));var l=document.createElement("span");l.textContent=a.value.substring(b)||".",i.appendChild(l);var m={top:l.offsetTop+parseInt(k.borderTopWidth),left:l.offsetLeft+parseInt(k.borderLeftWidth)};return g?l.style.backgroundColor="#aaa":document.body.removeChild(i),m}var c=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],d="undefined"!=typeof window,e=d&&null!=window.mozInnerScreenX;a.fn.textcomplete.getCaretCoordinates=b}(a),a});
+//# sourceMappingURL=dist/jquery.textcomplete.min.map \ No newline at end of file
diff --git a/version.inc b/version.inc
index 541825aca..fcbe13e41 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2016-04-23.1375H
+2016-04-25.1377H
diff --git a/view/js/main.js b/view/js/main.js
index 2813b3b19..748853939 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -443,6 +443,32 @@ function NavUpdate() {
timer = setTimeout(NavUpdate, updateInterval);
}
+function contextualHelp() {
+ var container = $("#contextual-help-content");
+
+ if(container.hasClass('contextual-help-content-open')) {
+ container.removeClass('contextual-help-content-open');
+ $('main').css('top', '')
+ }
+ else {
+ container.addClass('contextual-help-content-open');
+ var mainTop = container.outerHeight(true);
+ $('main').css('top', mainTop + 'px');
+ }
+}
+
+function contextualHelpFocus(target, openSidePanel) {
+ if (openSidePanel) {
+ $("main").addClass('region_1-on'); // Open the side panel to highlight element
+ }
+ else {
+ $("main").removeClass('region_1-on');
+ }
+ $('html,body').animate({ scrollTop: $(target).offset().top - $('nav').outerHeight(true) - $('#contextual-help-content').outerHeight(true)}, 'slow');
+ for (i = 0; i < 3; i++) {
+ $(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0);
+ }
+}
function updatePageItems(mode, data) {
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 648b144b3..7c020a51f 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -21,7 +21,7 @@ head_add_js('spin.js');
head_add_js('jquery.spin.js');
head_add_js('jquery.textinputs.js');
head_add_js('autocomplete.js');
-head_add_js('library/jquery-textcomplete/jquery.textcomplete.js');
+head_add_js('library/jquery-textcomplete/jquery.textcomplete.min.js');
//head_add_js('library/colorbox/jquery.colorbox.js');
head_add_js('library/jquery.timeago.js');
head_add_js('library/readmore.js/readmore.js');
diff --git a/view/theme/redbasic/css/narrow_navbar.css b/view/theme/redbasic/css/narrow_navbar.css
index 9d14beb33..2c0c7e133 100644
--- a/view/theme/redbasic/css/narrow_navbar.css
+++ b/view/theme/redbasic/css/narrow_navbar.css
@@ -56,4 +56,8 @@
top: 30px;
right: 15px;
}
+
+ .contextual-help-content-open {
+ top: 32px;
+ }
}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 5b8729111..bd5df5e63 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -201,29 +201,26 @@ header #banner #logo-text {
}
/* contextual help */
-.help-content {
- background: $comment_item_colour;
- color: $font_colour;
+.contextual-help-content {
+ display: none;
+
+}
+
+.contextual-help-content-open {
+ display: block;
position: fixed;
- top: -50%;
- left: 0px;
- width: 100%;
+ top: 51px;
max-height: 50%;
+ background: $comment_item_colour;
padding: 20px;
- /*transition: top 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94);*/
- border-bottom: #CCC 1px solid;
+ border-bottom: #ccc 1px solid;
overflow: auto;
-}
-
-.help-content-open {
- top: 51px;
-moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
- /*transition: top 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94);*/
}
-.help-content dd {
+.contextual-help-content dd {
margin-bottom: 1em;
}
/* contextual help end */
@@ -1703,10 +1700,9 @@ nav .badge.mail-update:hover {
#expand-aside,
#expand-tabs,
-#help_nav_btn_collapsed {
+#context-help-btn {
color: $nav_active_icon_colour;
padding: 7px 10px;
- text-decoration: none;
}
.nav-tabs.nav-justified {
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 4fa810cb4..74ba6072d 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -3,18 +3,18 @@
{{if $notself}}
<div class="dropdown pull-right">
<button id="connection-dropdown" class="btn btn-default btn-xs" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <i class="icon-caret-down"></i>
+ <i class="icon-caret-down"></i>&nbsp;{{$tools_label}}
</button>
<ul class="dropdown-menu" aria-labelledby="dLabel">
- <li><a href="{{$buttons.view.url}}" title="{{$buttons.view.title}}">{{$buttons.view.label}}</a></li>
- <li><a href="{{$buttons.recent.url}}" title="{{$buttons.recent.title}}">{{$buttons.recent.label}}</a></li>
+ <li><a href="{{$tools.view.url}}" title="{{$tools.view.title}}">{{$tools.view.label}}</a></li>
+ <li><a href="{{$tools.recent.url}}" title="{{$tools.recent.title}}">{{$tools.recent.label}}</a></li>
<li class="divider"></li>
- <li><a href="#" title="{{$buttons.refresh.title}}" onclick="window.location.href='{{$buttons.refresh.url}}'; return false;">{{$buttons.refresh.label}}</a></li>
- <li><a href="#" title="{{$buttons.block.title}}" onclick="window.location.href='{{$buttons.block.url}}'; return false;">{{$buttons.block.label}}</a></li>
- <li><a href="#" title="{{$buttons.ignore.title}}" onclick="window.location.href='{{$buttons.ignore.url}}'; return false;">{{$buttons.ignore.label}}</a></li>
- <li><a href="#" title="{{$buttons.archive.title}}" onclick="window.location.href='{{$buttons.archive.url}}'; return false;">{{$buttons.archive.label}}</a></li>
- <li><a href="#" title="{{$buttons.hide.title}}" onclick="window.location.href='{{$buttons.hide.url}}'; return false;">{{$buttons.hide.label}}</a></li>
- <li><a href="#" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</a></li>
+ <li><a href="#" title="{{$tools.refresh.title}}" onclick="window.location.href='{{$tools.refresh.url}}'; return false;">{{$tools.refresh.label}}</a></li>
+ <li><a href="#" title="{{$tools.block.title}}" onclick="window.location.href='{{$tools.block.url}}'; return false;">{{$tools.block.label}}</a></li>
+ <li><a href="#" title="{{$tools.ignore.title}}" onclick="window.location.href='{{$tools.ignore.url}}'; return false;">{{$tools.ignore.label}}</a></li>
+ <li><a href="#" title="{{$tools.archive.title}}" onclick="window.location.href='{{$tools.archive.url}}'; return false;">{{$tools.archive.label}}</a></li>
+ <li><a href="#" title="{{$tools.hide.title}}" onclick="window.location.href='{{$tools.hide.url}}'; return false;">{{$tools.hide.label}}</a></li>
+ <li><a href="#" title="{{$tools.delete.title}}" onclick="window.location.href='{{$tools.delete.url}}'; return false;">{{$tools.delete.label}}</a></li>
</ul>
</div>
{{/if}}
@@ -22,11 +22,11 @@
</div>
<div class="section-content-wrapper-np">
{{if $notself}}
- {{foreach $buttons as $b}}
- {{if $b.info}}
+ {{foreach $tools as $tool}}
+ {{if $tool.info}}
<div class="section-content-danger-wrapper">
<div>
- {{$b.info}}
+ {{$tool.info}}
</div>
</div>
{{/if}}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 2a6af3f6a..03b48fd00 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -12,9 +12,9 @@
<i class="icon-circle-arrow-right" id="expand-aside-icon"></i>
</button>
{{if $nav.help.6}}
- <a class="navbar-toggle" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}_collapsed"{{if $nav.help.6}} onclick="return false;"{{/if}}>
+ <button id="context-help-btn"class="navbar-toggle" type="button" onclick="contextualHelp(); return false;">
<i class="icon-question-sign"></i>
- </a>
+ </button>
{{/if}}
{{if $userinfo}}
<img class="dropdown-toggle fakelink" data-toggle="dropdown" id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"><span class="caret" id="usermenu-caret"></span>
@@ -36,6 +36,10 @@
<li role="presentation" class="divider"></li>
<li role="presentation"><a href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a></li>
{{/if}}
+ {{if $nav.help.6}}
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a href="{{$nav.help.0}}" title="{{$nav.help.3}}" role="menuitem" id="{{$nav.help.4}}">{{$nav.help.1}}</a></li>
+ {{/if}}
{{if $nav.logout}}
<li role="presentation" class="divider"></li>
<li role="presentation"><a href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem" id="{{$nav.logout.4}}">{{$nav.logout.1}}</a></li>
@@ -194,15 +198,15 @@
{{if $nav.help}}
<li class="{{$sel.help}}{{if $nav.help.6}} hidden-xs{{/if}}">
- <a class="{{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}"{{if $nav.help.6}} onclick="return false;"{{/if}}>{{if $nav.help.6}}<i class="icon-question-sign"></i>{{else}}<i class="icon-question"></i>{{/if}}</a>
+ <a class="{{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}"{{if $nav.help.6}} onclick="contextualHelp(); return false;"{{/if}}>{{if $nav.help.6}}<i class="icon-question-sign"></i>{{else}}<i class="icon-question"></i>{{/if}}</a>
</li>
{{/if}}
</ul>
</div>
</div>
{{if $nav.help.6}}
- <div id="help-content" class="help-content">
+ <div id="contextual-help-content" class="contextual-help-content">
{{$nav.help.5}}
- <p class="pull-right"><a href="{{$nav.help.0}}">Click here for more documentation...</a></p>
+ <button type="button" class="close" onclick="contextualHelp();">×</button>
</div>
{{/if}}
diff --git a/view/tpl/nav_header.tpl b/view/tpl/nav_header.tpl
deleted file mode 100644
index 27713b55b..000000000
--- a/view/tpl/nav_header.tpl
+++ /dev/null
@@ -1,49 +0,0 @@
-<script>
- /* contextual help */
- {{if $enable_context_help}}
- $('.help-content').css('top', '-' + $('#help-content').height() + 'px')
- $(document).mouseup(function (e)
- {
- e.preventDefault;
-
- var container = $("#help-content");
-
- if ((!container.is(e.target) // if the target of the click isn't the container...
- && container.has(e.target).length === 0 // ... nor a descendant of the container
- && container.hasClass('help-content-open'))
- ||
- (
- ($('#help_nav_btn, #help_nav_btn_collapsed').is(e.target) || $('#help_nav_btn, #help_nav_btn_collapsed').has(e.target).length !== 0)
- && container.hasClass('help-content-open')
- )) {
- container.removeClass('help-content-open');
- $('main').removeClass('help-content-open');
- $('main').css('top', '')
- }
- else if (($('#help_nav_btn, #help_nav_btn_collapsed').is(e.target) || $('#help_nav_btn, #help_nav_btn_collapsed').has(e.target).length !== 0)
- && !container.hasClass('help-content-open')) {
- $('#help-content').addClass('help-content-open');
- $('main').removeClass('help-content-open');
- var mainTop = $('#navbar-collapse-1').height();
- if ($('#navbar-collapse-1').outerHeight(true) < $('#help-content').height()) {
- mainTop = $('#help-content').outerHeight(true);
- }
-
- $('main').css('top', mainTop + 'px');
- }
-
- });
- {{/if}}
- var contextualHelpFocus = function (target, openSidePanel) {
- if (openSidePanel) {
- $("main").addClass('region_1-on'); // Open the side panel to highlight element
- } else {
- $("main").removeClass('region_1-on');
- }
- // Animate the page scroll to the element and then pulse the element to direct attention
- $('html,body').animate({scrollTop: $(target).offset().top - $('#navbar-collapse-1').height() - $('#help-content').height() - 50}, 'slow');
- for (i = 0; i < 3; i++) {
- $(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0);
- }
- }
-</script>
diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl
index 254733622..ca2b5e090 100755
--- a/view/tpl/photo_view.tpl
+++ b/view/tpl/photo_view.tpl
@@ -5,7 +5,7 @@
{{if $tools || $map || $edit}}
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
- <i class="icon-caret-down"></i>
+ <i class="icon-caret-down"></i>&nbsp;{{$tools_label}}
</button>
<ul class="dropdown-menu">
{{if $tools}}
diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl
index a02323e45..4908646b9 100755
--- a/view/tpl/profile_edit.tpl
+++ b/view/tpl/profile_edit.tpl
@@ -2,7 +2,7 @@
<div class="section-title-wrapper">
<div class="dropdown pull-right" id="profile-edit-links">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <i class="icon-caret-down"></i>
+ <i class="icon-caret-down"></i>&nbsp;{{$tools_label}}
</button>
<ul class="dropdown-menu">
<li class="nav-item">