Changeset 1226 for trunk/wifidog-auth/wifidog/classes/Content.php
- Timestamp:
- 05/17/07 16:25:43 (5 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/classes/Content.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/classes/Content.php
r1201 r1226 423 423 return $retval; 424 424 } 425 425 426 426 /** 427 427 * Check if this class is NOT any of the class or subclass of one of the content types given as parameter … … 1232 1232 return $retval; 1233 1233 } 1234 1234 1235 /** Get the authors of the Content 1235 1236 * @return null or array of User objects */ … … 1237 1238 $db = AbstractDb :: getObject(); 1238 1239 $retval = array (); 1240 $content_owner_row = null; 1239 1241 $sql = "SELECT user_id FROM content_has_owners WHERE content_id='$this->id' AND is_author=TRUE"; 1240 1242 $db->execSqlUniqueRes($sql, $content_owner_row, false); … … 1246 1248 return $retval; 1247 1249 } 1250 1251 /** Get the owners of the Content 1252 * @return null or array of User objects */ 1253 public function getOwners() { 1254 $db = AbstractDb :: getObject(); 1255 $retval = array (); 1256 $content_owner_row = null; 1257 $sql = "SELECT user_id FROM content_has_owners WHERE content_id='$this->id'"; 1258 $db->execSqlUniqueRes($sql, $content_owner_row, false); 1259 if ($content_owner_row != null) { 1260 $user = User :: getObject($content_owner_row['user_id']); 1261 $retval[] = $user; 1262 } 1263 1264 return $retval; 1265 } 1266 1248 1267 /** @see GenricObject 1249 1268 * @return The id */
