From d1aa45ae83d31f5e85c50cb9f48dd2632d08c930 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 9 Nov 2011 10:21:17 -0500 Subject: [PATCH 01/16] CC-2870: Create testing infrastructure for testing upgrades -added 1.9.5-RC1 to testing. --- dev_tools/fabric/fab_setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev_tools/fabric/fab_setup.py b/dev_tools/fabric/fab_setup.py index 45b428f5a..e9f4be9a8 100644 --- a/dev_tools/fabric/fab_setup.py +++ b/dev_tools/fabric/fab_setup.py @@ -130,6 +130,11 @@ def airtime_194_tar(): run('wget http://downloads.sourceforge.net/project/airtime/1.9.4/airtime-1.9.4.tar.gz') run('tar xfz airtime-1.9.4.tar.gz') sudo('cd ~/airtime-1.9.4/install_full/ubuntu && ./airtime-full-install') + +def airtime_195_RC1_tar(): + run('wget http://downloads.sourceforge.net/project/airtime/1.9.5-RC1/airtime-1.9.5-RC1.tar.gz') + run('tar xfz airtime-1.9.5-RC1.tar.gz') + sudo('cd ~/airtime-1.9.5-RC1/install_full/ubuntu && ./airtime-full-install') def airtime_latest_deb(): append('/etc/apt/sources.list', "deb http://apt.sourcefabric.org/ lucid main", use_sudo=True) From 8f75bf18705daeb66db4232a4477c6151629c09b Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 9 Nov 2011 15:35:14 -0500 Subject: [PATCH 02/16] CC-2966: Remove minimum and maximum logo sizes - make them recommended instead Fixed by: 1. change wording 2. attach custom filter to the logo upload form, the filter scales down the image if it's larger than 600x600 --- .../application/forms/RegisterAirtime.php | 10 ++--- .../application/forms/SupportSettings.php | 10 ++--- .../forms/customfilters/ImageSize.php | 42 +++++++++++++++++++ .../views/scripts/form/register-dialog.phtml | 2 +- .../views/scripts/form/support-setting.phtml | 2 +- 5 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 airtime_mvc/application/forms/customfilters/ImageSize.php diff --git a/airtime_mvc/application/forms/RegisterAirtime.php b/airtime_mvc/application/forms/RegisterAirtime.php index 694224b9d..4ca52e27c 100644 --- a/airtime_mvc/application/forms/RegisterAirtime.php +++ b/airtime_mvc/application/forms/RegisterAirtime.php @@ -1,5 +1,7 @@ setRequired(false) ->setDecorators(array('File')) ->addValidator('Count', false, 1) - ->addValidator('Extension', false, 'jpg,png,gif') - ->addValidator('ImageSize', false, array( - 'minwidth' => 200, - 'minheight' => 200, - 'maxwidth' => 600, - 'maxheight' => 600)); + ->addValidator('Extension', false, 'jpg,jpeg,png,gif') + ->addFilter('ImageSize'); $this->addElement($upload); //enable support feedback diff --git a/airtime_mvc/application/forms/SupportSettings.php b/airtime_mvc/application/forms/SupportSettings.php index 605e85878..f0956cdf7 100644 --- a/airtime_mvc/application/forms/SupportSettings.php +++ b/airtime_mvc/application/forms/SupportSettings.php @@ -1,5 +1,7 @@ setRequired(false) ->setDecorators(array('File')) ->addValidator('Count', false, 1) - ->addValidator('Extension', false, 'jpg,png,gif') - ->addValidator('ImageSize', false, array( - 'minwidth' => 200, - 'minheight' => 200, - 'maxwidth' => 600, - 'maxheight' => 600)); + ->addValidator('Extension', false, 'jpg,jpeg,png,gif') + ->addFilter('ImageSize'); $upload->setAttrib('accept', 'image/jpeg,image/gif,image/png,image/jpg'); $this->addElement($upload); diff --git a/airtime_mvc/application/forms/customfilters/ImageSize.php b/airtime_mvc/application/forms/customfilters/ImageSize.php new file mode 100644 index 000000000..9dcfffffe --- /dev/null +++ b/airtime_mvc/application/forms/customfilters/ImageSize.php @@ -0,0 +1,42 @@ + diff --git a/airtime_mvc/application/views/scripts/form/register-dialog.phtml b/airtime_mvc/application/views/scripts/form/register-dialog.phtml index acb461be5..8faeb5913 100644 --- a/airtime_mvc/application/views/scripts/form/register-dialog.phtml +++ b/airtime_mvc/application/views/scripts/form/register-dialog.phtml @@ -144,7 +144,7 @@ element->getElement('Logo') ?> -

Min. size: 200x200 Max. size: 600x600

+

Note: Anything larger than 600x600 will be resized.

element->getElement('Logo')->hasErrors()) : ?>