From 1e44f93c1f160c9191fdee58df93531b5d8f3a0d Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 2 Oct 2007 22:23:29 +0000 Subject: [PATCH] allow people to add columns to the images table, then use them git-svn-id: file:///home/shish/svn/shimmie2/trunk@511 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) {