X-Git-Url: http://git.osdn.net/view?p=nucleus-jp%2Fnucleus-next.git;a=blobdiff_plain;f=nucleus%2Fupgrades%2Fupgrade1.1.php;h=f324ea2e3e350d954133a87e7abd027dbb4c395b;hp=4c738696b5c40dcdb3047fe3d52e11358284853e;hb=e547917b5297010bfdd2809d1e531a3758175f93;hpb=d9398defb8c30d137b0c2f5d00d5b4e274b71d49 diff --git a/nucleus/upgrades/upgrade1.1.php b/nucleus/upgrades/upgrade1.1.php index 4c73869..f324ea2 100644 --- a/nucleus/upgrades/upgrade1.1.php +++ b/nucleus/upgrades/upgrade1.1.php @@ -1,7 +1,7 @@ bnumber; $query = 'INSERT INTO '.sql_table('category')." (catid, cblog, cname, cdesc) VALUES ($catid, $blogid, 'General', 'Items that do not fit in other categories')"; $r = upgrade_query("Adding category 'general' for blog " . $blogid, $query); @@ -92,9 +92,9 @@ function upgrade_do110() { // 5. add template parts for category lists to all templates $query = 'SELECT tdnumber FROM '.sql_table('template_desc'); - $res = DB::getResult($query); // get all template ids - foreach ( $res as $row ) { - $tid = $row['tdnumber']; // template id + $res = sql_query($query); // get all template ids + while ($obj = mysql_fetch_object($res)) { + $tid = $obj->tdnumber; // template id $query = 'INSERT INTO '.sql_table('template')." VALUES ($tid, 'CATLIST_HEADER', '