aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-30 18:47:07 -0700
committerfriendica <info@friendica.com>2012-08-30 18:47:07 -0700
commit80bd128425b99d91ddca897bc2cd6dcef5268fe4 (patch)
tree5d45270dbbdfc12674cd79b580a7fd19c7fa4d9c /boot.php
parent08508c4216ba4750fc0f1c0f521a69b0b91090e0 (diff)
downloadvolse-hubzilla-80bd128425b99d91ddca897bc2cd6dcef5268fe4.tar.gz
volse-hubzilla-80bd128425b99d91ddca897bc2cd6dcef5268fe4.tar.bz2
volse-hubzilla-80bd128425b99d91ddca897bc2cd6dcef5268fe4.zip
more DB cleanup
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index c9430f753..2863c1b97 100644
--- a/boot.php
+++ b/boot.php
@@ -642,7 +642,7 @@ if(! class_exists('App')) {
if($this->cached_profile_picdate[$common_filename]){
$this->cached_profile_image[$avatar_image] = $avatar_image . $this->cached_profile_picdate[$common_filename];
} else {
- $r = q("SELECT `contact`.`avatar-date` AS picdate FROM `contact` WHERE `contact`.`thumb` like \"%%/%s\"",
+ $r = q("SELECT `contact`.`avatar_date` AS picdate FROM `contact` WHERE `contact`.`thumb` like \"%%/%s\"",
$common_filename);
if(! count($r)){
$this->cached_profile_image[$avatar_image] = $avatar_image;
@@ -1063,17 +1063,17 @@ if(! function_exists('get_max_import_size')) {
if(! function_exists('profile_load')) {
function profile_load(&$a, $nickname, $profile = 0) {
if(remote_user()) {
- $r = q("SELECT `profile-id` FROM `contact` WHERE `id` = %d LIMIT 1",
+ $r = q("SELECT `profile_id` FROM `contact` WHERE `id` = %d LIMIT 1",
intval($_SESSION['visitor_id']));
if(count($r))
- $profile = $r[0]['profile-id'];
+ $profile = $r[0]['profile_id'];
}
$r = null;
if($profile) {
$profile_int = intval($profile);
- $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, entity.* FROM `profile`
+ $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar_date` AS picdate, entity.* FROM `profile`
left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN entity ON `profile`.`uid` = entity.entity_id
WHERE entity.entity_address = '%s' AND `profile`.`id` = %d and `contact`.`self` = 1 LIMIT 1",
dbesc($nickname),
@@ -1081,7 +1081,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
);
}
if((! $r) && (! count($r))) {
- $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `entity`.* FROM `profile`
+ $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar_date` AS picdate, `entity`.* FROM `profile`
left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `entity` ON `profile`.`uid` = entity.entity_id
WHERE entity.entity_address = '%s' AND `profile`.`is_default` = 1 and `contact`.`self` = 1 LIMIT 1",
dbesc($nickname)