Skip to content
Permalink
Browse files

- Removed ellipsis from westr::cut() when $ellipsis was set to false …

…but the string was empty. If it's empty, nothing was cut, so the ellipsis stands for nothing. (Class-String.php)

! Fixed a link to Wedge, just in case. It's not in use for now. (Themes.php)

PS: And yes, I'm alive and well, and still ready to commit to Wedge at any point. It just so happens that I have no other bugs to fix, and I have no incentives to keep working on implementing new features.
  • Loading branch information...
Nao committed May 7, 2019
1 parent 1e2eaf9 commit b3396c7dddb48ad2522423ff593c41fad58d309a
Showing with 2 additions and 2 deletions.
  1. +1 −1 core/app/Class-String.php
  2. +1 −1 core/app/Themes.php
@@ -317,7 +317,7 @@ static function cut($string, $max_length = 255, $check_multibyte = true, $cut_lo
static $test_mb = false, $strlen;
if (empty($string))
return $ellipsis ? '…' : '';
return '';
if (!$check_multibyte)
return rtrim(preg_replace('~&#?\w*$~', '', substr($string, 0, $max_length))) . ($ellipsis && strlen($string) > $max_length ? '…' : '');
@@ -522,7 +522,7 @@ function ThemeInstall()
elseif (isset($_REQUEST['theme_gz']))
{
// Check that the theme is from wedge.org, for now... maybe add mirroring later.
if (preg_match('~^http://[\w-]+\.wedge\.org/~', $_REQUEST['theme_gz']) == 0 || strpos($_REQUEST['theme_gz'], 'dlattach') !== false)
if (preg_match('~^https://[\w-]+\.wedge\.org/~', $_REQUEST['theme_gz']) == 0 || strpos($_REQUEST['theme_gz'], 'dlattach') !== false)
fatal_lang_error('only_on_wedge');
$extracted = read_tgz_file($_REQUEST['theme_gz'], ROOT_DIR . '/Themes/' . $theme_name, false, true);

0 comments on commit b3396c7

Please sign in to comment.
You can’t perform that action at this time.