how did I miss these o_O?
git-svn-id: file:///home/shish/svn/shimmie2/trunk@1008 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
432e0c4dc6
commit
31573f5ff9
@ -34,7 +34,7 @@ class Image {
|
|||||||
public static function by_id(Config $config, Database $database, $id) {
|
public static function by_id(Config $config, Database $database, $id) {
|
||||||
assert(is_numeric($id));
|
assert(is_numeric($id));
|
||||||
$image = null;
|
$image = null;
|
||||||
$row = $this->database->get_row("{$this->get_images} WHERE images.id=?", array($id));
|
$row = $database->get_row("SELECT * FROM images WHERE images.id=?", array($id));
|
||||||
return ($row ? new Image($row) : null);
|
return ($row ? new Image($row) : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class Image {
|
|||||||
$tmpl = str_replace('$size', "{$this->width}x{$this->height}", $tmpl);
|
$tmpl = str_replace('$size', "{$this->width}x{$this->height}", $tmpl);
|
||||||
$tmpl = str_replace('$filesize', to_shorthand_int($this->filesize), $tmpl);
|
$tmpl = str_replace('$filesize', to_shorthand_int($this->filesize), $tmpl);
|
||||||
$tmpl = str_replace('$filename', $_escape($base_fname), $tmpl);
|
$tmpl = str_replace('$filename', $_escape($base_fname), $tmpl);
|
||||||
$tmpl = str_replace('$title', $_escape($config->get_string("title")), $tmpl);
|
$tmpl = str_replace('$title', $_escape($this->config->get_string("title")), $tmpl);
|
||||||
|
|
||||||
$plte = new ParseLinkTemplateEvent($tmpl, $this);
|
$plte = new ParseLinkTemplateEvent($tmpl, $this);
|
||||||
send_event($plte);
|
send_event($plte);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user