diff options
Diffstat (limited to 'inc/poche')
-rwxr-xr-x | inc/poche/Database.class.php | 8 | ||||
-rw-r--r-- | inc/poche/Language.class.php | 3 | ||||
-rwxr-xr-x | inc/poche/Poche.class.php | 4 | ||||
-rwxr-xr-x | inc/poche/Routing.class.php | 2 | ||||
-rwxr-xr-x | inc/poche/Tools.class.php | 3 | ||||
-rwxr-xr-x | inc/poche/config.inc.default.php | 2 |
6 files changed, 15 insertions, 7 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index b5dd2120..f6ba4708 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -24,15 +24,17 @@ class Database { | |||
24 | switch (STORAGE) { | 24 | switch (STORAGE) { |
25 | case 'sqlite': | 25 | case 'sqlite': |
26 | // Check if /db is writeable | 26 | // Check if /db is writeable |
27 | if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) { | 27 | if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) { |
28 | die('An error occured: "db" directory must be writeable for your web server user!'); | 28 | die('An error occured: "db" directory must be writeable for your web server user!'); |
29 | } | 29 | } |
30 | $db_path = 'sqlite:' . STORAGE_SQLITE; | 30 | $db_path = 'sqlite:' . STORAGE_SQLITE; |
31 | $this->handle = new PDO($db_path); | 31 | $this->handle = new PDO($db_path); |
32 | break; | 32 | break; |
33 | case 'mysql': | 33 | case 'mysql': |
34 | $db_path = 'mysql:host=' . STORAGE_SERVER . ';dbname=' . STORAGE_DB; | 34 | $db_path = 'mysql:host=' . STORAGE_SERVER . ';dbname=' . STORAGE_DB . ';charset=utf8mb4'; |
35 | $this->handle = new PDO($db_path, STORAGE_USER, STORAGE_PASSWORD); | 35 | $this->handle = new PDO($db_path, STORAGE_USER, STORAGE_PASSWORD, array( |
36 | PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4', | ||
37 | )); | ||
36 | break; | 38 | break; |
37 | case 'postgres': | 39 | case 'postgres': |
38 | $db_path = 'pgsql:host=' . STORAGE_SERVER . ';dbname=' . STORAGE_DB; | 40 | $db_path = 'pgsql:host=' . STORAGE_SERVER . ';dbname=' . STORAGE_DB; |
diff --git a/inc/poche/Language.class.php b/inc/poche/Language.class.php index 8d3912f5..420f2fb9 100644 --- a/inc/poche/Language.class.php +++ b/inc/poche/Language.class.php | |||
@@ -18,6 +18,7 @@ class Language | |||
18 | 'cs_CZ.utf8' => 'čeština', | 18 | 'cs_CZ.utf8' => 'čeština', |
19 | 'de_DE.utf8' => 'German', | 19 | 'de_DE.utf8' => 'German', |
20 | 'en_EN.utf8' => 'English', | 20 | 'en_EN.utf8' => 'English', |
21 | 'en_US.utf8' => 'English (US)', | ||
21 | 'es_ES.utf8' => 'Español', | 22 | 'es_ES.utf8' => 'Español', |
22 | 'fa_IR.utf8' => 'فارسی', | 23 | 'fa_IR.utf8' => 'فارسی', |
23 | 'fr_FR.utf8' => 'Français', | 24 | 'fr_FR.utf8' => 'Français', |
@@ -110,4 +111,4 @@ class Language | |||
110 | Tools::emptyCache(); | 111 | Tools::emptyCache(); |
111 | Tools::redirect('?view=config'); | 112 | Tools::redirect('?view=config'); |
112 | } | 113 | } |
113 | } \ No newline at end of file | 114 | } |
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 8cebafa3..16235474 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -314,6 +314,8 @@ class Poche | |||
314 | 314 | ||
315 | switch ($view) | 315 | switch ($view) |
316 | { | 316 | { |
317 | case 'about': | ||
318 | break; | ||
317 | case 'config': | 319 | case 'config': |
318 | $dev_infos = $this->_getPocheVersion('dev'); | 320 | $dev_infos = $this->_getPocheVersion('dev'); |
319 | $dev = trim($dev_infos[0]); | 321 | $dev = trim($dev_infos[0]); |
@@ -388,7 +390,7 @@ class Poche | |||
388 | $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' )); | 390 | $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' )); |
389 | $tpl_vars['page_links'] = $page_links; | 391 | $tpl_vars['page_links'] = $page_links; |
390 | $tpl_vars['nb_results'] = $count; | 392 | $tpl_vars['nb_results'] = $count; |
391 | $tpl_vars['search_term'] = $search; | 393 | $tpl_vars['searchterm'] = $search; |
392 | } | 394 | } |
393 | break; | 395 | break; |
394 | case 'view': | 396 | case 'view': |
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index 0b373058..6ae93d21 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php | |||
@@ -119,7 +119,7 @@ class Routing | |||
119 | } elseif (isset($_GET['deluser'])) { | 119 | } elseif (isset($_GET['deluser'])) { |
120 | $this->wallabag->deleteUser($_POST['password4deletinguser']); | 120 | $this->wallabag->deleteUser($_POST['password4deletinguser']); |
121 | } elseif (isset($_GET['epub'])) { | 121 | } elseif (isset($_GET['epub'])) { |
122 | $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['id'], $_GET['value']); | 122 | $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['value']); |
123 | $epub->run(); | 123 | $epub->run(); |
124 | } elseif (isset($_GET['import'])) { | 124 | } elseif (isset($_GET['import'])) { |
125 | $import = $this->wallabag->import(); | 125 | $import = $this->wallabag->import(); |
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 93ec3fc6..f803e3b5 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -51,6 +51,7 @@ final class Tools | |||
51 | 51 | ||
52 | $serverport = (!isset($_SERVER["SERVER_PORT"]) | 52 | $serverport = (!isset($_SERVER["SERVER_PORT"]) |
53 | || $_SERVER["SERVER_PORT"] == '80' | 53 | || $_SERVER["SERVER_PORT"] == '80' |
54 | || $_SERVER["SERVER_PORT"] == HTTP_PORT | ||
54 | || ($https && $_SERVER["SERVER_PORT"] == '443') | 55 | || ($https && $_SERVER["SERVER_PORT"] == '443') |
55 | || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection | 56 | || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection |
56 | ? '' : ':' . $_SERVER["SERVER_PORT"]); | 57 | ? '' : ':' . $_SERVER["SERVER_PORT"]); |
@@ -116,7 +117,7 @@ final class Tools | |||
116 | { | 117 | { |
117 | $views = array( | 118 | $views = array( |
118 | 'install', 'import', 'export', 'config', 'tags', | 119 | 'install', 'import', 'export', 'config', 'tags', |
119 | 'edit-tags', 'view', 'login', 'error' | 120 | 'edit-tags', 'view', 'login', 'error', 'about' |
120 | ); | 121 | ); |
121 | 122 | ||
122 | return (in_array($view, $views) ? $view . '.twig' : 'home.twig'); | 123 | return (in_array($view, $views) ? $view . '.twig' : 'home.twig'); |
diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index 2a458544..f666f468 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php | |||
@@ -24,6 +24,8 @@ | |||
24 | ################################################################################# | 24 | ################################################################################# |
25 | # Do not trespass unless you know what you are doing | 25 | # Do not trespass unless you know what you are doing |
26 | ################################################################################# | 26 | ################################################################################# |
27 | // Change this if http is running on nonstandard port - i.e is behind cache proxy | ||
28 | @define ('HTTP_PORT', 80); | ||
27 | 29 | ||
28 | // Change this if not using the standart port for SSL - i.e you server is behind sslh | 30 | // Change this if not using the standart port for SSL - i.e you server is behind sslh |
29 | @define ('SSL_PORT', 443); | 31 | @define ('SSL_PORT', 443); |