mirror of
https://github.com/friendica/friendica
synced 2025-04-30 00:24:24 +02:00
Merge branch 'develop' into bug/6211-fix-contact-nets-all
This commit is contained in:
commit
924869ab5b
104 changed files with 903 additions and 956 deletions
|
@ -58,7 +58,7 @@ class Nav
|
|||
public static function build(App $a)
|
||||
{
|
||||
// Placeholder div for popup panel
|
||||
$nav = '<div id="panel" style="display: none;"></div>' ;
|
||||
$nav = '<div id="panel" style="display: none;"></div>';
|
||||
|
||||
$nav_info = self::getInfo($a);
|
||||
|
||||
|
@ -170,7 +170,7 @@ class Nav
|
|||
// "Home" should also take you home from an authenticated remote profile connection
|
||||
$homelink = Profile::getMyURL();
|
||||
if (! $homelink) {
|
||||
$homelink = ((x($_SESSION, 'visitor_home')) ? $_SESSION['visitor_home'] : '');
|
||||
$homelink = defaults($_SESSION, 'visitor_home', '');
|
||||
}
|
||||
|
||||
if (($a->module != 'home') && (! (local_user()))) {
|
||||
|
|
|
@ -308,12 +308,12 @@ class OEmbed
|
|||
}
|
||||
|
||||
$domain = parse_url($url, PHP_URL_HOST);
|
||||
if (!x($domain)) {
|
||||
if (empty($domain)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$str_allowed = Config::get('system', 'allowed_oembed', '');
|
||||
if (!x($str_allowed)) {
|
||||
if (empty($str_allowed)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ class OEmbed
|
|||
throw new Exception('OEmbed failed for URL: ' . $url);
|
||||
}
|
||||
|
||||
if (x($title)) {
|
||||
if (!empty($title)) {
|
||||
$o->title = $title;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,12 +130,12 @@ class BBCode extends BaseObject
|
|||
|
||||
$type = "";
|
||||
preg_match("/type='(.*?)'/ism", $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$type = strtolower($matches[1]);
|
||||
}
|
||||
|
||||
preg_match('/type="(.*?)"/ism', $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$type = strtolower($matches[1]);
|
||||
}
|
||||
|
||||
|
@ -153,12 +153,12 @@ class BBCode extends BaseObject
|
|||
|
||||
$url = "";
|
||||
preg_match("/url='(.*?)'/ism", $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$url = $matches[1];
|
||||
}
|
||||
|
||||
preg_match('/url="(.*?)"/ism', $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$url = $matches[1];
|
||||
}
|
||||
|
||||
|
@ -168,12 +168,12 @@ class BBCode extends BaseObject
|
|||
|
||||
$title = "";
|
||||
preg_match("/title='(.*?)'/ism", $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$title = $matches[1];
|
||||
}
|
||||
|
||||
preg_match('/title="(.*?)"/ism', $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$title = $matches[1];
|
||||
}
|
||||
|
||||
|
@ -186,12 +186,12 @@ class BBCode extends BaseObject
|
|||
|
||||
$image = "";
|
||||
preg_match("/image='(.*?)'/ism", $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$image = $matches[1];
|
||||
}
|
||||
|
||||
preg_match('/image="(.*?)"/ism', $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$image = $matches[1];
|
||||
}
|
||||
|
||||
|
@ -201,12 +201,12 @@ class BBCode extends BaseObject
|
|||
|
||||
$preview = "";
|
||||
preg_match("/preview='(.*?)'/ism", $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$preview = $matches[1];
|
||||
}
|
||||
|
||||
preg_match('/preview="(.*?)"/ism', $attributes, $matches);
|
||||
if (x($matches, 1)) {
|
||||
if (!empty($matches[1])) {
|
||||
$preview = $matches[1];
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ class BBCode extends BaseObject
|
|||
*/
|
||||
|
||||
$has_title = !empty($item['title']);
|
||||
$plink = (!empty($item['plink']) ? $item['plink'] : '');
|
||||
$plink = defaults($item, 'plink', '');
|
||||
$post = self::getAttachmentData($body);
|
||||
|
||||
// if nothing is found, it maybe having an image.
|
||||
|
@ -1662,7 +1662,7 @@ class BBCode extends BaseObject
|
|||
// Summary (e.g. title) is required, earlier revisions only required description (in addition to
|
||||
// start which is always required). Allow desc with a missing summary for compatibility.
|
||||
|
||||
if ((x($ev, 'desc') || x($ev, 'summary')) && x($ev, 'start')) {
|
||||
if ((!empty($ev['desc']) || !empty($ev['summary'])) && !empty($ev['start'])) {
|
||||
$sub = Event::getHTML($ev, $simple_html);
|
||||
|
||||
$text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism", '', $text);
|
||||
|
|
|
@ -908,7 +908,7 @@ class HTML
|
|||
public static function micropro($contact, $redirect = false, $class = '', $textmode = false)
|
||||
{
|
||||
// Use the contact URL if no address is available
|
||||
if (!x($contact, "addr")) {
|
||||
if (empty($contact['addr'])) {
|
||||
$contact["addr"] = $contact["url"];
|
||||
}
|
||||
|
||||
|
@ -924,7 +924,7 @@ class HTML
|
|||
}
|
||||
|
||||
// If there is some js available we don't need the url
|
||||
if (x($contact, 'click')) {
|
||||
if (!empty($contact['click'])) {
|
||||
$url = '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue