mirror of
https://github.com/e107inc/e107.git
synced 2025-07-25 00:41:52 +02:00
Merge branch 'e107inc:master' into master
This commit is contained in:
@@ -683,7 +683,7 @@ class admin_log_form_ui extends e_admin_form_ui
|
||||
{
|
||||
$id = $this->getController()->getListModel()->get('dblog_id');
|
||||
$ret ="<a class='e-expandit' href='#rem-".$id."'>".RL_LAN_087."</a>";
|
||||
$ret .= "<div style='display:none;width:33vw' id='rem-".$id."'>";
|
||||
$ret .= "<div class='logcanvas' style='display:none;width:33vw' id='rem-".$id."'>";
|
||||
$text = str_replace("<br />","\n",$text);
|
||||
$text = str_replace("\","/",$text);
|
||||
|
||||
|
@@ -27,7 +27,7 @@ define('e_CAPTCHA_FONTCOLOR','#F9A533');
|
||||
// Required for a clean v1.x -> v2 upgrade.
|
||||
$core = e107::getConfig();
|
||||
$adminTheme = $core->get('admintheme');
|
||||
if($adminTheme !== 'bootstrap3'/* && $adminTheme !== 'bootstrap5'*/)
|
||||
if($adminTheme !== 'bootstrap3' && $adminTheme !== 'bs5')
|
||||
{
|
||||
$core->update('admintheme','bootstrap3');
|
||||
$core->update('adminstyle','infopanel');
|
||||
|
@@ -3079,7 +3079,7 @@ class media_admin_ui extends e_admin_ui
|
||||
$text .= "</div>
|
||||
|
||||
<div class='col-md-12 spacer clearfix'>
|
||||
<div class='row buttons-bar'>
|
||||
<div class='buttons-bar'>
|
||||
<input type='hidden' name='show_avatars' value='1' />
|
||||
".$frm->admin_button('e_check_all', LAN_CHECKALL, 'action'). '
|
||||
' .$frm->admin_button('e_uncheck_all', LAN_UNCHECKALL, 'action'). '
|
||||
|
@@ -2617,12 +2617,14 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
||||
e107::setRegistry('core/e107/menu-manager/curLayout',$action);
|
||||
|
||||
$icon = e107::getParser()->toIcon('e-menus-24');
|
||||
$caption = $icon. '<span>' .ADLAN_6. '</span>';
|
||||
$caption = '<span>' .ADLAN_6. '</span>';
|
||||
|
||||
$diz = MENLAN_58;
|
||||
|
||||
$caption .= "<span class='e-help-icon pull-right'><a data-placement=\"bottom\" class='e-tip' title=\"".e107::getParser()->toAttribute($diz). '">' .defset('ADMIN_INFO_ICON'). '</a></span>';
|
||||
|
||||
$var['_extras_']['icon'] = e107::getParser()->toIcon('e-menus-24');
|
||||
|
||||
return e107::getNav()->admin($caption,$action, $var);
|
||||
|
||||
|
||||
|
@@ -4395,10 +4395,18 @@ class e_parse
|
||||
|
||||
if (!empty($options['base64'])) // embed image data into URL.
|
||||
{
|
||||
$content = e107::getFile()->getRemoteContent($url); // returns false during unit tests, works otherwise.
|
||||
$content = e107::getFile()->getRemoteContent($url);
|
||||
if (!empty($content))
|
||||
{
|
||||
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
if(!empty($file))
|
||||
{
|
||||
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
}
|
||||
else
|
||||
{
|
||||
$ext = strtolower(pathinfo($url, PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
$url = 'data:image/' . $ext . ';base64,' . base64_encode($content);
|
||||
}
|
||||
}
|
||||
@@ -4923,7 +4931,27 @@ class e_parse
|
||||
|
||||
$file = $this->replaceConstants($file, 'abs');
|
||||
|
||||
$mime = varset($parm['mime'], 'audio/mpeg');
|
||||
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
switch (strtolower($ext))
|
||||
{
|
||||
|
||||
case 'wav':
|
||||
$mime = 'audio/wav';
|
||||
break;
|
||||
case 'ogg':
|
||||
$mime = 'audio/ogg';
|
||||
break;
|
||||
case 'mp3':
|
||||
default:
|
||||
$mime = 'audio/mpeg';
|
||||
break;
|
||||
}
|
||||
|
||||
if(!empty($parm['mime']))
|
||||
{
|
||||
$mime = $parm['mime'];
|
||||
}
|
||||
|
||||
$autoplay = !empty($parm['autoplay']) ? 'autoplay ' : '';
|
||||
$controls = !empty($parm['controls']) ? 'controls' : '';
|
||||
|
@@ -2599,17 +2599,17 @@ class themeHandler
|
||||
$text .= "
|
||||
|
||||
<ul class='nav nav-tabs'>
|
||||
<li class='active'><a data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-configure'>".LAN_CONFIGURE."</a></li>";
|
||||
<li class='nav-item active'><a class='nav-link active' data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-configure'>".LAN_CONFIGURE."</a></li>";
|
||||
|
||||
|
||||
if($this->themeConfigObj && call_user_func(array(&$this->themeConfigObj, 'config')) && $mode == self::RENDER_SITEPREFS)
|
||||
{
|
||||
$text .= "<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-customconfig'>".LAN_PREFS."</a></li>\n";
|
||||
$text .= "<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-customconfig'>".LAN_PREFS."</a></li>\n";
|
||||
}
|
||||
|
||||
if($this->themeConfigObj && call_user_func(array(&$this->themeConfigObj, 'help')))
|
||||
{
|
||||
$text .= "<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-help'>".LAN_HELP."</a></li>\n";
|
||||
$text .= "<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-thememanager-help'>".LAN_HELP."</a></li>\n";
|
||||
}
|
||||
|
||||
$text .= "</ul>
|
||||
|
@@ -1297,9 +1297,9 @@ $columnInfo = array(
|
||||
$text = "
|
||||
|
||||
<ul class='nav nav-tabs'>
|
||||
<li class='active'><a data-toggle='tab' data-bs-toggle='tab' href='#download-create'>".DOWLAN_175."</a></li>
|
||||
<li><a data-toggle='tab' data-bs-toggle='tab' href='#download-edit-external'>".DOWLAN_176."</a></li>
|
||||
<li><a data-toggle='tab' data-bs-toggle='tab' href='#download-edit-mirror'>".DOWLAN_128."</a></li>
|
||||
<li class='nav-item active'><a class='nav-link active' data-toggle='tab' data-bs-toggle='tab' href='#download-create'>".DOWLAN_175."</a></li>
|
||||
<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#download-edit-external'>".DOWLAN_176."</a></li>
|
||||
<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#download-edit-mirror'>".DOWLAN_128."</a></li>
|
||||
</ul>
|
||||
<form method='post' action='".e_SELF."?".e_QUERY."' id='myform'>
|
||||
<div class='tab-content'>
|
||||
@@ -2181,11 +2181,11 @@ $columnInfo = array(
|
||||
$text = "
|
||||
|
||||
<ul class='nav nav-tabs'>
|
||||
<li class='active'><a data-toggle='tab' data-bs-toggle='tab' href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li>
|
||||
<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li>
|
||||
<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li>
|
||||
<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-download-download4'>".LAN_DL_DOWNLOAD_OPT_SECURITY."</a></li>
|
||||
<li><a data-toggle='tab' data-bs-toggle='tab' href='#core-download-download5'>".LAN_DL_UPLOAD."</a></li>
|
||||
<li class='nav-item active'><a class='nav-link active' data-toggle='tab' data-bs-toggle='tab' href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li>
|
||||
<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li>
|
||||
<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li>
|
||||
<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-download-download4'>".LAN_DL_DOWNLOAD_OPT_SECURITY."</a></li>
|
||||
<li class='nav-item'><a class='nav-link' data-toggle='tab' data-bs-toggle='tab' href='#core-download-download5'>".LAN_DL_UPLOAD."</a></li>
|
||||
</ul>
|
||||
|
||||
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
|
||||
@@ -2657,7 +2657,7 @@ class download_broken_ui extends e_admin_ui
|
||||
public function renderHelp()
|
||||
{
|
||||
$help_text = str_replace("[br]", "<br />", DOWLAN_HELP_11);
|
||||
$help_text = str_replace(array("[", "]"), array("<a href='".e_ADMIN_ABS."notify.php'>"), $help_text);
|
||||
$help_text = str_replace(array("[", "]"), array("<a href='".e_ADMIN_ABS."notify.php'>", "</a>"), $help_text);
|
||||
|
||||
return array('caption' => LAN_HELP, 'text' => $help_text);
|
||||
}
|
||||
|
@@ -1035,7 +1035,7 @@ e107::css('inline',"
|
||||
public function renderHelp()
|
||||
{
|
||||
$help_text = str_replace("[br]", "<br />", FORLAN_189);
|
||||
$help_text = str_replace(array("[", "]"), array("<a href='".e_ADMIN_ABS."notify.php'>"), $help_text);
|
||||
$help_text = str_replace(array("[", "]"), array("<a href='".e_ADMIN_ABS."notify.php'>", "</a>"), $help_text);
|
||||
|
||||
return array('caption' => LAN_HELP, 'text' => $help_text);
|
||||
}
|
||||
|
@@ -2433,16 +2433,24 @@ EXPECTED;
|
||||
'alt="mytitle"',
|
||||
)
|
||||
),
|
||||
/** @fixme - doesn't pass under CLI */
|
||||
/*
|
||||
|
||||
7 => array(
|
||||
'input' => array('user_image'=>'avatartest.png'),
|
||||
'parms' => array('w'=>50, 'h'=>50, 'crop'=>true, 'base64'=>true, 'shape'=>'circle'),
|
||||
'expected' => array(
|
||||
"src='data:image/png;base64,",
|
||||
"class='img-circle user-avatar'"
|
||||
"class='img-circle rounded-circle user-avatar'"
|
||||
)
|
||||
),*/
|
||||
),
|
||||
|
||||
8 => array(
|
||||
'input' => array('user_image'=>'https://e107.org/e107_images/generic/blank_avatar.jpg'), // Test remote avatar
|
||||
'parms' => array('w'=>50, 'h'=>50, 'crop'=>true, 'base64'=>true, 'shape'=>'circle'),
|
||||
'expected' => array(
|
||||
"src='data:image/jpg;base64,",
|
||||
"class='img-circle rounded-circle user-avatar'"
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
@@ -2452,7 +2460,7 @@ EXPECTED;
|
||||
$result = $this->tp->toAvatar($var['input'], $var['parms']);
|
||||
foreach ($var['expected'] as $str)
|
||||
{
|
||||
$this->assertStringContainsString($str, $result, "Failed on index #" . $index);
|
||||
self::assertStringContainsString($str, $result, "Failed on index #" . $index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2651,7 +2659,24 @@ Your browser does not support the audio tag.
|
||||
</audio>';
|
||||
|
||||
$result = $this->tp->toAudio('{e_MEDIA}myfile.mp3');
|
||||
$this->assertEquals($expected, $result);
|
||||
self::assertEquals($expected, $result);
|
||||
|
||||
$expected = '<audio controls style="max-width:100%" >
|
||||
<source src="/e107_media/000000test/myfile.wav" type="audio/wav">
|
||||
Your browser does not support the audio tag.
|
||||
</audio>';
|
||||
|
||||
$result = $this->tp->toAudio('{e_MEDIA}myfile.wav');
|
||||
self::assertEquals($expected, $result);
|
||||
|
||||
// Override mime.
|
||||
$expected = '<audio controls style="max-width:100%" >
|
||||
<source src="/e107_media/000000test/myfile.php" type="audio/wav">
|
||||
Your browser does not support the audio tag.
|
||||
</audio>';
|
||||
|
||||
$result = $this->tp->toAudio('{e_MEDIA}myfile.php', ['mime' => 'audio/wav']);
|
||||
self::assertEquals($expected, $result);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user