From b9f4a6e4f09aabdc99751602e37f7e9e1b57f8d6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 25 Mar 2017 01:54:16 -0400 Subject: [PATCH] Code cleanup + standards --- include/oembed.php | 14 +++++++------- view/templates/admin_site.tpl | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/oembed.php b/include/oembed.php index a1945894fc..d0a2bc8643 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -17,10 +17,10 @@ function oembed_replacecb($matches){ /** * @brief Get data from an URL to embed its content. - * + * * @param string $embedurl The URL from which the data should be fetched. * @param bool $no_rich_type If set to true rich type content won't be fetched. - * + * * @return bool|object Returns object with embed content or false if no embedable * content exists */ @@ -41,8 +41,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ // These media files should now be caught in bbcode.php // left here as a fallback in case this is called from another source - $noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm"); - $ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION); + $noexts = array("mp3", "mp4", "ogg", "ogv", "oga", "ogm", "webm"); + $ext = pathinfo(strtolower($embedurl), PATHINFO_EXTENSION); if (is_null($txt)) { @@ -85,10 +85,10 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ } } - $txt=trim($txt); + $txt = trim($txt); - if ($txt[0]!="{") { - $txt='{"type":"error"}'; + if ($txt[0] != "{") { + $txt = '{"type":"error"}'; } else { //save in cache $j = json_decode($txt); if ($j->type != "error") { diff --git a/view/templates/admin_site.tpl b/view/templates/admin_site.tpl index fdba195f17..5dfef2b97f 100644 --- a/view/templates/admin_site.tpl +++ b/view/templates/admin_site.tpl @@ -1,6 +1,6 @@

{{$title}} - {{$page}}

- +
@@ -59,7 +59,7 @@ {{include file="field_checkbox.tpl" field=$hide_help}} {{include file="field_select.tpl" field=$singleuser}}
- +

{{$registration}}

{{include file="field_input.tpl" field=$register_text}} {{include file="field_select.tpl" field=$register_policy}} @@ -74,7 +74,7 @@ {{include file="field_input.tpl" field=$maximagelength}} {{include file="field_input.tpl" field=$jpegimagequality}}
- +

{{$corporate}}

{{include file="field_input.tpl" field=$allowed_sites}} {{include file="field_input.tpl" field=$allowed_email}} @@ -107,11 +107,11 @@ {{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$enotify_no_content}} - {{include file="field_checkbox.tpl" field=$private_addons}} + {{include file="field_checkbox.tpl" field=$private_addons}} {{include file="field_checkbox.tpl" field=$disable_embedded}} {{include file="field_checkbox.tpl" field=$allow_users_remote_self}}
- +

{{$advanced}}

{{include file="field_select.tpl" field=$rino}} {{include file="field_checkbox.tpl" field=$no_utf}} @@ -156,7 +156,7 @@
- + {{* separate form for relocate... *}}
@@ -165,5 +165,5 @@
- +
-- 2.39.5