Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2020-12-01 17:30:20 -08:00
commit e5313d0d69
3 changed files with 13 additions and 4 deletions

View file

@ -44,7 +44,7 @@ class Site_projects {
static function site_sort($a,$b) { static function site_sort($a,$b) {
if ($a['site_type'] === $b['site_type']) { if ($a['site_type'] === $b['site_type']) {
return stricmp($a['site_project'],$b['site_project']); return strcasecmp($b['site_project'],$a['site_project']);
} }
return (($a['site_type'] < $b['site_type']) ? -1 : 1); return (($a['site_type'] < $b['site_type']) ? -1 : 1);
} }

View file

@ -16,7 +16,7 @@ use Zotlabs\Daemon\Run;
* @brief This file defines some global constants and includes the central App class. * @brief This file defines some global constants and includes the central App class.
*/ */
define ( 'STD_VERSION', '20.12.01' ); define ( 'STD_VERSION', '20.12.02' );
define ( 'ZOT_REVISION', '6.0' ); define ( 'ZOT_REVISION', '6.0' );
define ( 'DB_UPDATE_VERSION', 1246 ); define ( 'DB_UPDATE_VERSION', 1246 );

View file

@ -1088,6 +1088,15 @@ function bb_fonttag($matches) {
return '<span style="font-family: ' . bb_xss($matches[1]) . ';">' . $matches[2] . '</span>'; return '<span style="font-family: ' . bb_xss($matches[1]) . ';">' . $matches[2] . '</span>';
} }
function bb_sizetag($matches) {
return '<span style="font-size: ' . bb_xss($matches[1]) . ';">' . $matches[2] . '</span>';
}
function bb_hltag($matches) {
return '<span style="background-color: ' . bb_xss($matches[1]) . ';">' . $matches[2] . '</span>';
}
function bb_xss($s) { function bb_xss($s) {
// don't allow functions of any kind // don't allow functions of any kind
@ -1519,14 +1528,14 @@ function bbcode($Text, $options = []) {
// Check for highlighted text // Check for highlighted text
if (strpos($Text,'[/hl]') !== false) { if (strpos($Text,'[/hl]') !== false) {
$Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text); $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text);
$Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "<span style=\"background-color: $1;\">$2</span>", $Text); $Text = preg_replace_callback("(\[hl=(.*?)\](.*?)\[\/hl\])ism", 'bb_hltag', $Text);
} }
// Check for sized text // Check for sized text
// [size=50] --> font-size: 50px (with the unit). // [size=50] --> font-size: 50px (with the unit).
if (strpos($Text,'[/size]') !== false) { if (strpos($Text,'[/size]') !== false) {
$Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism", "<span style=\"font-size: $1px;\">$2</span>", $Text); $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism", "<span style=\"font-size: $1px;\">$2</span>", $Text);
$Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism", "<span style=\"font-size: $1;\">$2</span>", $Text); $Text = preg_replace_callback("(\[size=(.*?)\](.*?)\[\/size\])ism", 'bb_sizetag', $Text);
} }
// Check for h1 // Check for h1
if (strpos($Text,'[h1]') !== false) { if (strpos($Text,'[h1]') !== false) {