diff --git a/apps/addons/fixtures/addons/update.json b/apps/addons/fixtures/addons/update.json index d19e51634a..622430ef51 100644 --- a/apps/addons/fixtures/addons/update.json +++ b/apps/addons/fixtures/addons/update.json @@ -610,6 +610,7 @@ "model": "applications.application", "fields": { "guid": "{718e30fb-e89b-41dd-9da7-e25a45638b28}", + "supported": "0", "modified": "2008-06-17 08:29:01", "created": "2007-03-05 13:09:26" } diff --git a/apps/addons/templates/addons/popups.html b/apps/addons/templates/addons/popups.html index 7de410252e..7146389764 100644 --- a/apps/addons/templates/addons/popups.html +++ b/apps/addons/templates/addons/popups.html @@ -5,7 +5,6 @@ amo.FIREFOX: 'http://getfirefox.com/?src=amo', amo.THUNDERBIRD: 'http://www.mozillamessaging.com/', amo.MOBILE: 'http://www.mozilla.com/m/', - amo.SUNBIRD: 'http://www.mozilla.org/projects/calendar/sunbird/', amo.SEAMONKEY: 'http://www.seamonkey-project.org/', }[APP] %} diff --git a/apps/addons/tests/test_models.py b/apps/addons/tests/test_models.py index 65288078d2..1d05cbbce3 100644 --- a/apps/addons/tests/test_models.py +++ b/apps/addons/tests/test_models.py @@ -179,7 +179,7 @@ class TestAddonManager(amo.tests.TestCase): eq_(f.count(), 3) eq_(sorted(x.id for x in f), [2464, 7661, 15679]) - f = Addon.objects.featured(amo.SUNBIRD) + f = Addon.objects.featured(amo.THUNDERBIRD) assert not f.exists() @@ -1278,7 +1278,7 @@ class TestAddonModelsFeatured(amo.tests.TestCase): eq_(sorted(f), [1001, 1003, 2464, 3481, 7661, 15679]) f = Addon.featured_random(amo.FIREFOX, 'fr') eq_(sorted(f), [1001, 1003, 2464, 7661, 15679]) - f = Addon.featured_random(amo.SUNBIRD, 'en-US') + f = Addon.featured_random(amo.THUNDERBIRD, 'en-US') eq_(f, []) def test_featured_random(self): diff --git a/apps/addons/tests/test_views.py b/apps/addons/tests/test_views.py index ada0d0f841..323731e88b 100644 --- a/apps/addons/tests/test_views.py +++ b/apps/addons/tests/test_views.py @@ -1045,13 +1045,13 @@ class TestDetailPage(amo.tests.TestCase): If current add-on's type is unsupported by app, redirect to an app that supports it. """ - # Sunbird can't do Personas => redirect + # Thunderbird can't do search engines prefixer = amo.urlresolvers.get_url_prefix() - prefixer.app = amo.SUNBIRD.short - response = self.client.get(reverse('addons.detail', args=['a15663']), + prefixer.app = amo.THUNDERBIRD.short + response = self.client.get(reverse('addons.detail', args=['a4594']), follow=False) eq_(response.status_code, 301) - eq_(response['Location'].find(amo.SUNBIRD.short), -1) + eq_(response['Location'].find(amo.THUNDERBIRD.short), -1) assert (response['Location'].find(amo.FIREFOX.short) >= 0) def test_compatible_app_redirect(self): diff --git a/apps/api/tests/test_views.py b/apps/api/tests/test_views.py index 6f9f2d870c..c97af62cca 100644 --- a/apps/api/tests/test_views.py +++ b/apps/api/tests/test_views.py @@ -790,7 +790,6 @@ class SearchTest(ESTestCase): """ # The following URLs should yield zero results. zeros = ( - '/en-US/sunbird/api/1.2/search/yslow', 'yslow category:alerts', 'jsonview version:1.0', 'firebug type:dictionary', diff --git a/apps/applications/fixtures/applications/all_apps.json b/apps/applications/fixtures/applications/all_apps.json index fee509621c..78cbacb8d0 100644 --- a/apps/applications/fixtures/applications/all_apps.json +++ b/apps/applications/fixtures/applications/all_apps.json @@ -31,6 +31,7 @@ "model": "applications.application", "fields": { "guid": "{718e30fb-e89b-41dd-9da7-e25a45638b28}", + "supported": "0", "modified": "2008-06-17 08:29:01", "created": "2007-03-05 13:09:26" } diff --git a/apps/applications/management/commands/dump_apps.py b/apps/applications/management/commands/dump_apps.py index 9ff3cb251d..fb43f13ff4 100644 --- a/apps/applications/management/commands/dump_apps.py +++ b/apps/applications/management/commands/dump_apps.py @@ -19,7 +19,8 @@ class Command(BaseCommand): def handle(self, *args, **kw): apps = {} - for id, guid in Application.objects.values_list('id', 'guid'): + for id, guid in (Application.objects.values_list('id', 'guid') + .exclude(supported=0)): apps[id] = dict(guid=guid, versions=[], name=amo.APPS_ALL[id].short) versions = (AppVersion.objects.values_list('application', 'version') diff --git a/apps/applications/models.py b/apps/applications/models.py index 3752ddce9c..bd9fe66a8a 100644 --- a/apps/applications/models.py +++ b/apps/applications/models.py @@ -7,6 +7,7 @@ from versions import compare class Application(amo.models.ModelBase): guid = models.CharField(max_length=255, default='') + supported = models.BooleanField(default=1) # We never reference these translated fields, so stop loading them. # name = TranslatedField() # shortname = TranslatedField() diff --git a/apps/constants/applications.py b/apps/constants/applications.py index bac2f9be47..b8317d4049 100644 --- a/apps/constants/applications.py +++ b/apps/constants/applications.py @@ -59,6 +59,8 @@ class SEAMONKEY(App): class SUNBIRD(App): + """This application is retired and should not be used on the site. It + remains as there are still some sunbird add-ons in the db.""" id = 52 short = 'sunbird' shortername = 'sb' @@ -128,9 +130,8 @@ class MOZILLA(App): platforms = 'desktop' # DESKTOP_PLATFORMS (set in constants.platforms) # UAs will attempt to match in this order -APP_DETECT = (ANDROID, MOBILE, THUNDERBIRD, SEAMONKEY, SUNBIRD, FIREFOX) -APP_USAGE = _apps = (FIREFOX, THUNDERBIRD, ANDROID, - MOBILE, SEAMONKEY, SUNBIRD) +APP_DETECT = (ANDROID, MOBILE, THUNDERBIRD, SEAMONKEY, FIREFOX) +APP_USAGE = _apps = (FIREFOX, THUNDERBIRD, ANDROID, MOBILE, SEAMONKEY) APPS = dict((app.short, app) for app in _apps) APP_IDS = dict((app.id, app) for app in _apps) APP_GUIDS = dict((app.guid, app) for app in _apps) diff --git a/apps/pages/templates/pages/about.lhtml b/apps/pages/templates/pages/about.lhtml index 9be7feb265..419d0310d6 100644 --- a/apps/pages/templates/pages/about.lhtml +++ b/apps/pages/templates/pages/about.lhtml @@ -11,8 +11,8 @@

{{ _('What is this website?') }}

{% trans %}addons.mozilla.org, commonly known as "AMO", is Mozilla's official -site for add-ons to Mozilla software, such as Firefox, Thunderbird, SeaMonkey, -and Sunbird. Add-ons let you add new features and change the way your browser +site for add-ons to Mozilla software, such as Firefox, Thunderbird, and SeaMonkey. +Add-ons let you add new features and change the way your browser or application works. Take a look around and explore the thousands of ways to customize the way you do things online.{% endtrans %}

diff --git a/apps/pages/templates/pages/sunbird.html b/apps/pages/templates/pages/sunbird.html new file mode 100644 index 0000000000..537e6c0083 --- /dev/null +++ b/apps/pages/templates/pages/sunbird.html @@ -0,0 +1,48 @@ +{% extends "impala/base_shared.html" %} + +{% block title %} + {{ page_title(_('Sunbird')) }} +{% endblock %} + +{% block extrahead %} + +{% endblock %} + +{% block content %} +
+

{{ _('Sunbird has retired') }}

+ +

+ {% trans %} + Development on the Sunbird project has halted and its final release was + on March 30, 2010. We've been proud to host Sunbird add-ons on this site + but as the project is no longer maintained we have disabled our support + for the add-ons. + {% endtrans %} +

+ +

+ {% trans tb_url="https://www.mozilla.org/en-US/thunderbird/", + lightning_url="https://addons.mozilla.org/thunderbird/2313/" %} + We recommend upgrading to Thunderbird and Lightning. + {% endtrans %} +

+ +

+ {{ _('Read more about Sunbird') }} +

+
+{% endblock %} diff --git a/apps/pages/urls.py b/apps/pages/urls.py index bfa1e42351..ef581d5504 100644 --- a/apps/pages/urls.py +++ b/apps/pages/urls.py @@ -14,4 +14,6 @@ urlpatterns = patterns('', {'template': 'pages/dev_faq.html'}, name='pages.dev_faq'), url('^review_guide$', direct_to_template, {'template': 'pages/review_guide.html'}, name='pages.review_guide'), + url('^sunbird$', direct_to_template, + {'template': 'pages/sunbird.html'}, name='pages.sunbird'), ) diff --git a/apps/search/forms.py b/apps/search/forms.py index 85b01660e9..5086736a96 100644 --- a/apps/search/forms.py +++ b/apps/search/forms.py @@ -41,7 +41,6 @@ min_version.update({ amo.FIREFOX: tuplize(amo.FIREFOX.min_display_version), amo.THUNDERBIRD: tuplize(amo.THUNDERBIRD.min_display_version), amo.SEAMONKEY: tuplize(amo.SEAMONKEY.min_display_version), - amo.SUNBIRD: tuplize(amo.SUNBIRD.min_display_version), }) diff --git a/apps/search/tests/test_client.py b/apps/search/tests/test_client.py index e8ddf9bbec..9ed0889d40 100644 --- a/apps/search/tests/test_client.py +++ b/apps/search/tests/test_client.py @@ -173,8 +173,8 @@ class SearchTest(SphinxTestCase): """ eq_(query('', limit=1, app=amo.MOBILE.id)[0].id, 11399) - # Poor sunbird, nobody likes them. - eq_(len(query('deli', app=amo.SUNBIRD.id)), 0) + # Poor seamonkey, nobody likes them. + eq_(len(query('deli', app=amo.SEAMONKEY.id)), 0) def test_category_filter(self): """This tests filtering by category.""" diff --git a/apps/search/tests/test_views.py b/apps/search/tests/test_views.py index 86ead9963b..60b9923238 100644 --- a/apps/search/tests/test_views.py +++ b/apps/search/tests/test_views.py @@ -967,8 +967,7 @@ class TestSearchSuggestions(TestAjaxSearch): self.search_applications('q=firefox', [amo.FIREFOX]) self.search_applications('q=thunder', [amo.THUNDERBIRD]) self.search_applications('q=monkey', [amo.SEAMONKEY]) - self.search_applications('q=sun', [amo.SUNBIRD]) - self.search_applications('q=bird', [amo.THUNDERBIRD, amo.SUNBIRD]) + self.search_applications('q=bird', [amo.THUNDERBIRD]) self.search_applications('q=mobile', [amo.MOBILE]) self.search_applications('q=mozilla', []) diff --git a/lib/settings_base.py b/lib/settings_base.py index 1428e696af..d3a6e6aa6e 100644 --- a/lib/settings_base.py +++ b/lib/settings_base.py @@ -230,7 +230,7 @@ ADMIN_MEDIA_PREFIX = '/admin-media/' SUPPORTED_NONAPPS = ('admin', 'apps', 'blocklist', 'developers', 'editors', 'img', 'jsi18n', 'localizers', 'media', 'marketplace-experiments', 'payments', 'robots.txt', - 'statistics', 'services') + 'statistics', 'services', 'sunbird') DEFAULT_APP = 'firefox' # paths that don't require a locale prefix diff --git a/media/img/app-icons/256/sunbird.png b/media/img/app-icons/256/sunbird.png new file mode 100644 index 0000000000..358ce31f9a Binary files /dev/null and b/media/img/app-icons/256/sunbird.png differ diff --git a/migrations/320-disable-sunbird.sql b/migrations/320-disable-sunbird.sql new file mode 100644 index 0000000000..d43fb8a5bd --- /dev/null +++ b/migrations/320-disable-sunbird.sql @@ -0,0 +1,2 @@ +-- disable sunbird; bug 617989 +UPDATE applications SET supported=0 WHERE id=52 LIMIT 1; diff --git a/templates/header_title.html b/templates/header_title.html index 4153648f4f..87c03fb96e 100644 --- a/templates/header_title.html +++ b/templates/header_title.html @@ -12,8 +12,6 @@ {{ heading(_('Firefox Mobile Add-ons'), 'firefox') }} {% elif request.APP == amo.SEAMONKEY %} {{ heading(_('SeaMonkey Add-ons'), 'seamonkey') }} -{% elif request.APP == amo.SUNBIRD %} - {{ heading(_('Sunbird Add-ons'), 'sunbird') }} {% else %} {{ heading(_(' Add-ons'), 'generic') }} {% endif %} diff --git a/templates/impala/header_title.html b/templates/impala/header_title.html index 1afb961782..a487d6af09 100644 --- a/templates/impala/header_title.html +++ b/templates/impala/header_title.html @@ -13,8 +13,6 @@ {{ heading('Firefox Mobile', _('Mobile Add-ons'), 'firefox') }} {% elif request.APP == amo.SEAMONKEY %} {{ heading('SeaMonkey', _('Add-ons'), 'seamonkey') }} -{% elif request.APP == amo.SUNBIRD %} - {{ heading('Sunbird', _('Add-ons'), 'sunbird') }} {% elif request.APP == amo.ANDROID %} {{ heading('Android', _('Android Add-ons'), 'firefox') }} {% else %}