aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-26 17:24:20 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-26 17:24:20 -0700
commit34eedb503acad59d649f96d3250b40cc1c84047c (patch)
tree95f0eb71d4db446743f5043ce8009fcc1566d9fa /mod/photos.php
parent1105cdb0654b6f9bb03e686b351da1cdaa8d8f4f (diff)
downloadvolse-hubzilla-34eedb503acad59d649f96d3250b40cc1c84047c.tar.gz
volse-hubzilla-34eedb503acad59d649f96d3250b40cc1c84047c.tar.bz2
volse-hubzilla-34eedb503acad59d649f96d3250b40cc1c84047c.zip
stronger type checking on comparisons
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 705c76200..693d068e4 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -61,7 +61,7 @@ function photos_post(&$a) {
$contact_record = $r[0];
- if(($a->argc > 2) && ($a->argv[1] == 'album')) {
+ if(($a->argc > 2) && ($a->argv[1] === 'album')) {
$album = hex2bin($a->argv[2]);
if($album == t('Profile Photos') || $album == t('Contact Photos')) {
@@ -390,7 +390,7 @@ function photos_content(&$a) {
$datatype = $a->argv[2];
$datum = $a->argv[3];
}
- elseif(($a->argc > 2) && ($a->argv[2] == 'upload'))
+ elseif(($a->argc > 2) && ($a->argv[2] === 'upload'))
$datatype = 'upload';
else
$datatype = 'summary';
@@ -445,7 +445,7 @@ function photos_content(&$a) {
//
- if($datatype == 'upload') {
+ if($datatype === 'upload') {
if( ! (local_user() && (get_uid() == $a->data['user']['uid']))) {
notice( t('Permission denied.'));
return;
@@ -455,7 +455,7 @@ function photos_content(&$a) {
$albumselect .= '<option value="" selected="selected" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>';
if(count($a->data['albums'])) {
foreach($a->data['albums'] as $album) {
- if(($album['album'] == '') || ($album['album'] == t('Contact Photos')))
+ if(($album['album'] === '') || ($album['album'] == t('Contact Photos')))
continue;
$albumselect .= '<option value="' . $album['album'] . '">' . $album['album'] . '</option>';
}
@@ -481,7 +481,7 @@ function photos_content(&$a) {
}
- if($datatype == 'album') {
+ if($datatype === 'album') {
$album = hex2bin($datum);
@@ -504,7 +504,7 @@ function photos_content(&$a) {
$o .= '<h3>' . $album . '</h3>';
- if($cmd == 'edit') {
+ if($cmd === 'edit') {
if(($album != t('Profile Photos')) && ($album != t('Contact Photos'))) {
if(local_user() && (get_uid() == $a->data['user']['uid'])) {
$edit_tpl = load_view_file('view/album_edit.tpl');
@@ -545,7 +545,7 @@ function photos_content(&$a) {
}
- if($datatype == 'image') {
+ if($datatype === 'image') {
require_once('security.php');
require_once('bbcode.php');
@@ -638,7 +638,7 @@ function photos_content(&$a) {
$o .= '<div id="in-this-photo">' . $i1[0]['tag'] . '</div>';
}
- if($cmd == 'edit') {
+ if($cmd === 'edit') {
$edit_tpl = load_view_file('view/photo_edit.tpl');
$o .= replace_macros($edit_tpl, array(
'$id' => $ph[0]['id'],