diff options
author | friendica <info@friendica.com> | 2013-02-15 17:23:02 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-02-15 17:23:02 -0800 |
commit | c42936e2652a0d0f422afb2b7157b03aa0f2eaf6 (patch) | |
tree | 0750366302f2e3ba38ace246c1ff09d4e0d0d376 | |
parent | c66c168d1c372ebc953a0dc0b52c3e4b5feda722 (diff) | |
download | volse-hubzilla-c42936e2652a0d0f422afb2b7157b03aa0f2eaf6.tar.gz volse-hubzilla-c42936e2652a0d0f422afb2b7157b03aa0f2eaf6.tar.bz2 volse-hubzilla-c42936e2652a0d0f422afb2b7157b03aa0f2eaf6.zip |
we don't need to quote or rename 'default' in mySQL if we just use the original column name 'is_default'
-rw-r--r-- | mod/profile_photo.php | 2 | ||||
-rw-r--r-- | view/tpl/profile_photo.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/profile_photo.tpl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 7b29b3635..ea7a01bc9 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -256,7 +256,7 @@ function profile_photo_content(&$a) { profile_photo_crop_ui_head($a, $ph); } - $profiles = q("select id, profile_name as name, is_default as pdefault from profile where uid = %d", + $profiles = q("select id, profile_name as name, is_default from profile where uid = %d", intval(local_user()) ); diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 49323e01c..05952afa4 100644 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -12,7 +12,7 @@ <label id="profile-photo-profiles-label" class="form-label" for="profile-photo-profiles">$lbl_profiles</label> <select name="profile" id="profile-photo-profiles" class="form-input" > {{ for $profiles as $p }} -<option value="$p.id" {{ if $p.pdefault }}selected="selected"{{ endif }}>$p.name</option> +<option value="$p.id" {{ if $p.is_default }}selected="selected"{{ endif }}>$p.name</option> {{ endfor }} </select> <div class="clear"></div> diff --git a/view/tpl/smarty3/profile_photo.tpl b/view/tpl/smarty3/profile_photo.tpl index f13dee26e..8c4fbfafa 100644 --- a/view/tpl/smarty3/profile_photo.tpl +++ b/view/tpl/smarty3/profile_photo.tpl @@ -17,7 +17,7 @@ <label id="profile-photo-profiles-label" class="form-label" for="profile-photo-profiles">{{$lbl_profiles}}</label> <select name="profile" id="profile-photo-profiles" class="form-input" > {{foreach $profiles as $p}} -<option value="{{$p.id}}" {{if $p.pdefault}}selected="selected"{{/if}}>{{$p.name}}</option> +<option value="{{$p.id}}" {{if $p.is_default}}selected="selected"{{/if}}>{{$p.name}}</option> {{/foreach}} </select> <div class="clear"></div> |