26 Commits

Author SHA1 Message Date
Le Philousophe 710b95a5f4 WEB: Better error handling
When PHP functions fail they often return false instead of the expected
object type.
CHeck for this value and fail properly.
2025-08-24 12:32:47 +02:00
Le Philousophe cc9fa80181 WEB: Add typing 2025-08-24 12:32:47 +02:00
Le Philousophe 1c9380ef3e JANITORIAL: Fix code style
This should not have any behavioral changes
2025-08-24 12:32:46 +02:00
Mataniko fdc6d5ff6e WEB: Fix loading localized data for news and articles 2020-10-10 01:34:06 -04:00
Mataniko c0eb021126 WEB: Add caching to all models 2020-09-27 22:08:07 -04:00
Mataniko 4471b291a1 WEB: Convert all models to not be static objects
This is a first step towards moving to a dependency injection model.
2020-09-27 22:08:07 -04:00
mataniko 819a958ccd WEB: Update Localization feature
Now L10N will automatically handle new locales and time formats added via Weblate.
2020-09-01 00:10:54 -04:00
Matan Bareket 5f850f6941 DATA: Use .markdown extension instead of .yaml 2019-10-22 08:15:29 -04:00
Matan Bareket d6fba215f0 DATA: Convert news to FM+MD 2019-10-22 01:16:53 -04:00
Matan Bareket f48d95e174 WEB: Lint PHP files 2019-05-08 23:28:05 -04:00
Matan Bareket 7c90a6f7d6 WEB: Parse News JSON as an array instead of an object 2019-01-22 19:49:58 -05:00
Matan Bareket 1e7815ec2e WEB: Fix namespace reference to ErrorException 2019-01-22 19:49:58 -05:00
Matan Bareket 85328f2997 WEB: Use PSR-4 autoloading 2019-01-22 19:49:58 -05:00
Matan Bareket cfbeebb8dc WEB: Add namespaces to all PHP files 2019-01-22 19:49:58 -05:00
Matan Bareket 851bb41bb7 WEB: Auto-fix to PSR-2 standard 2019-01-22 19:49:58 -05:00
Matan Bareket 018c78010a NEWS: Add support for news filenames in either yyyyMMdd or yyyyMMddHHmm format
This also changes the behavior that when a user clicks on a news
article, he will get all news articles from the same day. The reasoning
is a) we barely have more than 1 article a day. b) if a user wanted a
hotlink to a particular news article, he might get two different ones
which is odd.
2018-11-18 07:46:22 -05:00
Matan Bareket 01f1443c43 I18N: Revert News model and Object but use JSON now instead of our XML 2018-11-06 08:57:44 -05:00
Matan Bareket 807af53f8e I18N: Update news JSON to include author/date even for translated entries.
Even though it's not necessary to have in the translation, it makes translating via weblate frustrating because they're marked as untranslated

Now they'll be marked as no difference from source language, but that's easier to filter
2018-11-06 01:23:23 -05:00
Matan Bareket c4e8e96345 I18N: Update News model and object to read from the new JSON file 2018-11-06 01:00:06 -05:00
Thierry Crozat 094efe3fc8 WEB: Fix sorting of recent news when we have several news for the same date
The news archive page and news for a date page where using natural sorting for
the dates, which properly handles dates with an additional alphabetic character
at the end (used when we have several news for the same day). However the
recent news code was using a numeric sort, which resulted in those dates not
being properly handled and the order being the reverse of what we want.
2017-03-31 21:18:42 +01:00
Eugene Sandulenko 11a6a6b1fb WEB: Support for translated news in All News page 2016-01-16 23:43:58 +01:00
Eugene Sandulenko ae97f2f101 WEB: Fix showing translated news 2016-01-16 23:43:58 +01:00
Eugene Sandulenko 71fba34ec9 WEB: Support for translated news 2016-01-16 23:43:58 +01:00
Filippos Karapetis eb35f1bb8c WEB: Replace specific HTML entities in RSS/atom feeds
This fixes the invalid XML entities in the RSS/atom feeds.
Currently, only e acute is replaced, but this can be extended to
replace more entities that may appear in news items
2013-07-02 13:25:46 +03:00
Fredrik Wendel f6c9513056 #2820377: "WEB: Unable to post more than single news item per day"
svn path=/web/trunk/; revision=42882
2009-07-29 09:03:27 +00:00
Eugene Sandulenko d429c48de0 Website rewrite from Fredrik Wendel
svn path=/web/trunk/; revision=40814
2009-05-23 18:45:30 +00:00