Fix wrong local path and some cleanup
This commit is contained in:
parent
8fa6d65614
commit
dfdb4d5c2b
@ -1,5 +1,4 @@
|
|||||||
FROM ubuntu:14.04
|
FROM ubuntu:14.04
|
||||||
MAINTAINER Frederic Guillot <fred@miniflux.net>
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y apache2 php5 php5-sqlite php5-curl && \
|
apt-get install -y apache2 php5 php5-sqlite php5-curl && \
|
||||||
|
@ -147,7 +147,7 @@ Router\get_action('add', function () {
|
|||||||
)));
|
)));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add a feed with the form or directly from the url, it can be used by a bookmarklet by example
|
// Add a feed with the form or directly from the url, it can be used by a bookmarklet for example
|
||||||
Router\action('subscribe', function () {
|
Router\action('subscribe', function () {
|
||||||
if (Request\is_post()) {
|
if (Request\is_post()) {
|
||||||
$values = Request\values();
|
$values = Request\values();
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
namespace Translator;
|
namespace Translator;
|
||||||
|
|
||||||
const PATH = '../locales/';
|
use DirectoryIterator;
|
||||||
|
|
||||||
|
const PATH = '/../locales/';
|
||||||
|
|
||||||
function translate($identifier)
|
function translate($identifier)
|
||||||
{
|
{
|
||||||
@ -15,7 +17,7 @@ function translate($identifier)
|
|||||||
$arg = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8', false);
|
$arg = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \call_user_func_array(
|
return call_user_func_array(
|
||||||
'sprintf',
|
'sprintf',
|
||||||
$args
|
$args
|
||||||
);
|
);
|
||||||
@ -115,11 +117,11 @@ function load($language)
|
|||||||
{
|
{
|
||||||
setlocale(LC_TIME, $language.'.UTF-8');
|
setlocale(LC_TIME, $language.'.UTF-8');
|
||||||
|
|
||||||
$path = PATH.$language;
|
$path = __DIR__.PATH.$language;
|
||||||
$locales = array();
|
$locales = array();
|
||||||
|
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$dir = new \DirectoryIterator($path);
|
$dir = new DirectoryIterator($path);
|
||||||
|
|
||||||
foreach ($dir as $fileinfo) {
|
foreach ($dir as $fileinfo) {
|
||||||
if (strpos($fileinfo->getFilename(), '.php') !== false) {
|
if (strpos($fileinfo->getFilename(), '.php') !== false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user