mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-22 17:26:14 -04:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
babe118383 | ||
|
|
2b140e53cc | ||
|
|
fb1514a782 | ||
|
|
7679894684 | ||
|
|
520cf1015c | ||
|
|
64bd8eef4b | ||
|
|
aa42f6a6b2 | ||
|
|
13345d3cbe | ||
|
|
888ee16d52 | ||
|
|
0f3e01f343 | ||
|
|
79220ede66 | ||
|
|
b498e50f74 |
@@ -1,3 +1,12 @@
|
||||
Hubzilla 9.4.1 (2024-10-02)
|
||||
- Various fixes for the help module
|
||||
- Update smarty library via composer
|
||||
- Fix URLs replaced with bbcode in codeblocks if markdown enabled
|
||||
- Fix unable to move multiple files when using postgresql DB backend
|
||||
- Adjust icon for post app
|
||||
- Fix check for while loop in wiki addon
|
||||
|
||||
|
||||
Hubzilla 9.4 (2024-09-25)
|
||||
- If we got an ocap token try to authenticate with it first
|
||||
- Hide comment titles
|
||||
|
||||
@@ -30,7 +30,7 @@ class Help extends \Zotlabs\Web\Controller {
|
||||
$this->determine_help_language();
|
||||
|
||||
if (empty($_REQUEST['search']) && argc() === 1) {
|
||||
goaway("/help/{$this->lang['language']}/about/about");
|
||||
goaway("/help/about/about");
|
||||
killme();
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class Help extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
if (empty($args)) {
|
||||
goaway("/help/{$this->lang['language']}/about/about");
|
||||
goaway("/help/about/about");
|
||||
}
|
||||
|
||||
// Keep the first remaining arg as the heading slug
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: 3
|
||||
url: $baseurl/rpost?f=&body=
|
||||
version: 4
|
||||
url: $baseurl/rpost
|
||||
requires: observer
|
||||
name: Post
|
||||
photo: icon:pencil-square
|
||||
photo: icon:pencil-fill
|
||||
categories: Productivity
|
||||
desc: A separate post editor.
|
||||
|
||||
12
composer.lock
generated
12
composer.lock
generated
@@ -1906,16 +1906,16 @@
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
"version": "v4.4.1",
|
||||
"version": "v4.5.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-php/smarty.git",
|
||||
"reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d"
|
||||
"reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/f4152e9b814ae2369b6e4935c05e1e0c3654318d",
|
||||
"reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/c11676e85aa71bc7c3cd9100f1655a9f4d14616e",
|
||||
"reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1966,9 +1966,9 @@
|
||||
"support": {
|
||||
"forum": "https://github.com/smarty-php/smarty/discussions",
|
||||
"issues": "https://github.com/smarty-php/smarty/issues",
|
||||
"source": "https://github.com/smarty-php/smarty/tree/v4.4.1"
|
||||
"source": "https://github.com/smarty-php/smarty/tree/v4.5.4"
|
||||
},
|
||||
"time": "2024-02-26T13:58:37+00:00"
|
||||
"time": "2024-08-14T20:04:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spomky-labs/otphp",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[size=large][b]Was ist $Projectname?[/b][/size]
|
||||
[h3]Was ist $Projectname?[/h3]
|
||||
|
||||
$Projectname ist ein dezentralisiertes Kommunikationsnetzwerk mit dem Ziel, Kommunikationsmöglichkeiten bereitzustellen, die Zensur umgehen, die Privatsphäre respektieren und somit frei sind von den Einschränkungen, die die heutigen kommerziellen Kommunikationsgiganten uns auferlegen. Diese stellen in erster Linie Spionagenetzwerke für zahlende Kunden aller Art zur Verfügung und monopolisieren und zentralisieren das ganze Internet – was ursprünglich eben gerade nicht unter den revolutionären Zielen war, die einst zum World Wide Web führten.
|
||||
|
||||
|
||||
@@ -2599,33 +2599,31 @@ function attach_move($channel_id, $resource_id, $new_folder_hash, $newname = '',
|
||||
intval($r[0]['id'])
|
||||
);
|
||||
|
||||
if($r[0]['is_photo']) {
|
||||
q("update photo set album = '%s', filename = '%s', os_path = '%s', display_path = '%s'
|
||||
where resource_id = '%s' and uid = %d",
|
||||
dbesc($newalbumname),
|
||||
dbesc($filename),
|
||||
dbesc($x['os_path']),
|
||||
dbesc($x['path']),
|
||||
dbesc($resource_id),
|
||||
intval($channel_id)
|
||||
);
|
||||
|
||||
q("update photo set content = CASE imgscale WHEN 0 THEN %s ELSE CONCAT(%s, '-', imgscale) END where resource_id = '%s' and uid = %d and os_storage = 1",
|
||||
dbescbin($newstorepath),
|
||||
dbescbin($newstorepath),
|
||||
dbesc($resource_id),
|
||||
intval($channel_id)
|
||||
);
|
||||
|
||||
// now rename the thumbnails in os_storage - the original should have been copied before already
|
||||
$ps = q("SELECT content, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' and imgscale > 0 and os_storage = 1",
|
||||
if ($r[0]['is_photo']) {
|
||||
// update the photo DB entries and copy the thumbnails
|
||||
$ps = q("SELECT imgscale FROM photo WHERE uid = %d AND resource_id = '%s' and os_storage = 1",
|
||||
intval($channel_id),
|
||||
dbesc($resource_id)
|
||||
);
|
||||
|
||||
if ($recurse) {
|
||||
foreach($ps as $p) {
|
||||
rename($oldstorepath . '-' . $p['imgscale'], $p['content']);
|
||||
q("update photo set album = '%s', filename = '%s', os_path = '%s', display_path = '%s', content = '%s'
|
||||
where resource_id = '%s' and imgscale = %d and uid = %d",
|
||||
dbesc($newalbumname),
|
||||
dbesc($filename),
|
||||
dbesc($x['os_path']),
|
||||
dbesc($x['path']),
|
||||
dbescbin($newstorepath . ((intval($p['imgscale']) > 0) ? '-' . $p['imgscale'] : '')),
|
||||
dbesc($resource_id),
|
||||
intval($p['imgscale']),
|
||||
intval($channel_id)
|
||||
);
|
||||
|
||||
// the original should have been copied already
|
||||
if (intval($p['imgscale']) > 0) {
|
||||
rename($oldstorepath . '-' . $p['imgscale'], $newstorepath . '-' . $p['imgscale']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,22 +80,6 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
|
||||
|
||||
$s = html2bbcode($s);
|
||||
|
||||
// $s = bb_code_protect($s);
|
||||
|
||||
// Convert everything that looks like a link to a link
|
||||
if($use_zrl) {
|
||||
if (strpos($s,'[/img]') !== false) {
|
||||
$s = preg_replace_callback("/\[img\](.*?)\[\/img\]/ism", 'use_zrl_cb_img', $s);
|
||||
$s = preg_replace_callback("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", 'use_zrl_cb_img_x', $s);
|
||||
}
|
||||
$s = preg_replace_callback("/([^\]\=\{\/]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)([\,\.\:\;]\s|$)/ismu", 'use_zrl_cb_link',$s);
|
||||
}
|
||||
else {
|
||||
$s = preg_replace("/([^\]\=\{\/]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)([\,\.\:\;]\s|$)/ismu", '$1[url=$2$3]$2$3[/url]$4',$s);
|
||||
}
|
||||
|
||||
// $s = bb_code_unprotect($s);
|
||||
|
||||
// remove duplicate adjacent code tags
|
||||
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ class HelpTest extends \Zotlabs\Tests\Unit\Module\TestCase {
|
||||
$this->get('help');
|
||||
}
|
||||
|
||||
public function test_getting_locale_with_no_topic_should_redirect_to_about_page_for_locale(): void {
|
||||
$this->expectRedirectTo('help/de/about/about');
|
||||
public function test_getting_locale_with_no_topic_should_redirect_to_about_page(): void {
|
||||
$this->expectRedirectTo('help/about/about');
|
||||
$this->get('help/de');
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,15 @@ class BBCodeTest extends UnitTestCase {
|
||||
'del tag' => [
|
||||
'some [s]strike through[/s] text',
|
||||
'some <del>strike through</del> text'
|
||||
]
|
||||
],
|
||||
'naked url is converted to link' => [
|
||||
'example url: https://example.com',
|
||||
'example url: <a href="https://example.com" target="_blank" rel="nofollow noopener">https://example.com</a>'
|
||||
],
|
||||
'naked url within code block is not converted to link' => [
|
||||
"[code]\nhttp://example.com\n[/code]",
|
||||
"<pre><code>http://example.com</code></pre>"
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -223,6 +231,10 @@ class BBCodeTest extends UnitTestCase {
|
||||
"<pre><code>some\n indented\ncode</code></pre>",
|
||||
"[code]some\n indented\ncode[/code]"
|
||||
],
|
||||
'code block with URL' => [
|
||||
'<pre><code>\nproxy_pass http://example.com\n</code></pre>',
|
||||
'[code]\nproxy_pass http://example.com\n[/code]'
|
||||
],
|
||||
'paragraph with a mention and some text' => [
|
||||
'<p><span class="h-card" translate="no"><a href="https://example.org/@profile" class="u-url mention">@<span>profile</span></a></span> some content</p>',
|
||||
'[url=https://example.org/@profile]@profile[/url] some content'
|
||||
|
||||
@@ -93,6 +93,14 @@ class MarkdownTest extends UnitTestCase {
|
||||
"[code=php]<?php\necho phpinfo();[/code]",
|
||||
"```php\n<?php\necho phpinfo();\n```"
|
||||
],
|
||||
'code block with URL' => [
|
||||
"[code]an example url https://example.com[/code]",
|
||||
"```\nan example url https://example.com\n```"
|
||||
],
|
||||
'bbcode code block with URL' => [
|
||||
"[code] proxy_pass http://example.com; [/code]",
|
||||
"[code]\nproxy_pass http://example.com;\n[/code]"
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
14
vendor/composer/installed.json
vendored
14
vendor/composer/installed.json
vendored
@@ -1976,17 +1976,17 @@
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
"version": "v4.4.1",
|
||||
"version_normalized": "4.4.1.0",
|
||||
"version": "v4.5.4",
|
||||
"version_normalized": "4.5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-php/smarty.git",
|
||||
"reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d"
|
||||
"reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/f4152e9b814ae2369b6e4935c05e1e0c3654318d",
|
||||
"reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/c11676e85aa71bc7c3cd9100f1655a9f4d14616e",
|
||||
"reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1996,7 +1996,7 @@
|
||||
"phpunit/phpunit": "^8.5 || ^7.5",
|
||||
"smarty/smarty-lexer": "^3.1"
|
||||
},
|
||||
"time": "2024-02-26T13:58:37+00:00",
|
||||
"time": "2024-08-14T20:04:35+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@@ -2039,7 +2039,7 @@
|
||||
"support": {
|
||||
"forum": "https://github.com/smarty-php/smarty/discussions",
|
||||
"issues": "https://github.com/smarty-php/smarty/issues",
|
||||
"source": "https://github.com/smarty-php/smarty/tree/v4.4.1"
|
||||
"source": "https://github.com/smarty-php/smarty/tree/v4.5.4"
|
||||
},
|
||||
"install-path": "../smarty/smarty"
|
||||
},
|
||||
|
||||
10
vendor/composer/installed.php
vendored
10
vendor/composer/installed.php
vendored
@@ -3,7 +3,7 @@
|
||||
'name' => 'zotlabs/hubzilla',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '39933052a9eb827afee3965509909ba314de5257',
|
||||
'reference' => 'c12ef4fbf4b2046e0af68b11e8fe5af2d335f32e',
|
||||
'type' => 'application',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -269,9 +269,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'smarty/smarty' => array(
|
||||
'pretty_version' => 'v4.4.1',
|
||||
'version' => '4.4.1.0',
|
||||
'reference' => 'f4152e9b814ae2369b6e4935c05e1e0c3654318d',
|
||||
'pretty_version' => 'v4.5.4',
|
||||
'version' => '4.5.4.0',
|
||||
'reference' => 'c11676e85aa71bc7c3cd9100f1655a9f4d14616e',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../smarty/smarty',
|
||||
'aliases' => array(),
|
||||
@@ -349,7 +349,7 @@
|
||||
'zotlabs/hubzilla' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '39933052a9eb827afee3965509909ba314de5257',
|
||||
'reference' => 'c12ef4fbf4b2046e0af68b11e8fe5af2d335f32e',
|
||||
'type' => 'application',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
18
vendor/smarty/smarty/CHANGELOG.md
vendored
18
vendor/smarty/smarty/CHANGELOG.md
vendored
@@ -6,11 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [4.5.4] - 2024-08-14
|
||||
- Fixed that using `count()` would trigger a deprecation notice. [#813](https://github.com/smarty-php/smarty/issues/813)
|
||||
|
||||
|
||||
## [4.5.3] - 2024-05-28
|
||||
- Fixed a code injection vulnerability in extends-tag. This addresses CVE-2024-35226.
|
||||
|
||||
|
||||
## [4.5.2] - 2024-04-06
|
||||
- Fixed argument must be passed by reference error introduced in v4.5.1 [#964](https://github.com/smarty-php/smarty/issues/964)
|
||||
|
||||
## [4.5.1] - 2024-03-18
|
||||
- Using unregistered static class methods in expressions now also triggers a deprecation notice because we will drop support for this in the next major release [#813](https://github.com/smarty-php/smarty/issues/813)
|
||||
|
||||
## [4.5.0] - 2024-03-18
|
||||
- (this release accidentally didn't contain any changes, fixed in 4.5.1)
|
||||
|
||||
## [4.4.1] - 2024-02-26
|
||||
- Fixed internal release-tooling
|
||||
|
||||
## [4.4.0] - 2024-02-26
|
||||
### Changed
|
||||
- Using the `|implode`, `|json_encode` and `|substr` modifiers does not generate a deprecation warning anymore as they will continue to be supported in v5 [#939](https://github.com/smarty-php/smarty/issues/939)
|
||||
|
||||
### Added
|
||||
|
||||
@@ -178,14 +178,14 @@ The above example will output:
|
||||
</p>
|
||||
<p>
|
||||
name: Jack Jones<br />
|
||||
home phone: 777-555-5555<br />
|
||||
cell phone: 888-555-5555<br />
|
||||
home: 777-555-5555<br />
|
||||
cell: 888-555-5555<br />
|
||||
e-mail: jack@myexample.com
|
||||
</p>
|
||||
<p>
|
||||
name: Jane Munson<br />
|
||||
home phone: 000-555-5555<br />
|
||||
cell phone: 123456<br />
|
||||
home: 000-555-5555<br />
|
||||
cell: 123456<br />
|
||||
e-mail: jane@myexample.com
|
||||
</p>
|
||||
```
|
||||
|
||||
@@ -785,6 +785,9 @@ value(res) ::= ns1(c)DOUBLECOLON static_class_access(s). {
|
||||
if (isset($this->smarty->registered_classes[c])) {
|
||||
res = $this->smarty->registered_classes[c].'::'.s[0].s[1];
|
||||
} else {
|
||||
trigger_error('Using unregistered static method "' . c.'::'.s[0] . '" in a template is deprecated and will be ' .
|
||||
'removed in a future release. Use Smarty::registerClass to explicitly register ' .
|
||||
'a class for access.', E_USER_DEPRECATED);
|
||||
res = c.'::'.s[0].s[1];
|
||||
}
|
||||
} else {
|
||||
|
||||
2
vendor/smarty/smarty/libs/Smarty.class.php
vendored
2
vendor/smarty/smarty/libs/Smarty.class.php
vendored
@@ -107,7 +107,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '4.4.1';
|
||||
const SMARTY_VERSION = '4.5.4';
|
||||
/**
|
||||
* define variable scopes
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $optional_attributes = array('extends_resource');
|
||||
public $optional_attributes = array();
|
||||
|
||||
/**
|
||||
* Attribute definition: Overwrites base class.
|
||||
@@ -62,29 +62,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
|
||||
}
|
||||
// add code to initialize inheritance
|
||||
$this->registerInit($compiler, true);
|
||||
$file = trim($_attr[ 'file' ], '\'"');
|
||||
if (strlen($file) > 8 && substr($file, 0, 8) === 'extends:') {
|
||||
// generate code for each template
|
||||
$files = array_reverse(explode('|', substr($file, 8)));
|
||||
$i = 0;
|
||||
foreach ($files as $file) {
|
||||
if ($file[ 0 ] === '"') {
|
||||
$file = trim($file, '".');
|
||||
} else {
|
||||
$file = "'{$file}'";
|
||||
}
|
||||
$i++;
|
||||
if ($i === count($files) && isset($_attr[ 'extends_resource' ])) {
|
||||
$this->compileEndChild($compiler);
|
||||
}
|
||||
$this->compileInclude($compiler, $file);
|
||||
}
|
||||
if (!isset($_attr[ 'extends_resource' ])) {
|
||||
$this->compileEndChild($compiler);
|
||||
}
|
||||
} else {
|
||||
$this->compileEndChild($compiler, $_attr[ 'file' ]);
|
||||
}
|
||||
$this->compileEndChild($compiler, $_attr[ 'file' ]);
|
||||
$compiler->has_code = false;
|
||||
return '';
|
||||
}
|
||||
@@ -115,44 +93,4 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
|
||||
'') . ");\n?>"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add code for including subtemplate to end of template
|
||||
*
|
||||
* @param \Smarty_Internal_TemplateCompilerBase $compiler
|
||||
* @param string $template subtemplate name
|
||||
*
|
||||
* @throws \SmartyCompilerException
|
||||
* @throws \SmartyException
|
||||
*/
|
||||
private function compileInclude(Smarty_Internal_TemplateCompilerBase $compiler, $template)
|
||||
{
|
||||
$compiler->parser->template_postfix[] = new Smarty_Internal_ParseTree_Tag(
|
||||
$compiler->parser,
|
||||
$compiler->compileTag(
|
||||
'include',
|
||||
array(
|
||||
$template,
|
||||
array('scope' => 'parent')
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create source code for {extends} from source components array
|
||||
*
|
||||
* @param \Smarty_Internal_Template $template
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function extendsSourceArrayCode(Smarty_Internal_Template $template)
|
||||
{
|
||||
$resources = array();
|
||||
foreach ($template->source->components as $source) {
|
||||
$resources[] = $source->resource;
|
||||
}
|
||||
return $template->smarty->left_delimiter . 'extends file=\'extends:' . join('|', $resources) .
|
||||
'\' extends_resource=true' . $template->smarty->right_delimiter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,9 +109,11 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
|
||||
if (!is_object($compiler->smarty->security_policy)
|
||||
|| $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler)
|
||||
) {
|
||||
trigger_error('Using php-function "' . $modifier . '" as a modifier is deprecated and will be ' .
|
||||
'removed in a future release. Use Smarty::registerPlugin to explicitly register ' .
|
||||
'a custom modifier.', E_USER_DEPRECATED);
|
||||
if (!in_array($modifier, ['time', 'join', 'is_array', 'in_array'])) {
|
||||
trigger_error('Using unregistered function "' . $modifier . '" in a template is deprecated and will be ' .
|
||||
'removed in a future release. Use Smarty::registerPlugin to explicitly register ' .
|
||||
'a custom modifier.', E_USER_DEPRECATED);
|
||||
}
|
||||
$output = "{$modifier}({$params})";
|
||||
}
|
||||
$compiler->known_modifier_type[ $modifier ] = $type;
|
||||
|
||||
@@ -455,15 +455,29 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
$this->smarty->_current_file = $this->template->source->filepath;
|
||||
// get template source
|
||||
if (!empty($this->template->source->components)) {
|
||||
// we have array of inheritance templates by extends: resource
|
||||
// generate corresponding source code sequence
|
||||
$_content =
|
||||
Smarty_Internal_Compile_Extends::extendsSourceArrayCode($this->template);
|
||||
$_compiled_code = '<?php $_smarty_tpl->_loadInheritance(); $_smarty_tpl->inheritance->init($_smarty_tpl, true); ?>';
|
||||
|
||||
$i = 0;
|
||||
$reversed_components = array_reverse($this->template->getSource()->components);
|
||||
foreach ($reversed_components as $source) {
|
||||
$i++;
|
||||
if ($i === count($reversed_components)) {
|
||||
$_compiled_code .= '<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl); ?>';
|
||||
}
|
||||
$_compiled_code .= $this->compileTag(
|
||||
'include',
|
||||
[
|
||||
var_export($source->resource, true),
|
||||
['scope' => 'parent'],
|
||||
]
|
||||
);
|
||||
}
|
||||
$_compiled_code = $this->postFilter($_compiled_code, $this->template);
|
||||
} else {
|
||||
// get template source
|
||||
$_content = $this->template->source->getContent();
|
||||
$_compiled_code = $this->postFilter($this->doCompile($this->preFilter($_content), true));
|
||||
}
|
||||
$_compiled_code = $this->postFilter($this->doCompile($this->preFilter($_content), true));
|
||||
if (!empty($this->required_plugins[ 'compiled' ]) || !empty($this->required_plugins[ 'nocache' ])) {
|
||||
$_compiled_code = '<?php ' . $this->compileRequiredPlugins() . "?>\n" . $_compiled_code;
|
||||
}
|
||||
@@ -640,7 +654,18 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
return $func_name . '(' . $parameter[ 0 ] . ')';
|
||||
}
|
||||
} else {
|
||||
return $name . '(' . implode(',', $parameter) . ')';
|
||||
|
||||
if (
|
||||
!$this->smarty->loadPlugin('smarty_modifiercompiler_' . $name)
|
||||
&& !isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$name])
|
||||
&& !in_array($name, ['time', 'join', 'is_array', 'in_array', 'count'])
|
||||
) {
|
||||
trigger_error('Using unregistered function "' . $name . '" in a template is deprecated and will be ' .
|
||||
'removed in a future release. Use Smarty::registerPlugin to explicitly register ' .
|
||||
'a custom modifier.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $name . '(' . implode(',', $parameter) . ')';
|
||||
}
|
||||
} else {
|
||||
$this->trigger_template_error("unknown function '{$name}'");
|
||||
|
||||
@@ -2425,6 +2425,9 @@ public static $yy_action = array(
|
||||
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 {
|
||||
trigger_error('Using unregistered static method "' . $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0] . '" in a template is deprecated and will be ' .
|
||||
'removed in a future release. Use Smarty::registerClass to explicitly register ' .
|
||||
'a class for access.', E_USER_DEPRECATED);
|
||||
$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1];
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -253,7 +253,7 @@ class Smarty_Security
|
||||
*
|
||||
* @param string $function_name
|
||||
* @param object $compiler compiler object
|
||||
*
|
||||
* @deprecated
|
||||
* @return boolean true if function is trusted
|
||||
*/
|
||||
public function isTrustedPhpFunction($function_name, $compiler)
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
# - ./run-tests-for-all-php-versions.sh --group 20221124
|
||||
# - ./run-tests-for-all-php-versions.sh --exclude-group slow
|
||||
|
||||
docker-compose run php71 ./run-tests.sh $@ && \
|
||||
docker-compose run php72 ./run-tests.sh $@ && \
|
||||
docker-compose run php73 ./run-tests.sh $@ && \
|
||||
docker-compose run php74 ./run-tests.sh $@ && \
|
||||
docker-compose run php80 ./run-tests.sh $@ && \
|
||||
docker-compose run php81 ./run-tests.sh $@ && \
|
||||
docker-compose run php82 ./run-tests.sh $@ && \
|
||||
docker-compose run php83 ./run-tests.sh $@
|
||||
COMPOSE_CMD="mutagen-compose"
|
||||
|
||||
$COMPOSE_CMD run --rm php71 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php72 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php73 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php74 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php80 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php81 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php82 ./run-tests.sh $@ && \
|
||||
$COMPOSE_CMD run --rm php83 ./run-tests.sh $@
|
||||
|
||||
@@ -11,10 +11,22 @@
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
#doco-content img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#region_1 .widget ul ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#doco-top-toc-wrapper {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#doco-top-toc-wrapper > summary {
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.toc-content li,
|
||||
#doco-top-toc li {
|
||||
padding: 3px 0px;
|
||||
@@ -24,3 +36,12 @@
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.selected-doco-nav > a {
|
||||
font-weight: bold;
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
#help-content pre code {
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
function docoTocToggle() {
|
||||
if ($('#doco-top-toc').is(':visible')) {
|
||||
$('#doco-toc-toggle').removeClass('bi-gear').addClass('bi-caret-right');
|
||||
} else {
|
||||
$('#doco-toc-toggle').removeClass('bi-caret-right').addClass('bi-caret-down');
|
||||
}
|
||||
$('#doco-top-toc').toggle();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
toc = {};
|
||||
// Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
|
||||
$(document).ready(function () {
|
||||
|
||||
@@ -150,20 +150,6 @@ input[type=text], textarea {
|
||||
color: var(--bs-body-color);
|
||||
}
|
||||
|
||||
.selected-doco-nav {
|
||||
font-weight: bold;
|
||||
text-shadow: 2px 2px 3px lightgray;
|
||||
}
|
||||
|
||||
#doco-content img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#help-content pre code {
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.heart {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
{{$module->missing_translation_message()}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="section-content-wrapper" id="doco-content">
|
||||
<h3 id="doco-top-toc-heading">
|
||||
<span class="fakelink" onclick="docoTocToggle(); return false;">
|
||||
<i class="bi bi-caret-right fakelink" id="doco-toc-toggle"></i>
|
||||
{{$module->get_toc_heading()}}
|
||||
</span>
|
||||
</h3>
|
||||
<ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul>
|
||||
{{$module->render_content()}}
|
||||
<div class="section-content-wrapper">
|
||||
<details id="doco-top-toc-wrapper">
|
||||
<summary id="doco-top-toc-heading">{{$module->get_toc_heading()}}</summary>
|
||||
<ul id="doco-top-toc"></ul>
|
||||
</details>
|
||||
<div id="doco-content">
|
||||
{{$module->render_content()}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user