aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-31 16:38:22 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-31 16:38:22 -0700
commitf0b640058427aff2d9d60899f9005980ab89c0ef (patch)
treea7e2f2d7fca62e73f725dc072fa1944150a86bd0 /view
parentceabd7629bab4a490515aa8608acf0738159e1d0 (diff)
downloadvolse-hubzilla-f0b640058427aff2d9d60899f9005980ab89c0ef.tar.gz
volse-hubzilla-f0b640058427aff2d9d60899f9005980ab89c0ef.tar.bz2
volse-hubzilla-f0b640058427aff2d9d60899f9005980ab89c0ef.zip
more lint
Diffstat (limited to 'view')
-rw-r--r--view/default.php14
-rw-r--r--view/profile.php16
-rw-r--r--view/profile_selectors.php3
3 files changed, 18 insertions, 15 deletions
diff --git a/view/default.php b/view/default.php
index 2d45d946a..60bda2669 100644
--- a/view/default.php
+++ b/view/default.php
@@ -1,17 +1,17 @@
<!DOCTYPE html >
<html>
<head>
- <title><?php echo $page['title'] ?></title>
- <?php echo $page['htmlhead'] ?>
+ <title><?php if(x($page,'title')) echo $page['title'] ?></title>
+ <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
- <header><?php echo $page['header']; ?></header>
- <nav><div id="top-margin"></div><?php echo $page['nav']; ?></nav>
- <aside><?php echo $page['aside']; ?></aside>
- <section><?php echo $page['content']; ?>
+ <header><?php if(x($page,'header')) echo $page['header']; ?></header>
+ <nav><div id="top-margin"></div><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
+ <aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
+ <section><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
- <footer><?php echo $page['footer']; ?></footer>
+ <footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
</body>
</html>
diff --git a/view/profile.php b/view/profile.php
index 5b092d1dc..1d036dc5c 100644
--- a/view/profile.php
+++ b/view/profile.php
@@ -1,12 +1,12 @@
<!DOCTYPE html ><?php // This is a perfect example of why I prefer to use template files rather than mixed PHP/HTML ?>
<html>
<head>
- <title><?php echo $page['title']; ?></title>
- <?php echo $page['htmlhead']; ?>
+ <title><?php if(x($page,'title')) echo $page['title']; ?></title>
+ <?php if(x($page,'htmlhead')) echo $page['htmlhead']; ?>
</head>
<body>
-<header><?php echo $page['header']; ?></header>
-<nav><div id="top-margin"></div><?php echo $page['nav']; ?></nav>
+<header><?php if(x($page,'header')) echo $page['header']; ?></header>
+<nav><div id="top-margin"></div><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
<aside>
<?php if((is_array($profile)) && count($profile)) { ?>
<div class="vcard">
@@ -57,17 +57,17 @@
<?php if(strlen($profile['marital'])) { ?>
<div class="marital"><span class="marital-label"><span class="heart">&hearts;</span> Status: </span><span class="marital-text"><?php echo $profile['marital']; ?></span></div>
<?php } ?>
-<?php if(strlen($profile['url'])) { ?>
+<?php if(strlen($profile['homepage'])) { ?>
<div class="homepage"><span class="homepage-label">Homepage: </span><span class="homepage-url"><?php echo $profile['homepage']; ?></span></div>
<?php } ?>
-<?php echo $page['aside'] ?>
+<?php if(x($page,'aside')) echo $page['aside'] ?>
</aside>
<section>
-<?php echo $page['content']; ?>
+<?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
<footer>
-<?php echo $page['footer']; ?>
+<?php if(x($page,'footer')) echo $page['footer']; ?>
</footer>
</body>
</html>
diff --git a/view/profile_selectors.php b/view/profile_selectors.php
index 46f5c8b68..335f292dc 100644
--- a/view/profile_selectors.php
+++ b/view/profile_selectors.php
@@ -2,6 +2,7 @@
function gender_selector($current="",$suffix="") {
+ $o = '';
$select = array('', t('Male'), t('Female'), t('Transsexual'), t('Hermaphrodite'), t('Neuter'), t('Other'), t('Undecided'));
$o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
@@ -14,6 +15,7 @@ function gender_selector($current="",$suffix="") {
}
function sexpref_selector($current="",$suffix="") {
+ $o = '';
$select = array('', t('Males'), t('Females'), t('Bisexual'), t('Autosexual'), t('Abstinent'), t('Virgin'), t('Nonsexual'));
$o .= "<select name=\"sexual$suffix\" id=\"sexual-select$suffix\" size=\"1\" >";
@@ -27,6 +29,7 @@ function sexpref_selector($current="",$suffix="") {
function marital_selector($current="",$suffix="") {
+ $o = '';
$select = array('', t('Single'), t('Lonely'), t('Available'), t('Unavailable'), t('Dating'), t('Unfaithful'), t('Sex Addict'), t('Friends'), t('Friends/Benefits'), t('Casual'), t('Engaged'), t('Married'), t('Partners'), t('Cohabiting'), t('Happy'), t('Not Looking'), t('Swinger'), t('Betrayed'), t('Separated'), t('Unstable'), t('Divorced'), t('Widowed'), t('Uncertain'), t('Complicated'), t('Don\'t care'), t('Ask me') );
$o .= "<select name=\"marital\" id=\"marital-select\" size=\"1\" >";