aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/zot.php2
-rw-r--r--install/update.php9
2 files changed, 6 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php
index 0e1c5165a..7e9a6ee54 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -420,7 +420,7 @@ function zot_refresh($them,$channel = null, $force = false) {
where abook_xchan = '%s' and abook_channel = %d
and not (abook_flags & %d) > 0 ",
intval($their_perms),
- dbesc($next_birthday),
+ dbescdate($next_birthday),
dbesc($x['hash']),
intval($channel['channel_id']),
intval(ABOOK_FLAG_SELF)
diff --git a/install/update.php b/install/update.php
index c6e4535e1..8ce50926a 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1515,10 +1515,11 @@ function update_r1133() {
xp_client varchar( 20 ) NOT NULL DEFAULT '',
xp_channel bigint NOT NULL DEFAULT '0',
xp_perm varchar( 64 ) NOT NULL DEFAULT '',
- PRIMARY KEY (\"xp_id\") )");
- $r2 = q("create index \"xp_client\" on xperm (\"xp_client\",
- create index \"xp_channel\" on xperm (\"xp_channel\"),
- create index \"xp_perm\" on xperm (\"xp_perm\") ");
+ PRIMARY KEY (xp_id) )");
+ $r2 = 0;
+ foreach(array('xp_client', 'xp_channel', 'xp_perm') as $fld)
+ $r2 += (empty(q("create index $fld on xperm ($fld)")) ? 0 : 1);
+
$r = (($r1 && $r2) ? true : false);
}
else {