allow people to add columns to the images table, then use them (merged into stable, as it's needed for a stable extension)

git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@512 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-10-02 22:24:32 +00:00
parent 839b585aee
commit 9b08d4d062

View File

@ -19,18 +19,9 @@ class Image {
} }
private function create_from_row($row) { private function create_from_row($row) {
$this->id = $row['id']; foreach($row as $name => $value) {
$this->owner_id = $row['owner_id']; $this->$name = $value; // hax
$this->owner_ip = $row['owner_ip']; }
$this->filename = $row['filename'];
$this->filesize = $row['filesize'];
$this->hash = $row['hash'];
$this->ext = $row['ext'];
$this->width = $row['width'];
$this->height = $row['height'];
$this->posted = $row['posted'];
$this->posted_timestamp = $row['posted_timestamp'];
$this->source = $row['source'];
} }
private function mime_to_ext($mime) { private function mime_to_ext($mime) {