|
|
@@ -51,7 +51,7 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Get profile by account id.
|
|
|
+ * Get profile by content id, type and account.
|
|
|
* @param string $iAccountId account id
|
|
|
* @return array if aprofile ids, key is profile id
|
|
|
*/
|
|
|
@@ -60,6 +60,16 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton {
|
|
|
return $this->getRow($sSql);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Get profile by content id and type.
|
|
|
+ * @param string $iAccountId account id
|
|
|
+ * @return array if aprofile ids, key is profile id
|
|
|
+ */
|
|
|
+ public function getProfileByContentAndType ($iContentId, $sType) {
|
|
|
+ $sSql = $this->prepare("SELECT * FROM `sys_profiles` WHERE `content_id` = ? AND `type` = ?", $iContentId, $sType);
|
|
|
+ return $this->getRow($sSql);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Insert account and content id association. Also if currect profile id is not defined - it updates current profile id in account.
|
|
|
* @param $iAccountId account id
|