Changeset a2e3850


Ignore:
Timestamp:
Sep 14, 2015 4:15:21 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
addc9c5
Parents:
7912d765
Message:

News: New /news page and helper to show all news
WIP, not yet hooked in

Location:
apps/routerconsole
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/news/NewsManager.java

    r7912d765 ra2e3850  
    5858            return new ArrayList(_currentNews);
    5959        // load old news.xml
     60        if (_log.shouldWarn())
     61            _log.warn("no real XML, falling back to news.xml");
    6062        List<NewsEntry> rv = parseOldNews();
    6163        if (!rv.isEmpty()) {
     
    6668        // load and translate initialnews
    6769        // We don't save it to _currentNews, as the language may change
     70        if (_log.shouldWarn())
     71            _log.warn("no news.xml, falling back to initialNews");
    6872        return parseInitialNews();
    6973    }
     
    113117        changeState(STARTING);
    114118        _currentNews = PersistNews.load(_context);
     119        if (_log.shouldWarn())
     120            _log.warn("Initialized with " + _currentNews.size() + " entries");
    115121        changeState(RUNNING);
    116122        if (_cmgr != null)
  • apps/routerconsole/java/src/net/i2p/router/news/PersistNews.java

    r7912d765 ra2e3850  
    3434 *  @since 0.9.23
    3535 */
    36 public class PersistNews {
     36class PersistNews {
    3737
    3838    private static final String DIR = "docs/news";
Note: See TracChangeset for help on using the changeset viewer.