mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-22 17:26:14 -04:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cd3369f6a | ||
|
|
c26ae553e6 | ||
|
|
8d78698d00 | ||
|
|
d5c189753a | ||
|
|
9861e7a0c4 | ||
|
|
6d5fa9205c | ||
|
|
0fee7804fb | ||
|
|
4002dbaa8b | ||
|
|
57e32a7912 | ||
|
|
b6a72d6e4e | ||
|
|
6e592ed200 | ||
|
|
6c033fc776 | ||
|
|
7c4362db53 | ||
|
|
f7bf9ede72 |
@@ -11,6 +11,7 @@ class Cache_query {
|
||||
if(! $argc == 3)
|
||||
return;
|
||||
|
||||
$r = null;
|
||||
$key = $argv[1];
|
||||
|
||||
$pid = get_config('procid', $key, false);
|
||||
@@ -28,8 +29,10 @@ class Cache_query {
|
||||
$arr = json_decode(base64_decode($argv[0]), true);
|
||||
|
||||
$r = call_user_func_array('q', $arr);
|
||||
if($r)
|
||||
|
||||
if(is_array($r)) {
|
||||
Cache::set($key, serialize($r));
|
||||
}
|
||||
|
||||
del_config('procid', $key);
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ class Item extends Controller {
|
||||
$pagetitle = ((x($_REQUEST, 'pagetitle')) ? escape_tags($_REQUEST['pagetitle']) : '');
|
||||
$layout_mid = ((x($_REQUEST, 'layout_mid')) ? escape_tags($_REQUEST['layout_mid']) : '');
|
||||
$plink = ((x($_REQUEST, 'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
|
||||
$obj_type = ((x($_REQUEST, 'obj_type')) ? escape_tags($_REQUEST['obj_type']) : 'Article');
|
||||
$obj_type = ((x($_REQUEST, 'obj_type')) ? escape_tags($_REQUEST['obj_type']) : 'Note');
|
||||
|
||||
// allow API to bulk load a bunch of imported items with sending out a bunch of posts.
|
||||
$nopush = ((x($_REQUEST, 'nopush')) ? intval($_REQUEST['nopush']) : 0);
|
||||
|
||||
2
boot.php
2
boot.php
@@ -64,7 +64,7 @@ require_once('include/selectors.php');
|
||||
require_once('include/activities.php');
|
||||
|
||||
define('PLATFORM_NAME', 'hubzilla');
|
||||
define('STD_VERSION', '9.0');
|
||||
define('STD_VERSION', '9.0.1');
|
||||
define('ZOT_REVISION', '6.0');
|
||||
|
||||
define('DB_UPDATE_VERSION', 1263);
|
||||
|
||||
@@ -1059,8 +1059,8 @@ function bb_fix_lf($match) {
|
||||
// be converted to '<br />' and turn your neatly crafted tables into a whole lot of
|
||||
// empty space.
|
||||
|
||||
$new_content = str_replace(["\n\r", "\n", "\r"], '', $match[1]);
|
||||
return str_replace($match[1], $new_content, $match[0]);
|
||||
$new_content = preg_replace("/\]\s+\[/",'][', $match[1]);
|
||||
return str_replace($match[1], trim($new_content, "\r\n"), $match[0]);
|
||||
}
|
||||
|
||||
function bbtopoll($s) {
|
||||
@@ -1286,6 +1286,11 @@ function bbcode($text, $options = []) {
|
||||
if (strpos($text,'[pre]') !== false) {
|
||||
$text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$text);
|
||||
}
|
||||
|
||||
if (strpos($text,'</pre>') !== false) {
|
||||
$text = str_replace(["</pre>\r", "</pre>\n"], '</pre>', $text);
|
||||
}
|
||||
|
||||
if (strpos($text,'[summary]') !== false) {
|
||||
$text = preg_replace_callback("/\[summary\](.*?)\[\/summary\]/ism", 'bb_spacefy',$text);
|
||||
}
|
||||
@@ -1553,6 +1558,20 @@ function bbcode($text, $options = []) {
|
||||
$text = preg_replace_callback("/\[checklist\](.*?)\[\/checklist\]/ism", 'bb_checklist', $text);
|
||||
}
|
||||
|
||||
|
||||
if (strpos($text,'[/table]') !== false) {
|
||||
$text = str_replace(["[/table]\r", "[/table]\n"], '[/table]', $text);
|
||||
|
||||
$text = preg_replace_callback("/\[table\](.*?)\[\/table\]/ism",'bb_fix_lf',$text);
|
||||
$text = preg_replace("/\[table\](.*?)\[\/table\]/sm", '<table>$1</table>', $text);
|
||||
|
||||
$text = preg_replace_callback("/\[table border=1\](.*?)\[\/table\]/ism",'bb_fix_lf',$text);
|
||||
$text = preg_replace("/\[table border=1\](.*?)\[\/table\]/sm", '<table class="table table-responsive table-bordered" >$1</table>', $text);
|
||||
|
||||
$text = preg_replace_callback("/\[table border=0\](.*?)\[\/table\]/ism",'bb_fix_lf',$text);
|
||||
$text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table class="table table-responsive" >$1</table>', $text);
|
||||
}
|
||||
|
||||
if (strpos($text,'[th]') !== false) {
|
||||
$text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '<th>$1</th>', $text);
|
||||
}
|
||||
@@ -1565,13 +1584,6 @@ function bbcode($text, $options = []) {
|
||||
$text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '<tr>$1</tr>', $text);
|
||||
}
|
||||
|
||||
if (strpos($text,'[/table]') !== false) {
|
||||
$text = preg_replace_callback("/\[table\](.*?)\[\/table\]/ism",'bb_fix_lf',$text);
|
||||
$text = preg_replace("/\[table\](.*?)\[\/table\]/sm", '<table>$1</table>', $text);
|
||||
$text = preg_replace("/\[table border=1\](.*?)\[\/table\]/sm", '<table class="table table-responsive table-bordered" >$1</table>', $text);
|
||||
$text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table class="table table-responsive" >$1</table>', $text);
|
||||
}
|
||||
|
||||
$text = str_replace('[hr]', '<hr />', $text);
|
||||
|
||||
// This is actually executed in prepare_body()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php /** @file */
|
||||
|
||||
use Zotlabs\Lib\Cache;
|
||||
use Zotlabs\Daemon\Master;
|
||||
|
||||
function findpeople_widget() {
|
||||
|
||||
@@ -66,11 +67,12 @@ function categories_widget($baseurl,$selected = '') {
|
||||
|
||||
require_once('include/security.php');
|
||||
|
||||
$sql_extra = item_permissions_sql(App::$profile['profile_uid']);
|
||||
$observer = get_observer_hash();
|
||||
$sql_extra = item_permissions_sql(App::$profile['profile_uid'], $observer);
|
||||
|
||||
$item_normal = item_normal();
|
||||
|
||||
$key = __FUNCTION__ . "-" . App::$profile['profile_uid'];
|
||||
$key = __FUNCTION__ . '_' . md5(App::$profile['profile_uid'] . $observer);
|
||||
|
||||
$content = Cache::get($key, '5 MINUTE');
|
||||
if (! $content) {
|
||||
@@ -96,7 +98,7 @@ function categories_widget($baseurl,$selected = '') {
|
||||
dbesc(ACTIVITY_UPDATE)
|
||||
];
|
||||
|
||||
\Zotlabs\Daemon\Master::Summon([ 'Cache_query', $key, base64_encode(json_encode($arr)) ]);
|
||||
Master::Summon([ 'Cache_query', $key, base64_encode(json_encode($arr)) ]);
|
||||
}
|
||||
|
||||
if (!$content) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// To do this we need to escape these characters if they appear in our tag.
|
||||
|
||||
use Zotlabs\Lib\Cache;
|
||||
|
||||
use Zotlabs\Daemon\Master;
|
||||
|
||||
function file_tag_encode($s) {
|
||||
return str_replace(array('<','>','[',']'),array('%3c','%3e','%5b','%5d'),$s);
|
||||
@@ -357,7 +357,7 @@ function pub_tagadelic($net, $site, $limit, $recent, $safemode, $type) {
|
||||
}
|
||||
}
|
||||
|
||||
$key = __FUNCTION__ . "-" . md5($site . $recent . $safemode . $limit . $type);
|
||||
$key = __FUNCTION__ . '_' . md5($site . $recent . $safemode . $limit . $type);
|
||||
|
||||
$content = Cache::get($key, '5 MINUTE');
|
||||
if(! $content) {
|
||||
@@ -377,7 +377,7 @@ function pub_tagadelic($net, $site, $limit, $recent, $safemode, $type) {
|
||||
(intval($count) ? "LIMIT $count" : '')
|
||||
];
|
||||
|
||||
\Zotlabs\Daemon\Master::Summon([ 'Cache_query', $key, base64_encode(json_encode($arr)) ]);
|
||||
Master::Summon([ 'Cache_query', $key, base64_encode(json_encode($arr)) ]);
|
||||
}
|
||||
|
||||
$r = unserialize($content);
|
||||
|
||||
@@ -107,17 +107,33 @@ class BBCodeTest extends UnitTestCase {
|
||||
"[code]\ntestvar = \"this is a test\"\necho \"the message is \$testvar\"\n[/code]",
|
||||
'<pre><code>testvar = "this is a test"<br />echo "the message is $testvar"</code></pre>',
|
||||
],
|
||||
'code block with surroundin linebreaks \n' => [
|
||||
"some text\n[code]\ntestvar = \"this is a test\"\necho \"the message is \$testvar\"\n[/code]\nsome more text",
|
||||
'some text<br /><pre><code>testvar = "this is a test"<br />echo "the message is $testvar"</code></pre>some more text',
|
||||
],
|
||||
'list with linebreaks \n' => [
|
||||
"some text\n[list]\n[*] item1\n[*] item2\n[/list]\nsome more text",
|
||||
'some text<br /><ul class="listbullet"><li> item1<li> item2</ul>some more text'
|
||||
],
|
||||
'list with linebreaks \n in text' => [
|
||||
"some text\n[list]\n[*] item1\nsome text[*] item2\nsome text[/list]\nsome more text",
|
||||
'some text<br /><ul class="listbullet"><li> item1<br />some text<li> item2<br />some text</ul>some more text'
|
||||
],
|
||||
'list with linebreaks \r' => [
|
||||
"some text\r[list]\r[*] item1\r[*] item2\r[/list]\rsome more text",
|
||||
'some text<br /><ul class="listbullet"><li> item1<li> item2</ul>some more text'
|
||||
],
|
||||
'list with linebreaks \r in text' => [
|
||||
"some text\r[list]\r[*] item1\rsome text\r[*] item2\rsome text\r[/list]\rsome more text",
|
||||
'some text<br /><ul class="listbullet"><li> item1<br />some text<li> item2<br />some text</ul>some more text'
|
||||
],
|
||||
'list with linebreaks \r\n' => [
|
||||
"some text\r\n[list]\r\n[*] item1\r\n[*] item2\r\n[/list]\r\nsome more text",
|
||||
'some text<br /><ul class="listbullet"><li> item1<li> item2</ul>some more text'
|
||||
],
|
||||
'list with linebreaks \r\n in text' => [
|
||||
"some text\r\n[list]\r\n[*] item1\r\nsome text[*] item2\r\nsome text[/list]\r\nsome more text",
|
||||
'some text<br /><ul class="listbullet"><li> item1<br />some text<li> item2<br />some text</ul>some more text'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ if [ ! -d .git ]; then
|
||||
fi
|
||||
git pull
|
||||
|
||||
if [ -d extend ] ; then
|
||||
if [ -d extend ]; then
|
||||
for a in theme addon widget ; do
|
||||
if [ -d extend/$a ]; then
|
||||
for b in `ls extend/$a` ; do
|
||||
@@ -15,3 +15,8 @@ if [ -d extend ] ; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Allow to run additional site specific commands
|
||||
if [ -f util/udall_extra ]; then
|
||||
source util/udall_extra
|
||||
fi
|
||||
|
||||
12
vendor/composer/installed.php
vendored
12
vendor/composer/installed.php
vendored
@@ -1,9 +1,9 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'zotlabs/hubzilla',
|
||||
'pretty_version' => 'dev-9.0RC',
|
||||
'version' => 'dev-9.0RC',
|
||||
'reference' => 'a18e873d08e733225c70b0ace31c3cbb025ff906',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '3c0d6339bb12bd7fbf65ba7a79078e39737b4387',
|
||||
'type' => 'application',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -338,9 +338,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'zotlabs/hubzilla' => array(
|
||||
'pretty_version' => 'dev-9.0RC',
|
||||
'version' => 'dev-9.0RC',
|
||||
'reference' => 'a18e873d08e733225c70b0ace31c3cbb025ff906',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '3c0d6339bb12bd7fbf65ba7a79078e39737b4387',
|
||||
'type' => 'application',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
2
view/css/bootstrap-red.css
vendored
2
view/css/bootstrap-red.css
vendored
@@ -62,6 +62,6 @@ a {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
ol, ul, dl {
|
||||
ol, ul, dl, pre {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -1046,6 +1046,8 @@ function liveUpdate(notify_id) {
|
||||
in_progress = false;
|
||||
$('#image_counter').html('');
|
||||
|
||||
// remove modal backdrop in case the update was triggered from a modal
|
||||
$('.modal-backdrop').remove();
|
||||
})
|
||||
.done( function( instance ) {
|
||||
//console.log('all images successfully loaded');
|
||||
|
||||
@@ -996,6 +996,10 @@ img.mail-conv-sender-photo {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.wall-item-pinned i {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.wall-item-content-wrapper {
|
||||
background-color: var(--bs-tertiary-bg);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<ul class="nav nav-pills flex-column">
|
||||
<li class="nav-item"><a href="{{$base}}" class="nav-link{{if $sel_all}} active{{/if}}">{{$all}}</a></li>
|
||||
{{foreach $terms as $term}}
|
||||
<li class="nav-item"><a href="{{$base}}/?cat={{$term.name|urlencode}}" class="nav-link{{if $term.selected}} active{{/if}}">{{$term.name}}</a></li>
|
||||
<li class="nav-item"><a href="{{$base}}/?cat={{$term.name|escape:'url'}}" class="nav-link{{if $term.selected}} active{{/if}}">{{$term.name}}</a></li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -205,11 +205,11 @@
|
||||
{{/if}}
|
||||
{{if $item.edpost && $item.dreport}}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
|
||||
<a class="dropdown-item" href="dreport/{{$item.dreport_link}}">{{$item.dreport}}</a>
|
||||
{{/if}}
|
||||
{{if $item.settings}}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item conversation-settings-link" href="" data-toggle="modal" data-target="#conversation_settings">{{$item.settings}}</a>
|
||||
<a class="dropdown-item conversation-settings-link" href="" data-bs-toggle="modal" data-bs-target="#conversation_settings">{{$item.settings}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user