'pl_PL.utf8' => 'Polski',
'ru_RU.utf8' => 'Pусский',
'sl_SI.utf8' => 'Slovenščina',
- 'uk_UA.utf8' => 'Український',
+ 'uk_UA.utf8' => 'Українська',
+ 'pt_BR.utf8' => 'Brasileiro',
);
public function __construct()
{
while (($language = readdir($handle)) !== false) {
# Languages are stored in a directory, so all directory names are languages
# @todo move language installation data to database
- if (! is_dir(LOCALE . '/' . $language) || in_array($language, array('..', '.'))) {
+ if (! is_dir(LOCALE . '/' . $language) || in_array($language, array('..', '.', 'tools'))) {
continue;
}
$current = true;
}
- $languages[] = array('name' => $this->language_names[$language], 'value' => $language, 'current' => $current);
+ $languages[] = array('name' => (isset($this->language_names[$language]) ? $this->language_names[$language] : $language), 'value' => $language, 'current' => $current);
}
return $languages;
// Saving and clearing context
$REAL = array();
foreach( $GLOBALS as $key => $value ) {
- if( $key != "GLOBALS" && $key != "_SESSION" ) {
+ if( $key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS' ) {
$GLOBALS[$key] = array();
$REAL[$key] = $value;
}
'entries' => '',
'page_links' => '',
'nb_results' => '',
+ 'listmode' => (isset($_COOKIE['listmode']) ? true : false),
);
//if id is given - we retrive entries by tag: id is tag id
$currentConfig['theme'] = $_POST['theme'];
$_SESSION['poche_user']->setConfig($currentConfig);
+
+ $this->emptyCache();
Tools::redirect('?view=config');
}
$currentConfig['language'] = $_POST['language'];
$_SESSION['poche_user']->setConfig($currentConfig);
+
+ $this->emptyCache();
Tools::redirect('?view=config');
}
$currentConfig = $_SESSION['poche_user']->config;
$currentConfig['token'] = $token;
$_SESSION['poche_user']->setConfig($currentConfig);
+ Tools::redirect();
}
public function generateFeeds($token, $user_id, $tag_id, $type = 'home')
$feed = new FeedWriter(RSS2);
$feed->setTitle('wallabag — ' . $type . ' feed');
$feed->setLink(Tools::getPocheUrl());
- $feed->setChannelElement('updated', date(DATE_RSS , time()));
- $feed->setChannelElement('author', 'wallabag');
+ $feed->setChannelElement('pubDate', date(DATE_RSS , time()));
+ $feed->setChannelElement('generator', 'wallabag');
+ $feed->setDescription('wallabag ' . $type . ' elements');
if ($type == 'tag') {
$entries = $this->store->retrieveEntriesByTag($tag_id, $user_id);