mirror of
https://github.com/e107inc/e107.git
synced 2025-07-13 19:16:22 +02:00
Fixed error in {XURL_ICONS} shortcode. Added a test. Fixed some warnings in the admin/language page.
This commit is contained in:
@ -321,16 +321,16 @@ class lancheck
|
|||||||
|
|
||||||
public function errorsOnly($val)
|
public function errorsOnly($val)
|
||||||
{
|
{
|
||||||
$this->errorsOnly = $val;
|
$this->errorsOnly = (bool) $val;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
|
||||||
$mode = $_GET['sub'];
|
$mode = varset($_GET['sub']);
|
||||||
$lan = $_GET['lan'];
|
$lan = varset($_GET['lan']);
|
||||||
$file = $_GET['file'];
|
$file = varset($_GET['file']);
|
||||||
|
|
||||||
$this->transLanguage = $lan;
|
$this->transLanguage = $lan;
|
||||||
|
|
||||||
@ -865,12 +865,13 @@ class lancheck
|
|||||||
$xml = e107::getXml();
|
$xml = e107::getXml();
|
||||||
|
|
||||||
$feed = 'https://e107.org/languagepacks.xml';
|
$feed = 'https://e107.org/languagepacks.xml';
|
||||||
|
|
||||||
$version = e_VERSION;
|
$version = e_VERSION;
|
||||||
|
|
||||||
if(!empty($version))
|
if(!empty($version))
|
||||||
{
|
{
|
||||||
list($ver,$tmp) = explode("-", $version);
|
$tmp = explode("-", $version);
|
||||||
|
$ver = varset($tmp[0]);
|
||||||
|
|
||||||
$feed .= "?ver=". preg_replace('/[^\d\.]/','', $ver);
|
$feed .= "?ver=". preg_replace('/[^\d\.]/','', $ver);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -913,7 +914,7 @@ class lancheck
|
|||||||
|
|
||||||
$languages[$id] = array(
|
$languages[$id] = array(
|
||||||
'name' => $att['name'],
|
'name' => $att['name'],
|
||||||
'author' => $att['author'],
|
'author' => varset($att['author']),
|
||||||
'infoURL' => $att['infourl'],
|
'infoURL' => $att['infourl'],
|
||||||
'tag' => $att['tag'],
|
'tag' => $att['tag'],
|
||||||
// 'folder' => $att['folder'],
|
// 'folder' => $att['folder'],
|
||||||
|
@ -179,11 +179,11 @@ if(!empty($_GET['iframe']))
|
|||||||
function ToolsPage()
|
function ToolsPage()
|
||||||
{
|
{
|
||||||
$this->loadPackInfo();
|
$this->loadPackInfo();
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref('multilanguage_verify_errorsonly', false);
|
||||||
/** @var lancheck $lck */
|
/** @var lancheck $lck */
|
||||||
$lck = e107::getSingleton('lancheck', e_ADMIN."lancheck.php");
|
$lck = e107::getSingleton('lancheck', e_ADMIN."lancheck.php");
|
||||||
|
|
||||||
$lck->errorsOnly($pref['multilanguage_verify_errorsonly']);
|
$lck->errorsOnly($pref);
|
||||||
// show_packs();
|
// show_packs();
|
||||||
|
|
||||||
if($return = $lck->init())
|
if($return = $lck->init())
|
||||||
|
@ -293,6 +293,7 @@ class e_user_model extends e_admin_model
|
|||||||
'Accoona-AI-Agent',
|
'Accoona-AI-Agent',
|
||||||
'AddSugarSpiderBot',
|
'AddSugarSpiderBot',
|
||||||
'AnyApexBot',
|
'AnyApexBot',
|
||||||
|
'applebot',
|
||||||
'Arachmo',
|
'Arachmo',
|
||||||
'B-l-i-t-z-B-O-T',
|
'B-l-i-t-z-B-O-T',
|
||||||
'Baiduspider',
|
'Baiduspider',
|
||||||
|
@ -91,9 +91,9 @@ class social_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
// print_a($social);
|
// 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']))
|
if(!empty($parm['type']))
|
||||||
{
|
{
|
||||||
|
@ -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()
|
public function testUserShortcodes()
|
||||||
{
|
{
|
||||||
require_once(e_CORE."shortcodes/batch/user_shortcodes.php");
|
require_once(e_CORE."shortcodes/batch/user_shortcodes.php");
|
||||||
|
Reference in New Issue
Block a user