aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
Diffstat (limited to 'p')
-rw-r--r--p/.htaccess14
-rw-r--r--p/Web.config36
-rw-r--r--p/favicon.icobin1150 -> 13094 bytes
-rw-r--r--p/favicon.pngbin694 -> 0 bytes
-rwxr-xr-xp/i/index.php14
-rw-r--r--p/i/install.php195
-rw-r--r--p/index.html24
-rw-r--r--p/index.php3
-rw-r--r--p/scripts/main.js12
-rw-r--r--p/themes/default/global.css4
-rw-r--r--p/themes/flat-design/global.css4
-rw-r--r--p/themes/icons/favicon-128.pngbin0 -> 1608 bytes
-rw-r--r--p/themes/icons/favicon-16.pngbin0 -> 313 bytes
-rw-r--r--p/themes/icons/favicon-256.pngbin0 -> 3156 bytes
-rw-r--r--p/themes/icons/favicon-32.pngbin0 -> 513 bytes
-rw-r--r--p/themes/icons/favicon-48.pngbin0 -> 700 bytes
-rw-r--r--p/themes/icons/favicon-512.pngbin0 -> 6394 bytes
-rw-r--r--p/themes/icons/favicon-64.pngbin0 -> 868 bytes
18 files changed, 155 insertions, 151 deletions
diff --git a/p/.htaccess b/p/.htaccess
index fefe8b226..2b1e27a88 100644
--- a/p/.htaccess
+++ b/p/.htaccess
@@ -10,13 +10,13 @@ AddDefaultCharset UTF-8
AddType application/font-woff .woff
AddCharset UTF-8 .css
+ AddCharset UTF-8 .html
AddCharset UTF-8 .js
- AddCharset UTF-8 .map
AddCharset UTF-8 .svg
</IfModule>
<IfModule mod_deflate.c>
- AddOutputFilterByType DEFLATE application/javascript application/json image/svg+xml text/css text/javascript
+ AddOutputFilterByType DEFLATE application/javascript application/json application/xhtml+xml image/svg+xml text/css text/html text/javascript
</IfModule>
<IfModule mod_expires.c>
@@ -24,11 +24,13 @@ AddDefaultCharset UTF-8
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/json "access plus 1 month"
+ ExpiresByType application/xhtml+xml "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
+ ExpiresByType text/html "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
<FilesMatch "\.php$">
ExpiresActive Off
@@ -36,13 +38,7 @@ AddDefaultCharset UTF-8
</IfModule>
<IfModule mod_headers.c>
- <FilesMatch "\.(css|js|ico|gif|png|woff)$">
+ <FilesMatch "\.(css|html|js|ico|gif|png|woff)$">
Header merge Cache-Control "public"
</FilesMatch>
</IfModule>
-
-<Files "favicon.ico">
- Order Deny,Allow
- Allow from all
- Satisfy Any
-</Files>
diff --git a/p/Web.config b/p/Web.config
new file mode 100644
index 000000000..2321c7613
--- /dev/null
+++ b/p/Web.config
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <system.web>
+ <httpRuntime executionTimeout="300" maxRequestLength="8192"/>
+ </system.web>
+ <system.webServer>
+ <defaultDocument>
+ <files>
+ <clear />
+ <add value="index.php" />
+ <add value="index.html" />
+ </files>
+ </defaultDocument>
+ <urlCompression doStaticCompression="true" doDynamicCompression="true"/>
+ <staticContent>
+ <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="31.00:00:00" />
+ </staticContent>
+ <caching>
+ <profiles>
+ <add extension=".css" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".gif" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".html" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".jpg" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".js" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".png" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".svg" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ <add extension=".woff" policy="CacheForTimePeriod" duration="31.00:00:00" location="Any" kernelCachePolicy="DontCache" />
+ </profiles>
+ </caching>
+ <!--<httpProtocol>
+ <customHeaders>
+ <add name="Cache-Control" value="public" />
+ </customHeaders>
+ </httpProtocol>-->
+ </system.webServer>
+</configuration>
diff --git a/p/favicon.ico b/p/favicon.ico
index f7ae0a5b9..a2c3bc84e 100644
--- a/p/favicon.ico
+++ b/p/favicon.ico
Binary files differ
diff --git a/p/favicon.png b/p/favicon.png
deleted file mode 100644
index 3038dc3d1..000000000
--- a/p/favicon.png
+++ /dev/null
Binary files differ
diff --git a/p/i/index.php b/p/i/index.php
index 6c25b2c54..3dcf659c9 100755
--- a/p/i/index.php
+++ b/p/i/index.php
@@ -22,23 +22,23 @@ if (file_exists ('install.php')) {
require('install.php');
} else {
require('../../constants.php');
+ require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
session_cache_limiter('');
+ Minz_Session::init('FreshRSS');
+
if (!file_exists(DATA_PATH . '/no-cache.txt')) {
- require (LIB_PATH . '/http-conditional.php');
- $dateLastModification = max(
- @filemtime(DATA_PATH . '/touch.txt'),
- @filemtime(LOG_PATH . '/application.log'),
+ require(LIB_PATH . '/http-conditional.php');
+ $currentUser = Minz_Session::param('currentUser', '');
+ $dateLastModification = $currentUser === '' ? time() : max(
+ @filemtime(LOG_PATH . '/' . $currentUser . '.log'),
@filemtime(DATA_PATH . '/config.php')
);
- $_SERVER['QUERY_STRING'] .= '&utime=' . file_get_contents(DATA_PATH . '/touch.txt'); //For ETag
if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
exit(); //No need to send anything
}
}
- require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
-
try {
$front_controller = new FreshRSS();
$front_controller->init ();
diff --git a/p/i/install.php b/p/i/install.php
index 132cd5508..3316d222b 100644
--- a/p/i/install.php
+++ b/p/i/install.php
@@ -12,60 +12,9 @@ if (isset ($_GET['step'])) {
define ('STEP', 1);
}
-define ('SQL_CREATE_DB', 'CREATE DATABASE %1$s DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
-
-define ('SQL_CAT', 'CREATE TABLE IF NOT EXISTS `%1$scategory` (
- `id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
- `name` varchar(255) NOT NULL,
- `color` char(7),
- PRIMARY KEY (`id`),
- UNIQUE KEY (`name`) -- v0.7
-) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
-ENGINE = INNODB;');
-
-define ('SQL_FEED', 'CREATE TABLE IF NOT EXISTS `%1$sfeed` (
- `id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
- `url` varchar(511) CHARACTER SET latin1 NOT NULL,
- `category` SMALLINT DEFAULT 0, -- v0.7
- `name` varchar(255) NOT NULL,
- `website` varchar(255) CHARACTER SET latin1,
- `description` text,
- `lastUpdate` int(11) DEFAULT 0,
- `priority` tinyint(2) NOT NULL DEFAULT 10,
- `pathEntries` varchar(511) DEFAULT NULL,
- `httpAuth` varchar(511) DEFAULT NULL,
- `error` boolean DEFAULT 0,
- `keep_history` MEDIUMINT NOT NULL DEFAULT -2, -- v0.7, -2 = default
- `cache_nbEntries` int DEFAULT 0, -- v0.7
- `cache_nbUnreads` int DEFAULT 0, -- v0.7
- PRIMARY KEY (`id`),
- FOREIGN KEY (`category`) REFERENCES `%1$scategory`(`id`) ON DELETE SET NULL ON UPDATE CASCADE,
- UNIQUE KEY (`url`), -- v0.7
- INDEX (`name`), -- v0.7
- INDEX (`priority`), -- v0.7
- INDEX (`keep_history`) -- v0.7
-) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
-ENGINE = INNODB;');
-
-define ('SQL_ENTRY', 'CREATE TABLE IF NOT EXISTS `%1$sentry` (
- `id` bigint NOT NULL, -- v0.7
- `guid` varchar(760) CHARACTER SET latin1 NOT NULL, -- Maximum for UNIQUE is 767B
- `title` varchar(255) NOT NULL,
- `author` varchar(255),
- `content_bin` blob, -- v0.7
- `link` varchar(1023) CHARACTER SET latin1 NOT NULL,
- `date` int(11),
- `is_read` boolean NOT NULL DEFAULT 0,
- `is_favorite` boolean NOT NULL DEFAULT 0,
- `id_feed` SMALLINT, -- v0.7
- `tags` varchar(1023),
- PRIMARY KEY (`id`),
- FOREIGN KEY (`id_feed`) REFERENCES `%1$sfeed`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
- UNIQUE KEY (`id_feed`,`guid`), -- v0.7
- INDEX (`is_favorite`), -- v0.7
- INDEX (`is_read`) -- v0.7
-) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
-ENGINE = INNODB;');
+define('SQL_CREATE_DB', 'CREATE DATABASE %1$s DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
+
+include(APP_PATH . '/sql.php');
//<updates>
define('SQL_SHOW_TABLES', 'SHOW tables;');
@@ -134,21 +83,6 @@ SET f.cache_nbEntries=x.nbEntries, f.cache_nbUnreads=x.nbUnreads
define('SQL_UPDATE_HISTORYv007b', 'UPDATE `%1$sfeed` SET keep_history = CASE WHEN keep_history = 0 THEN -2 WHEN keep_history = 1 THEN -1 ELSE keep_history END;');
//</updates>
-function writeLine ($f, $line) {
- fwrite ($f, $line . "\n");
-}
-function writeArray ($f, $array) {
- foreach ($array as $key => $val) {
- if (is_array ($val)) {
- writeLine ($f, '\'' . $key . '\' => array (');
- writeArray ($f, $val);
- writeLine ($f, '),');
- } else {
- writeLine ($f, '\'' . $key . '\' => \'' . $val . '\',');
- }
- }
-}
-
// gestion internationalisation
$translates = array ();
$actual = 'en';
@@ -219,34 +153,36 @@ function saveStep2 () {
return false;
}
- $_SESSION['sel_application'] = sha1(uniqid(mt_rand(), true).implode('', stat(__FILE__)));
- $_SESSION['title'] = addslashes(substr(trim($_POST['title']), 0, 25));
+ $_SESSION['salt'] = sha1(uniqid(mt_rand(), true).implode('', stat(__FILE__)));
+ $_SESSION['title'] = substr(trim($_POST['title']), 0, 25);
$_SESSION['old_entries'] = $_POST['old_entries'];
if ((!ctype_digit($_SESSION['old_entries'])) || ($_SESSION['old_entries'] < 1)) {
$_SESSION['old_entries'] = 3;
}
- $_SESSION['mail_login'] = addslashes ($_POST['mail_login']);
- $_SESSION['default_user'] = substr(preg_replace ('/[^a-zA-Z0-9]/', '', $_POST['default_user']), 0, 16);
+ $_SESSION['mail_login'] = filter_var($_POST['mail_login'], FILTER_VALIDATE_EMAIL);
+ $_SESSION['default_user'] = substr(preg_replace('/[^a-zA-Z0-9]/', '', $_POST['default_user']), 0, 16);
$token = '';
if ($_SESSION['mail_login']) {
- $token = sha1($_SESSION['sel_application'] . $_SESSION['mail_login']);
+ $token = sha1($_SESSION['salt'] . $_SESSION['mail_login']);
}
- $file_data = DATA_PATH . '/' . $_SESSION['default_user'] . '_user.php';
-
- @unlink($file_data); //To avoid access-rights problems
- $f = fopen ($file_data, 'w');
- writeLine ($f, '<?php');
- writeLine ($f, 'return array (');
- writeArray ($f, array (
+ $config_array = array (
'language' => $_SESSION['language'],
'old_entries' => $_SESSION['old_entries'],
'mail_login' => $_SESSION['mail_login'],
- 'token' => $token
- ));
- writeLine ($f, ');');
- fclose ($f);
+ 'token' => $token,
+ );
+
+ $configPath = DATA_PATH . '/' . $_SESSION['default_user'] . '_user.php';
+ @unlink($configPath); //To avoid access-rights problems
+ file_put_contents($configPath, "<?php\n return " . var_export($config_array, true) . ';');
+
+ if ($_SESSION['mail_login'] != '') {
+ $personaFile = DATA_PATH . '/persona/' . $_SESSION['mail_login'] . '.txt';
+ @unlink($personaFile);
+ file_put_contents($personaFile, $_SESSION['default_user']);
+ }
header ('Location: index.php?step=3');
}
@@ -262,18 +198,18 @@ function saveStep3 () {
}
$_SESSION['bd_type'] = isset ($_POST['type']) ? $_POST['type'] : 'mysql';
- $_SESSION['bd_host'] = addslashes ($_POST['host']);
- $_SESSION['bd_user'] = addslashes ($_POST['user']);
- $_SESSION['bd_password'] = addslashes ($_POST['pass']);
- $_SESSION['bd_base'] = addslashes ($_POST['base']);
- $_SESSION['bd_prefix'] = addslashes ($_POST['prefix']);
+ $_SESSION['bd_host'] = $_POST['host'];
+ $_SESSION['bd_user'] = $_POST['user'];
+ $_SESSION['bd_password'] = $_POST['pass'];
+ $_SESSION['bd_base'] = substr($_POST['base'], 0, 64);
+ $_SESSION['bd_prefix'] = substr($_POST['prefix'], 0, 16);
$_SESSION['bd_prefix_user'] = $_SESSION['bd_prefix'] . (empty($_SESSION['default_user']) ? '' : ($_SESSION['default_user'] . '_'));
$ini_array = array(
'general' => array(
'environment' => empty($_SESSION['environment']) ? 'production' : $_SESSION['environment'],
'use_url_rewriting' => false,
- 'sel_application' => $_SESSION['sel_application'],
+ 'salt' => $_SESSION['salt'],
'base_url' => '',
'title' => $_SESSION['title'],
'default_user' => $_SESSION['default_user'],
@@ -496,7 +432,7 @@ function checkStep0 () {
if ($ini_array) {
$ini_general = isset($ini_array['general']) ? $ini_array['general'] : null;
if ($ini_general) {
- $keys = array('environment', 'sel_application', 'title', 'default_user');
+ $keys = array('environment', 'salt', 'title', 'default_user');
foreach ($keys as $key) {
if ((empty($_SESSION[$key])) && isset($ini_general[$key])) {
$_SESSION[$key] = $ini_general[$key];
@@ -543,6 +479,8 @@ function checkStep1 () {
$minz = file_exists (LIB_PATH . '/Minz');
$curl = extension_loaded ('curl');
$pdo = extension_loaded ('pdo_mysql');
+ $pcre = extension_loaded ('pcre');
+ $ctype = extension_loaded ('ctype');
$dom = class_exists('DOMDocument');
$data = DATA_PATH && is_writable (DATA_PATH);
$cache = CACHE_PATH && is_writable (CACHE_PATH);
@@ -554,17 +492,19 @@ function checkStep1 () {
'minz' => $minz ? 'ok' : 'ko',
'curl' => $curl ? 'ok' : 'ko',
'pdo-mysql' => $pdo ? 'ok' : 'ko',
+ 'pcre' => $pcre ? 'ok' : 'ko',
+ 'ctype' => $ctype ? 'ok' : 'ko',
'dom' => $dom ? 'ok' : 'ko',
'data' => $data ? 'ok' : 'ko',
'cache' => $cache ? 'ok' : 'ko',
'log' => $log ? 'ok' : 'ko',
'favicons' => $favicons ? 'ok' : 'ko',
- 'all' => $php && $minz && $curl && $pdo && $dom && $data && $cache && $log && $favicons ? 'ok' : 'ko'
+ 'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $data && $cache && $log && $favicons ? 'ok' : 'ko'
);
}
function checkStep2 () {
- $conf = !empty($_SESSION['sel_application']) &&
+ $conf = !empty($_SESSION['salt']) &&
!empty($_SESSION['title']) &&
!empty($_SESSION['old_entries']) &&
isset($_SESSION['mail_login']) &&
@@ -605,7 +545,7 @@ function checkStep3 () {
}
function checkBD () {
- $error = false;
+ $ok = false;
try {
$str = '';
@@ -643,35 +583,21 @@ function checkBD () {
$res = $c->query($sql); //Backup tables
}
- $sql = sprintf (SQL_CAT, $_SESSION['bd_prefix_user']);
- $res = $c->query ($sql);
-
- if (!$res) {
- $error = true;
- }
-
- $sql = sprintf (SQL_FEED, $_SESSION['bd_prefix_user']);
- $res = $c->query ($sql);
-
- if (!$res) {
- $error = true;
- }
-
- $sql = sprintf (SQL_ENTRY, $_SESSION['bd_prefix_user']);
- $res = $c->query ($sql);
-
- if (!$res) {
- $error = true;
- }
+ $sql = sprintf(SQL_CREATE_TABLES, $_SESSION['bd_prefix_user']);
+ $stm = $c->prepare($sql, array(PDO::ATTR_EMULATE_PREPARES => true));
+ $values = array(
+ 'catName' => _t('default_category'),
+ );
+ $ok = $stm->execute($values);
} catch (PDOException $e) {
$error = true;
}
- if ($error && file_exists (DATA_PATH . '/config.php')) {
- unlink (DATA_PATH . '/config.php');
+ if (!$ok) {
+ @unlink(DATA_PATH . '/config.php');
}
- return !$error;
+ return $ok;
}
/*** AFFICHAGE ***/
@@ -726,6 +652,12 @@ function printStep1 () {
<p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('minz_is_nok', LIB_PATH . '/Minz'); ?></p>
<?php } ?>
+ <?php if ($res['pdo-mysql'] == 'ok') { ?>
+ <p class="alert alert-success"><span class="alert-head"><?php echo _t ('ok'); ?></span> <?php echo _t ('pdomysql_is_ok'); ?></p>
+ <?php } else { ?>
+ <p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('pdomysql_is_nok'); ?></p>
+ <?php } ?>
+
<?php if ($res['curl'] == 'ok') { ?>
<?php $version = curl_version(); ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t ('ok'); ?></span> <?php echo _t ('curl_is_ok', $version['version']); ?></p>
@@ -733,10 +665,16 @@ function printStep1 () {
<p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('curl_is_nok'); ?></p>
<?php } ?>
- <?php if ($res['pdo-mysql'] == 'ok') { ?>
- <p class="alert alert-success"><span class="alert-head"><?php echo _t ('ok'); ?></span> <?php echo _t ('pdomysql_is_ok'); ?></p>
+ <?php if ($res['pcre'] == 'ok') { ?>
+ <p class="alert alert-success"><span class="alert-head"><?php echo _t ('ok'); ?></span> <?php echo _t ('pcre_is_ok'); ?></p>
<?php } else { ?>
- <p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('pdomysql_is_nok'); ?></p>
+ <p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('pcre_is_nok'); ?></p>
+ <?php } ?>
+
+ <?php if ($res['ctype'] == 'ok') { ?>
+ <p class="alert alert-success"><span class="alert-head"><?php echo _t ('ok'); ?></span> <?php echo _t ('ctype_is_ok'); ?></p>
+ <?php } else { ?>
+ <p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('ctype_is_nok'); ?></p>
<?php } ?>
<?php if ($res['dom'] == 'ok') { ?>
@@ -785,9 +723,6 @@ function printStep2 () {
<form action="index.php?step=2" method="post">
<legend><?php echo _t ('general_configuration'); ?></legend>
- <?php
- $url = substr ($_SERVER['PHP_SELF'], 0, -10);
- ?>
<div class="form-group">
<label class="group-name" for="title"><?php echo _t ('title'); ?></label>
@@ -799,14 +734,14 @@ function printStep2 () {
<div class="form-group">
<label class="group-name" for="old_entries"><?php echo _t ('delete_articles_every'); ?></label>
<div class="group-controls">
- <input type="number" id="old_entries" name="old_entries" value="<?php echo isset ($_SESSION['old_entries']) ? $_SESSION['old_entries'] : '3'; ?>" /> <?php echo _t ('month'); ?>
+ <input type="number" id="old_entries" name="old_entries" required="required" min="1" max="1200" value="<?php echo isset ($_SESSION['old_entries']) ? $_SESSION['old_entries'] : '3'; ?>" /> <?php echo _t ('month'); ?>
</div>
</div>
<div class="form-group">
<label class="group-name" for="default_user"><?php echo _t ('default_user'); ?></label>
<div class="group-controls">
- <input type="text" id="default_user" name="default_user" maxlength="16" value="<?php echo isset ($_SESSION['default_user']) ? $_SESSION['default_user'] : ''; ?>" placeholder="user1" />
+ <input type="text" id="default_user" name="default_user" required="required" size="16" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" value="<?php echo isset ($_SESSION['default_user']) ? $_SESSION['default_user'] : ''; ?>" placeholder="<?php echo httpAuthUser() == '' ? 'user1' : httpAuthUser(); ?>" />
</div>
</div>
@@ -861,14 +796,14 @@ function printStep3 () {
<div class="form-group">
<label class="group-name" for="host"><?php echo _t ('host'); ?></label>
<div class="group-controls">
- <input type="text" id="host" name="host" value="<?php echo isset ($_SESSION['bd_host']) ? $_SESSION['bd_host'] : 'localhost'; ?>" />
+ <input type="text" id="host" name="host" pattern="[0-9A-Za-z_.-]{1,64}" value="<?php echo isset ($_SESSION['bd_host']) ? $_SESSION['bd_host'] : 'localhost'; ?>" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="user"><?php echo _t ('username'); ?></label>
<div class="group-controls">
- <input type="text" id="user" name="user" value="<?php echo isset ($_SESSION['bd_user']) ? $_SESSION['bd_user'] : ''; ?>" />
+ <input type="text" id="user" name="user" maxlength="16" pattern="[0-9A-Za-z_]{1,16}" value="<?php echo isset ($_SESSION['bd_user']) ? $_SESSION['bd_user'] : ''; ?>" />
</div>
</div>
@@ -882,14 +817,14 @@ function printStep3 () {
<div class="form-group">
<label class="group-name" for="base"><?php echo _t ('bdd'); ?></label>
<div class="group-controls">
- <input type="text" id="base" name="base" maxlength="64" value="<?php echo isset ($_SESSION['bd_base']) ? $_SESSION['bd_base'] : ''; ?>" placeholder="freshrss" />
+ <input type="text" id="base" name="base" maxlength="64" pattern="[0-9A-Za-z_]{1,64}" value="<?php echo isset ($_SESSION['bd_base']) ? $_SESSION['bd_base'] : ''; ?>" placeholder="freshrss" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="prefix"><?php echo _t ('prefix'); ?></label>
<div class="group-controls">
- <input type="text" id="prefix" name="prefix" maxlength="16" value="<?php echo isset ($_SESSION['bd_prefix']) ? $_SESSION['bd_prefix'] : 'freshrss_'; ?>" />
+ <input type="text" id="prefix" name="prefix" maxlength="16" pattern="[0-9A-Za-z_]{1,16}" value="<?php echo isset ($_SESSION['bd_prefix']) ? $_SESSION['bd_prefix'] : 'freshrss_'; ?>" />
</div>
</div>
diff --git a/p/index.html b/p/index.html
index af91b717e..5adacab2c 100644
--- a/p/index.html
+++ b/p/index.html
@@ -2,11 +2,31 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
<head>
<meta charset="UTF-8" />
+<meta name="viewport" content="initial-scale=1.0" />
<meta http-equiv="Refresh" content="0; url=i/" />
-<title>Redirection</title>
+<title>FreshRSS</title>
+<link rel="shortcut icon" type="image/x-icon" sizes="16x16 64x64" href="favicon.ico" />
+<link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="themes/icons/favicon-256.png" />
+<meta name="msapplication-TileColor" content="#FFF" />
+<meta name="robots" content="noindex,nofollow" />
+<style>
+body {
+ font-family: sans-serif;
+ text-align: center;
+}
+h1 {
+ font-size: xx-large;
+ text-shadow: 1px -1px 0 #CCCCCC;
+}
+h1 a {
+ color: #0062BE;
+ text-decoration: none;
+}
+</style>
</head>
<body>
-<p><a href="i/">FreshRSS</a></p>
+<h1><a href="i/">FreshRSS</a></h1>
+<p><a href="i/"><img class="logo" width="25%" src="themes/icons/icon.svg" alt="⊚" /></a></p>
</body>
</html>
diff --git a/p/index.php b/p/index.php
deleted file mode 100644
index e90662078..000000000
--- a/p/index.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-header('Location: i/', true, 301);
-include('index.html');
diff --git a/p/scripts/main.js b/p/scripts/main.js
index ef05eb2fb..1a41dac9c 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -220,6 +220,13 @@ function collapse_entry() {
$(".flux.current").toggleClass("active");
}
+function auto_share() {
+ var share = $(".flux.current.active").find('.dropdown-target[id^="dropdown-share"]');
+ if (share.length) {
+ window.location.hash = share.attr('id');
+ }
+}
+
function inMarkViewport(flux, box_to_follow, relative_follow) {
var top = flux.position().top;
if (relative_follow) {
@@ -338,6 +345,11 @@ function init_shortcuts() {
}, {
'disable_in_input': true
});
+ shortcut.add(shortcuts.auto_share, function () {
+ auto_share();
+ }, {
+ 'disable_in_input': true
+ });
// Touches de navigation
shortcut.add(shortcuts.prev_entry, prev_entry, {
diff --git a/p/themes/default/global.css b/p/themes/default/global.css
index 440fc6e41..2cc195f90 100644
--- a/p/themes/default/global.css
+++ b/p/themes/default/global.css
@@ -112,6 +112,10 @@ input, select, textarea {
border-color: #33BBFF;
box-shadow: 0 2px 2px #DDDDFF inset;
}
+ input:invalid, select:invalid {
+ border-color: red;
+ box-shadow: 0 0 2px 1px red;
+ }
.form-group {
margin: 0;
diff --git a/p/themes/flat-design/global.css b/p/themes/flat-design/global.css
index 90b59d002..c24a9f481 100644
--- a/p/themes/flat-design/global.css
+++ b/p/themes/flat-design/global.css
@@ -113,6 +113,10 @@ input, select, textarea {
color: #333;
border-color: #2980b9;
}
+ input:invalid, select:invalid {
+ border-color: red;
+ box-shadow: 0 0 2px 1px red;
+ }
.form-group {
margin: 5px 0;
diff --git a/p/themes/icons/favicon-128.png b/p/themes/icons/favicon-128.png
new file mode 100644
index 000000000..329b5c0f6
--- /dev/null
+++ b/p/themes/icons/favicon-128.png
Binary files differ
diff --git a/p/themes/icons/favicon-16.png b/p/themes/icons/favicon-16.png
new file mode 100644
index 000000000..abe71c491
--- /dev/null
+++ b/p/themes/icons/favicon-16.png
Binary files differ
diff --git a/p/themes/icons/favicon-256.png b/p/themes/icons/favicon-256.png
new file mode 100644
index 000000000..9d9a11904
--- /dev/null
+++ b/p/themes/icons/favicon-256.png
Binary files differ
diff --git a/p/themes/icons/favicon-32.png b/p/themes/icons/favicon-32.png
new file mode 100644
index 000000000..cfada8c46
--- /dev/null
+++ b/p/themes/icons/favicon-32.png
Binary files differ
diff --git a/p/themes/icons/favicon-48.png b/p/themes/icons/favicon-48.png
new file mode 100644
index 000000000..870b43ef1
--- /dev/null
+++ b/p/themes/icons/favicon-48.png
Binary files differ
diff --git a/p/themes/icons/favicon-512.png b/p/themes/icons/favicon-512.png
new file mode 100644
index 000000000..cc8d9b559
--- /dev/null
+++ b/p/themes/icons/favicon-512.png
Binary files differ
diff --git a/p/themes/icons/favicon-64.png b/p/themes/icons/favicon-64.png
new file mode 100644
index 000000000..5ee379f19
--- /dev/null
+++ b/p/themes/icons/favicon-64.png
Binary files differ