mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
Code cleanup + standards
This commit is contained in:
parent
d799662992
commit
b9f4a6e4f0
2 changed files with 18 additions and 18 deletions
|
@ -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") {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
$(function(){
|
||||
|
||||
|
||||
$("#cnftheme").click(function(){
|
||||
$.colorbox({
|
||||
width: 800,
|
||||
|
@ -22,16 +22,16 @@
|
|||
data[$(this).attr('name')] = $(this).children(":selected").val();
|
||||
});
|
||||
console.log(":)", url, data);
|
||||
|
||||
|
||||
$.post(url, data, function(data) {
|
||||
if(timer) clearTimeout(timer);
|
||||
NavUpdate();
|
||||
$.colorbox.close();
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
@ -40,7 +40,7 @@
|
|||
</script>
|
||||
<div id='adminpage'>
|
||||
<h1>{{$title}} - {{$page}}</h1>
|
||||
|
||||
|
||||
<form action="{{$baseurl}}/admin/site" method="post">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
|||
{{include file="field_checkbox.tpl" field=$hide_help}}
|
||||
{{include file="field_select.tpl" field=$singleuser}}
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||
|
||||
|
||||
<h3>{{$registration}}</h3>
|
||||
{{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}}
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||
|
||||
|
||||
<h3>{{$corporate}}</h3>
|
||||
{{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}}
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||
|
||||
|
||||
<h3>{{$advanced}}</h3>
|
||||
{{include file="field_select.tpl" field=$rino}}
|
||||
{{include file="field_checkbox.tpl" field=$no_utf}}
|
||||
|
@ -156,7 +156,7 @@
|
|||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
{{* separate form for relocate... *}}
|
||||
<form action="{{$baseurl}}/admin/site" method="post">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
|
@ -165,5 +165,5 @@
|
|||
<input type="hidden" name="page_site" value="{{$submit|escape:'html'}}">
|
||||
<div class="submit"><input type="submit" name="relocate" value="{{$submit|escape:'html'}}" /></div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue