From 9b08d4d062c63074ef0e83c16cf4eecb98d03c59 Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 2 Oct 2007 22:24:32 +0000 Subject: [PATCH] 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 --- core/image.class.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/core/image.class.php b/core/image.class.php index 1692eae2..bb168633 100644 --- a/core/image.class.php +++ b/core/image.class.php @@ -19,18 +19,9 @@ class Image { } private function create_from_row($row) { - $this->id = $row['id']; - $this->owner_id = $row['owner_id']; - $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']; + foreach($row as $name => $value) { + $this->$name = $value; // hax + } } private function mime_to_ext($mime) {