Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls - Remove duplicate calls to intval(), count() or strlen() after empty() - Replace ternary operators outputting binary value with empty() return value - Rewrite defaults() without x()
This commit is contained in:
parent
ea4e772b1e
commit
458981f75c
101 changed files with 896 additions and 914 deletions
|
@ -1,19 +1,19 @@
|
|||
<!DOCTYPE html >
|
||||
<html itemscope itemtype="http://schema.org/Blog" lang="<?php echo $lang; ?>">
|
||||
<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>
|
||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||
<?php if(!empty($page['htmlhead'])) echo $page['htmlhead'] ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php if(x($page,'nav')) echo $page['nav']; ?>
|
||||
<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
|
||||
<?php if(!empty($page['nav'])) echo $page['nav']; ?>
|
||||
<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>
|
||||
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
|
||||
<right_aside><?php if(!empty($page['right_aside'])) echo $page['right_aside']; ?></right_aside>
|
||||
<footer><?php if(!empty($page['footer'])) echo $page['footer']; ?></footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<!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>
|
||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||
<?php if(!empty($page['htmlhead'])) echo $page['htmlhead'] ?>
|
||||
</head>
|
||||
<body>
|
||||
<section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>
|
||||
<section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(!empty($page['content'])) echo $page['content']; ?>
|
||||
<div id="page-footer"></div>
|
||||
</section>
|
||||
</body>
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
* only the pure content
|
||||
*/
|
||||
|
||||
if(x($page,'content')) echo $page['content'];
|
||||
if(!empty($page['content'])) echo $page['content'];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue