Undoing this commit: Removing unnecessary call to int_escape(). Simply cast to int inline, saving function call overhead.

This commit is contained in:
green-ponies (jgen)
2012-04-18 00:54:18 -04:00
parent f8832a5024
commit dd88127c30
46 changed files with 136 additions and 136 deletions

View File

@@ -71,10 +71,10 @@ class ShimmieApi extends Extension {
if($event->page_matches("api/shimmie/get_image")) {
$arg = $event->get_arg(0);
if(!empty($arg)){
$image = Image::by_id((int)($event->get_arg(0)));
$image = Image::by_id(int_escape($event->get_arg(0)));
}
elseif(isset($_GET['id'])){
$image = Image::by_id((int)($_GET['id']));
$image = Image::by_id(int_escape($_GET['id']));
}
// FIXME: handle null image
$image->get_tag_array(); // tag data isn't loaded into the object until necessary