diff --git a/ext/res_limit/main.php b/ext/res_limit/main.php index 14c746cf..e5df6be9 100644 --- a/ext/res_limit/main.php +++ b/ext/res_limit/main.php @@ -19,16 +19,16 @@ class ResolutionLimit extends Extension $image = $event->image; if ($min_w > 0 && $image->width < $min_w) { - throw new UploadException("Image too small"); + throw new UploadException("Post too small"); } if ($min_h > 0 && $image->height < $min_h) { - throw new UploadException("Image too small"); + throw new UploadException("Post too small"); } if ($max_w > 0 && $image->width > $max_w) { - throw new UploadException("Image too large"); + throw new UploadException("Post too large"); } if ($max_h > 0 && $image->height > $max_h) { - throw new UploadException("Image too large"); + throw new UploadException("Post too large"); } if (count($ratios) > 0) { @@ -49,7 +49,7 @@ class ResolutionLimit extends Extension } if ($valids > 0 && !$ok) { throw new UploadException( - "Image needs to be in one of these ratios: ". + "Post needs to be in one of these ratios: ". html_escape($config->get_string("upload_ratios", "")) ); } diff --git a/ext/res_limit/test.php b/ext/res_limit/test.php index ecf25159..b8a21fbf 100644 --- a/ext/res_limit/test.php +++ b/ext/res_limit/test.php @@ -13,8 +13,8 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->log_in_as_user(); $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); //$this->assert_response(302); - $this->assert_no_text("Image too large"); - $this->assert_no_text("Image too small"); + $this->assert_no_text("Post too large"); + $this->assert_no_text("Post too small"); $this->assert_no_text("ratio"); } @@ -32,7 +32,7 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->assertTrue(false, "Invalid-size image was allowed"); } catch (UploadException $e) { - $this->assertEquals("Image too small", $e->getMessage()); + $this->assertEquals("Post too small", $e->getMessage()); } } @@ -49,7 +49,7 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->assertTrue(false, "Invalid-size image was allowed"); } catch (UploadException $e) { - $this->assertEquals("Image too large", $e->getMessage()); + $this->assertEquals("Post too large", $e->getMessage()); } } @@ -66,7 +66,7 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->assertTrue(false, "Invalid-size image was allowed"); } catch (UploadException $e) { - $this->assertEquals("Image needs to be in one of these ratios: 16:9", $e->getMessage()); + $this->assertEquals("Post needs to be in one of these ratios: 16:9", $e->getMessage()); } }