Index: trunk/kernel/include/category.php =================================================================== diff -u -r1892 -r2163 --- trunk/kernel/include/category.php (.../category.php) (revision 1892) +++ trunk/kernel/include/category.php (.../category.php) (revision 2163) @@ -370,15 +370,17 @@ $aPath = explode("|",$path); $aPath = array_slice($aPath,0,-1); $ParentPath = implode("|",$aPath); - $sql = "SELECT $fieldname FROM category WHERE $fieldname != '$skipvalue' AND ParentPath LIKE '$ParentPath' ORDER BY ParentPath DESC"; + $sql = "SELECT $fieldname FROM ".GetTablePrefix()."Category WHERE $fieldname != '$skipvalue' AND ParentPath LIKE '$ParentPath' ORDER BY ParentPath DESC"; $rs = $this->adodbConnection->execute($sql); if($rs && !$rs->EOF) { $ret = $rs->fields[$fieldname]; } else + { $ret = $default; - $update = "UPDATE ".$this->SourceTable." SET $fieldname='$ret' WHERE CategoryId=".$this->Get("CategoryId"); + } + $update = "UPDATE ".$this->tablename." SET $fieldname='$ret' WHERE CategoryId=".$this->Get("CategoryId"); $this->adodbConnection->execute($update); return $ret; }