mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 20:21:51 +02:00
Fixed error in {XURL_ICONS} shortcode. Added a test. Fixed some warnings in the admin/language page.
This commit is contained in:
parent
ef8844b019
commit
76dbd4469e
@ -321,16 +321,16 @@ class lancheck
|
||||
|
||||
public function errorsOnly($val)
|
||||
{
|
||||
$this->errorsOnly = $val;
|
||||
$this->errorsOnly = (bool) $val;
|
||||
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
|
||||
$mode = $_GET['sub'];
|
||||
$lan = $_GET['lan'];
|
||||
$file = $_GET['file'];
|
||||
$mode = varset($_GET['sub']);
|
||||
$lan = varset($_GET['lan']);
|
||||
$file = varset($_GET['file']);
|
||||
|
||||
$this->transLanguage = $lan;
|
||||
|
||||
@ -865,12 +865,13 @@ class lancheck
|
||||
$xml = e107::getXml();
|
||||
|
||||
$feed = 'https://e107.org/languagepacks.xml';
|
||||
|
||||
$version = e_VERSION;
|
||||
|
||||
if(!empty($version))
|
||||
{
|
||||
list($ver,$tmp) = explode("-", $version);
|
||||
$tmp = explode("-", $version);
|
||||
$ver = varset($tmp[0]);
|
||||
|
||||
$feed .= "?ver=". preg_replace('/[^\d\.]/','', $ver);
|
||||
}
|
||||
|
||||
@ -913,7 +914,7 @@ class lancheck
|
||||
|
||||
$languages[$id] = array(
|
||||
'name' => $att['name'],
|
||||
'author' => $att['author'],
|
||||
'author' => varset($att['author']),
|
||||
'infoURL' => $att['infourl'],
|
||||
'tag' => $att['tag'],
|
||||
// 'folder' => $att['folder'],
|
||||
|
@ -179,11 +179,11 @@ if(!empty($_GET['iframe']))
|
||||
function ToolsPage()
|
||||
{
|
||||
$this->loadPackInfo();
|
||||
$pref = e107::getPref();
|
||||
$pref = e107::getPref('multilanguage_verify_errorsonly', false);
|
||||
/** @var lancheck $lck */
|
||||
$lck = e107::getSingleton('lancheck', e_ADMIN."lancheck.php");
|
||||
|
||||
$lck->errorsOnly($pref['multilanguage_verify_errorsonly']);
|
||||
$lck->errorsOnly($pref);
|
||||
// show_packs();
|
||||
|
||||
if($return = $lck->init())
|
||||
|
@ -293,6 +293,7 @@ class e_user_model extends e_admin_model
|
||||
'Accoona-AI-Agent',
|
||||
'AddSugarSpiderBot',
|
||||
'AnyApexBot',
|
||||
'applebot',
|
||||
'Arachmo',
|
||||
'B-l-i-t-z-B-O-T',
|
||||
'Baiduspider',
|
||||
|
@ -90,11 +90,11 @@ class social_shortcodes extends e_shortcode
|
||||
);
|
||||
|
||||
// print_a($social);
|
||||
|
||||
$class = (!empty($parm['size'])) ? 'fa-'.$parm['size'] : '';
|
||||
$class .= (isset($parm['class'])) ? (string) $parm['class'] : $class;
|
||||
|
||||
|
||||
$class = (isset($parm['class'])) ? (string) $parm['class'] : '';
|
||||
$class .= (!empty($parm['size'])) ? 'fa-'.$parm['size'] : '';
|
||||
|
||||
if(!empty($parm['type']))
|
||||
{
|
||||
$newList = array();
|
||||
|
@ -647,6 +647,33 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
|
||||
|
||||
}
|
||||
|
||||
public function testSocialShortcodes()
|
||||
{
|
||||
require_once(e_PLUGIN."social/e_shortcode.php");
|
||||
|
||||
try
|
||||
{
|
||||
/** @var social_shortcodes $sc */
|
||||
$sc = $this->make('social_shortcodes');
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$this->fail($e->getMessage());
|
||||
}
|
||||
|
||||
$sc->__construct();
|
||||
|
||||
parse_str('type=facebook,twitter,youtube,flickr,vimeo,google-plus,github,instagram,linkedin&size=3x', $parm);
|
||||
|
||||
$result = $sc->sc_xurl_icons($parm);
|
||||
|
||||
$this->assertStringContainsString('<span class="e-social-twitter fa-3x"></span>', $result);
|
||||
$this->assertStringContainsString('<span class="e-social-youtube fa-3x"></span>', $result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testUserShortcodes()
|
||||
{
|
||||
require_once(e_CORE."shortcodes/batch/user_shortcodes.php");
|
||||
|
Loading…
x
Reference in New Issue
Block a user