Skip to content

Commit

Permalink
Fixed new Utils::pathinfo() and Utils::basename() being too stric…
Browse files Browse the repository at this point in the history
…t for legacy use [#3542]
  • Loading branch information
mahagr committed Feb 22, 2022
1 parent 6d0d6c2 commit edea391
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
2. [](#bugfix)
* Fixed `'mbstring' extension is not loaded` error, use Polyfill instead [#3504](https://github.com/getgrav/grav/pull/3504)
* Fixed new `Utils::pathinfo()` and `Utils::basename()` being too strict for legacy use [#3542](https://github.com/getgrav/grav/issues/3542)
* Fixed non-standard video html atributes generated by `{{ media.html() }}` [#3540](https://github.com/getgrav/grav/issues/3540)

# v1.7.30
## 02/07/2022
Expand Down
10 changes: 5 additions & 5 deletions system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait MediaPlayerTrait
public function controls($status = true)
{
if ($status) {
$this->attributes['controls'] = true;
$this->attributes['controls'] = 'controls';
} else {
unset($this->attributes['controls']);
}
Expand All @@ -42,7 +42,7 @@ public function controls($status = true)
public function loop($status = false)
{
if ($status) {
$this->attributes['loop'] = true;
$this->attributes['loop'] = 'loop';
} else {
unset($this->attributes['loop']);
}
Expand All @@ -59,7 +59,7 @@ public function loop($status = false)
public function autoplay($status = false)
{
if ($status) {
$this->attributes['autoplay'] = true;
$this->attributes['autoplay'] = 'autoplay';
} else {
unset($this->attributes['autoplay']);
}
Expand All @@ -76,7 +76,7 @@ public function autoplay($status = false)
public function muted($status = false)
{
if ($status) {
$this->attributes['muted'] = true;
$this->attributes['muted'] = 'muted';
} else {
unset($this->attributes['muted']);
}
Expand Down Expand Up @@ -108,6 +108,6 @@ public function preload($preload = null)
*/
public function resetPlayer()
{
$this->attributes['controls'] = true;
$this->attributes['controls'] = 'controls';
}
}
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Media/Traits/VideoMediaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function poster($urlImage)
public function playsinline($status = false)
{
if ($status) {
$this->attributes['playsinline'] = true;
$this->attributes['playsinline'] = 'playsinline';
} else {
unset($this->attributes['playsinline']);
}
Expand Down

0 comments on commit edea391

Please sign in to comment.