Merge branch 'develop' into bug/6211-fix-contact-nets-all

This commit is contained in:
Hypolite Petovan 2018-12-02 10:24:50 -05:00 committed by GitHub
commit 924869ab5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 903 additions and 956 deletions

View file

@ -15,7 +15,7 @@ $uid = Profile::getThemeUid();
$s_colorset = Config::get('duepuntozero', 'colorset');
$colorset = PConfig::get($uid, 'duepuntozero', 'colorset');
if (!x($colorset)) {
if (empty($colorset)) {
$colorset = $s_colorset;
}

View file

@ -392,7 +392,7 @@ class Color {
$hsl['L'] = ($hsl['L'] < 0) ? 0:$hsl['L']/100;
} else {
// We need to find out how much to darken
$hsl['L'] = $hsl['L']/2 ;
$hsl['L'] = $hsl['L']/2;
}
return $hsl;

View file

@ -36,7 +36,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
// if the page is an standard page (so we don't have it twice for modals)
//
/// @todo Think about to move js stuff in the footer
if (!$minimal && x($page, 'htmlhead')) {
if (!$minimal && !empty($page['htmlhead'])) {
echo $page['htmlhead'];
}
@ -67,7 +67,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
<body id="top" class="mod-<?php echo $a->module . " " . $is_singleuser_class . " " . $view_mode_class;?>">
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
<?php
if (x($page, 'nav') && !$minimal) {
if (!empty($page['nav']) && !$minimal) {
echo str_replace(
"~config.sitename~",
Config::get('config', 'sitename'),
@ -83,7 +83,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
if ($minimal) {
?>
<section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important; display:block!important;">
<?php if (x($page, 'content')) echo $page['content']; ?>
<?php if (!empty($page['content'])) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
<?php
@ -94,15 +94,15 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
<div class="container">
<div class="row">
<?php
if ((!x($_REQUEST, 'pagename') || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
if ((empty($_REQUEST['pagename']) || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
echo '
<aside class="col-lg-3 col-md-3 offcanvas-sm offcanvas-xs">';
if (x($page, 'aside')) {
if (!empty($page['aside'])) {
echo $page['aside'];
}
if (x($page, 'right_aside')) {
if (!empty($page['right_aside'])) {
echo $page['right_aside'];
}
@ -113,7 +113,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
<section class="sectiontop ';
echo $a->argv[0];
echo '-content-wrapper">';
if (x($page, 'content')) {
if (!empty($page['content'])) {
echo $page['content'];
}
echo '
@ -124,7 +124,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
} else {
echo '
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
if (x($page, 'content')) {
if (!empty($page['content'])) {
echo $page['content'];
}
echo '

View file

@ -22,7 +22,7 @@ function load_page(App $a)
require 'view/theme/frio/none.php';
} else {
$template = 'view/theme/' . $a->getCurrentTheme() . '/'
. ((x($a->page, 'template')) ? $a->page['template'] : 'default' ) . '.php';
. defaults($a->page, 'template', 'default' ) . '.php';
if (file_exists($template)) {
require_once $template;
} else {

View file

@ -7,20 +7,20 @@
<!DOCTYPE html >
<html>
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<title><?php if(!empty($page['title'])) echo $page['title'] ?></title>
<meta name="viewport" content="initial-scale=1.0">
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?>">
<script type="text/javascript">var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
<script type="text/javascript">var frio="<?php echo "view/theme/frio"; ?>";</script>
<?php $baseurl = Friendica\Core\System::baseUrl(); ?>
<?php $frio = "view/theme/frio"; ?>
<?php if(x($page,'htmlhead')) echo $page['htmlhead']; ?>
<?php if(!empty($page['htmlhead'])) echo $page['htmlhead']; ?>
</head>
<body id="top">
<?php if($_SERVER['REQUEST_URI'] == "/"){header('Location: /login');} ?>
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
<?php
if(x($page,'nav')) {
if(!empty($page['nav'])) {
echo str_replace("~config.sitename~",Friendica\Core\Config::get('config','sitename'),
str_replace("~system.banner~",Friendica\Core\Config::get('system','banner'),
$page['nav']
@ -33,8 +33,8 @@
<?php
echo"
<aside class=\"col-lg-3 col-md-3 hidden-sm hidden-xs\">
"; if(x($page,'aside')) echo $page['aside']; echo"
"; if(x($page,'right_aside')) echo $page['right_aside']; echo"
"; if(!empty($page['aside'])) echo $page['aside']; echo"
"; if(!empty($page['right_aside'])) echo $page['right_aside']; echo"
"; include('includes/photo_side.php'); echo"
</aside>
@ -42,7 +42,7 @@
<section class=\"sectiontop\">
<div class=\"panel "; echo $a->argv[0]; echo "-content-wrapper\">
<div class=\"panel-body\">";
if(x($page,'content')) echo $page['content']; echo"
if(!empty($page['content'])) echo $page['content']; echo"
<div id=\"pause\"></div> <!-- The pause/resume Ajax indicator -->
</div>
</div>

View file

@ -63,7 +63,7 @@ if ($a->module !== 'install') {
// Setting $scheme to '' wasn't working for some reason, so we'll check it's
// not --- like the mobile theme does instead.
// Allow layouts to over-ride the scheme.
if (x($_REQUEST, 'scheme')) {
if (!empty($_REQUEST['scheme'])) {
$scheme = $_REQUEST['scheme'];
}

View file

@ -301,7 +301,7 @@ function frio_remote_nav($a, &$nav)
*/
function frio_acl_lookup(App $a, &$results)
{
$nets = x($_GET, 'nets') ? Strings::escapeTags(trim($_GET['nets'])) : '';
$nets = !empty($_GET['nets']) ? Strings::escapeTags(trim($_GET['nets'])) : '';
// we introduce a new search type, r should do the same query like it's
// done in /src/Module/Contact.php for connections

View file

@ -1,38 +1,38 @@
<!DOCTYPE html >
<html>
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<title><?php if(!empty($page['title'])) echo $page['title'] ?></title>
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
<script type="text/javascript">
function ScrollToBottom(){
window.scrollTo(0,document.body.scrollHeight);
}
</script>
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
<?php if(!empty($page['htmlhead'])) echo $page['htmlhead'] ?>
</head>
<body>
<header>
<?php if(x($page, 'header')) echo $page['header']; ?>
<?php if(!empty($page['header'])) echo $page['header']; ?>
</header>
<?php if(x($page,'nav')) echo $page['nav']; ?>
<?php if(!empty($page['nav'])) echo $page['nav']; ?>
<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<aside><?php if(!empty($page['aside'])) echo $page['aside']; ?></aside>
<section>
<?php if(x($page,'content')) echo $page['content']; ?>
<?php if(!empty($page['content'])) echo $page['content']; ?>
<div id="pause"></div> <!-- The pause/resume Ajax indicator -->
<div id="page-footer"></div>
</section>
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
<right_aside><?php if(!empty($page['right_aside'])) echo $page['right_aside']; ?></right_aside>
<footer id="footer">
<?php if(x($page, 'footer')) echo $page['footer']; ?>
<?php if(!empty($page['footer'])) echo $page['footer']; ?>
</footer>
<tools id="tools">
<?php if (x($page, 'tools')) echo $page['tools']; ?>
<?php if (!empty($page['tools'])) echo $page['tools']; ?>
<div id="scrollup" >
<a class="item-scrollup" href="javascript:scrollTo(0,100000)"><img src="view/theme/smoothly/images/down.png" alt="to bottom" title="to bottom" /></a>
<a class="item-scrollup" href="javascript:scrollTo(0,0)"><img src="view/theme/smoothly/images/up.png" alt="to top" title="to top" /></a>
@ -40,6 +40,6 @@
</div>
</tools>
<?php if (x($page, 'bottom')) echo $page['bottom']; ?>
<?php if (!empty($page['bottom'])) echo $page['bottom']; ?>
</body>
</html>

View file

@ -214,10 +214,7 @@ function vier_community_info()
//Community_Pages at right_aside
if ($show_pages && local_user()) {
$cid = null;
if (x($_GET, 'cid') && intval($_GET['cid']) != 0) {
$cid = $_GET['cid'];
}
$cid = defaults($_GET, 'cid', null);
//sort by last updated item
$lastitem = true;