Update Smarty to 3.1.32
This commit is contained in:
@ -45,7 +45,7 @@ function &serendipity_fetchTrackbacks($id, $limit = null, $showAll = false) {
|
||||
* @param array The superarray of trackbacks to display
|
||||
* @return
|
||||
*/
|
||||
function &serendipity_printTrackbacks(&$trackbacks) {
|
||||
function &serendipity_printTrackbacks($trackbacks) {
|
||||
global $serendipity;
|
||||
|
||||
$serendipity['smarty']->assignByRef('trackbacks', $trackbacks);
|
||||
@ -171,7 +171,7 @@ function serendipity_ifRemember($name, $value, $isDefault = false, $att = 'check
|
||||
* @param object Smarty object
|
||||
* @return string The Smarty HTML response
|
||||
*/
|
||||
function serendipity_smarty_fetchPrintEntries($params, &$smarty) {
|
||||
function serendipity_smarty_fetchPrintEntries($params, $smarty) {
|
||||
global $serendipity;
|
||||
static $entrycount = 0;
|
||||
static $restore_var_GET_keys = array('category', 'viewAuthor', 'page', 'hide_category');
|
||||
@ -397,7 +397,7 @@ function serendipity_smarty_fetchPrintEntries($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return void
|
||||
*/
|
||||
function serendipity_smarty_showCommentForm($params, &$smarty) {
|
||||
function serendipity_smarty_showCommentForm($params, $smarty) {
|
||||
global $serendipity;
|
||||
|
||||
if (!isset($params['id']) || !isset($params['entry'])) {
|
||||
@ -458,7 +458,7 @@ function serendipity_smarty_showCommentForm($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return string The Smarty HTML response
|
||||
*/
|
||||
function serendipity_smarty_showPlugin($params, &$smarty) {
|
||||
function serendipity_smarty_showPlugin($params, $smarty) {
|
||||
global $serendipity;
|
||||
|
||||
if (!isset($params['class']) && !isset($params['id'])) {
|
||||
@ -495,7 +495,7 @@ function serendipity_smarty_showPlugin($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return string The Smarty HTML response
|
||||
*/
|
||||
function serendipity_smarty_getTotalCount($params, &$smarty) {
|
||||
function serendipity_smarty_getTotalCount($params, $smarty) {
|
||||
if (!isset($params['what'])) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'what' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -520,7 +520,7 @@ function serendipity_smarty_getTotalCount($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return null
|
||||
*/
|
||||
function serendipity_smarty_hookPlugin($params, &$smarty) {
|
||||
function serendipity_smarty_hookPlugin($params, $smarty) {
|
||||
global $serendipity;
|
||||
static $hookable = array('frontend_header',
|
||||
'entries_header',
|
||||
@ -574,7 +574,7 @@ function serendipity_smarty_hookPlugin($params, &$smarty) {
|
||||
* @param mixed Additional data
|
||||
* @return null
|
||||
*/
|
||||
function serendipity_smarty_refhookPlugin(&$eventData, $hook, $addData = null) {
|
||||
function serendipity_smarty_refhookPlugin($eventData, $hook, $addData = null) {
|
||||
global $serendipity;
|
||||
|
||||
if (!isset($hook)) {
|
||||
@ -607,7 +607,7 @@ function serendipity_smarty_refhookPlugin(&$eventData, $hook, $addData = null) {
|
||||
* @param object Smarty object
|
||||
* @return string The HTML code of a plugin's output
|
||||
*/
|
||||
function serendipity_smarty_printSidebar($params, &$smarty) {
|
||||
function serendipity_smarty_printSidebar($params, $smarty) {
|
||||
if ( !isset($params['side']) ) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'side' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -629,7 +629,7 @@ function serendipity_smarty_printSidebar($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return string The requested filename with full path
|
||||
*/
|
||||
function serendipity_smarty_getFile($params, &$smarty) {
|
||||
function serendipity_smarty_getFile($params, $smarty) {
|
||||
if ( !isset($params['file']) ) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'file' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -637,7 +637,7 @@ function serendipity_smarty_getFile($params, &$smarty) {
|
||||
return serendipity_getTemplateFile($params['file'], 'serendipityHTTPPath', $params['frontend']);
|
||||
}
|
||||
|
||||
function serendipity_smarty_getConfigVar($params, &$smarty) {
|
||||
function serendipity_smarty_getConfigVar($params, $smarty) {
|
||||
if ( !isset($params['key']) ) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'key' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -645,7 +645,7 @@ function serendipity_smarty_getConfigVar($params, &$smarty) {
|
||||
return serendipity_get_config_var($params['key']);
|
||||
}
|
||||
|
||||
function serendipity_smarty_setFormToken($params, &$smarty) {
|
||||
function serendipity_smarty_setFormToken($params, $smarty) {
|
||||
if ( isset($params['type']) ) {
|
||||
return serendipity_setFormToken($params['type']);
|
||||
}
|
||||
@ -664,7 +664,7 @@ function serendipity_smarty_setFormToken($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return string The requested filename with full path
|
||||
*/
|
||||
function serendipity_smarty_pickKey($params, &$smarty) {
|
||||
function serendipity_smarty_pickKey($params, $smarty) {
|
||||
if ( !isset($params['array']) ) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'array' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -689,7 +689,7 @@ function serendipity_smarty_pickKey($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return string The permalink
|
||||
*/
|
||||
function serendipity_smarty_rss_getguid($params, &$smarty) {
|
||||
function serendipity_smarty_rss_getguid($params, $smarty) {
|
||||
if ( !isset($params['entry']) ) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'entry' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -735,7 +735,7 @@ function serendipity_smarty_formatTime($timestamp, $format, $useOffset = true, $
|
||||
* @param object Smarty object
|
||||
* @return string The HTML code with the comments
|
||||
*/
|
||||
function &serendipity_smarty_printComments($params, &$smarty) {
|
||||
function &serendipity_smarty_printComments($params, $smarty) {
|
||||
global $serendipity;
|
||||
|
||||
if (!isset($params['entry'])) {
|
||||
@ -794,7 +794,7 @@ function &serendipity_smarty_printComments($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return
|
||||
*/
|
||||
function &serendipity_smarty_printTrackbacks($params, &$smarty) {
|
||||
function &serendipity_smarty_printTrackbacks($params, $smarty) {
|
||||
if ( !isset($params['entry']) ) {
|
||||
trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'entry' parameter", E_USER_WARNING);
|
||||
return;
|
||||
@ -832,7 +832,7 @@ function &serendipity_smarty_printTrackbacks($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return string Empty
|
||||
*/
|
||||
function serendipity_smarty_getImageSize($params, &$smarty) {
|
||||
function serendipity_smarty_getImageSize($params, $smarty) {
|
||||
global $serendipity;
|
||||
|
||||
if (!isset($params['file'])) {
|
||||
@ -870,7 +870,7 @@ function serendipity_smarty_getImageSize($params, &$smarty) {
|
||||
* @param object Smarty object
|
||||
* @return
|
||||
*/
|
||||
function &serendipity_replaceSmartyVars($tpl_source, &$smarty) {
|
||||
function &serendipity_replaceSmartyVars($tpl_source, $smarty) {
|
||||
$tpl_source = str_replace('$CONST.', '$smarty.const.', $tpl_source);
|
||||
return $tpl_source;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class Serendipity_Smarty_Security_Policy extends Smarty_Security
|
||||
// {include} calls, we should only apply this workaround to fetch() calls.
|
||||
// Redirecting fetch() as our custom function is too risky and has too high a performance
|
||||
// impact.
|
||||
public function isTrustedResourceDir($path) {
|
||||
public function isTrustedResourceDir($path, $isConfig = NULL) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user