SQL error with app categories

This commit is contained in:
zotlabs 2016-12-14 19:12:55 -08:00
parent 9daa97f279
commit be4bbd7b9b

View File

@ -68,7 +68,7 @@ class Apps {
if($id !== true) { if($id !== true) {
// if we already installed this app, but it changed, preserve any categories we created // if we already installed this app, but it changed, preserve any categories we created
$s = ''; $s = '';
$r = q("select * from term where otype = %d and oid = d", $r = q("select * from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP), intval(TERM_OBJ_APP),
intval($id) intval($id)
); );
@ -359,7 +359,7 @@ class Apps {
if($r) { if($r) {
if(! $r[0]['app_system']) { if(! $r[0]['app_system']) {
if($app['categories'] && (! $app['term'])) { if($app['categories'] && (! $app['term'])) {
$r[0]['term'] = q("select * from term where otype = %d and oid = d", $r[0]['term'] = q("select * from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP), intval(TERM_OBJ_APP),
intval($r[0]['id']) intval($r[0]['id'])
); );