Move application code to app folder
This commit is contained in:
parent
32b4f684d0
commit
1f88eb50f3
@ -3,3 +3,5 @@
|
|||||||
.gitignore
|
.gitignore
|
||||||
.dockerignore
|
.dockerignore
|
||||||
.travis.yml
|
.travis.yml
|
||||||
|
tests
|
||||||
|
scripts
|
||||||
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -29,5 +29,4 @@ vendor/bin/ export-ignore
|
|||||||
vendor/fguillot/picofeed/picofeed export-ignore
|
vendor/fguillot/picofeed/picofeed export-ignore
|
||||||
|
|
||||||
# unittests
|
# unittests
|
||||||
phpunit.xml export-ignore
|
|
||||||
**/tests/ export-ignore
|
**/tests/ export-ignore
|
||||||
|
43
.gitignore
vendored
43
.gitignore
vendored
@ -1,47 +1,13 @@
|
|||||||
# Compiled source #
|
|
||||||
###################
|
|
||||||
*.com
|
|
||||||
*.class
|
|
||||||
*.dll
|
|
||||||
*.exe
|
|
||||||
*.o
|
|
||||||
*.so
|
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# Packages #
|
|
||||||
############
|
|
||||||
# it's better to unpack these files and commit the raw source
|
|
||||||
# git has its own built in compression methods
|
|
||||||
*.7z
|
|
||||||
*.dmg
|
|
||||||
*.gz
|
|
||||||
*.iso
|
|
||||||
*.jar
|
|
||||||
*.rar
|
|
||||||
*.tar
|
|
||||||
*.zip
|
|
||||||
|
|
||||||
# Logs and databases #
|
|
||||||
######################
|
|
||||||
*.log
|
*.log
|
||||||
*.sql
|
|
||||||
*.sqlite
|
*.sqlite
|
||||||
*.sqlite-journal
|
*.sqlite-journal
|
||||||
|
|
||||||
# OS generated files #
|
|
||||||
######################
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
ehthumbs.db
|
|
||||||
Icon?
|
Icon?
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
*.swp
|
*.swp
|
||||||
.*.swp
|
.*.swp
|
||||||
*~
|
*~
|
||||||
*.lock
|
*.lock
|
||||||
*.out
|
|
||||||
|
|
||||||
# IDE generated files #
|
|
||||||
######################
|
|
||||||
.idea
|
.idea
|
||||||
.buildpath
|
.buildpath
|
||||||
.project
|
.project
|
||||||
@ -50,12 +16,9 @@ Thumbs.db
|
|||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
.nbproject
|
.nbproject
|
||||||
nbproject
|
nbproject
|
||||||
|
|
||||||
# App specific #
|
|
||||||
################
|
|
||||||
config.php
|
config.php
|
||||||
!models/*
|
!app/models/*
|
||||||
!controllers/*
|
!app/controllers/*
|
||||||
|
!app/templates/*
|
||||||
rules/*.php
|
rules/*.php
|
||||||
data/favicons/*.*
|
data/favicons/*.*
|
||||||
/nbproject/private/
|
|
||||||
|
@ -74,5 +74,5 @@ if (! is_writable(FAVICON_DIRECTORY)) {
|
|||||||
|
|
||||||
// Include password_compat for PHP < 5.5
|
// Include password_compat for PHP < 5.5
|
||||||
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
||||||
require __DIR__.'/lib/password.php';
|
require __DIR__.'/libraries/password.php';
|
||||||
}
|
}
|
37
app/common.php
Normal file
37
app/common.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
|
if (file_exists(__DIR__.'/../config.php')) {
|
||||||
|
require __DIR__.'/../config.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
require __DIR__.'/constants.php';
|
||||||
|
require __DIR__.'/check_setup.php';
|
||||||
|
require __DIR__.'/functions.php';
|
||||||
|
|
||||||
|
PicoDb\Database::setInstance('db', function() {
|
||||||
|
$db = new PicoDb\Database(array(
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'filename' => Model\Database\get_path(),
|
||||||
|
));
|
||||||
|
|
||||||
|
if ($db->schema()->check(Schema\VERSION)) {
|
||||||
|
return $db;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$errors = $db->getLogMessages();
|
||||||
|
|
||||||
|
$html = 'Unable to migrate the database schema, <strong>please copy and paste this message and create a bug report:</strong><hr/>';
|
||||||
|
$html .= '<pre><code>';
|
||||||
|
$html .= (isset($errors[0]) ? $errors[0] : 'Unknown SQL error').PHP_EOL.PHP_EOL;
|
||||||
|
$html .= '- PHP version: '.phpversion().PHP_EOL;
|
||||||
|
$html .= '- SAPI: '.php_sapi_name().PHP_EOL;
|
||||||
|
$html .= '- PDO Sqlite version: '.phpversion('pdo_sqlite').PHP_EOL;
|
||||||
|
$html .= '- Sqlite version: '.$db->getDriver()->getDatabaseVersion().PHP_EOL;
|
||||||
|
$html .= '- OS: '.php_uname();
|
||||||
|
$html .= '</code></pre>';
|
||||||
|
|
||||||
|
die($html);
|
||||||
|
}
|
||||||
|
});
|
@ -1,18 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require __DIR__.'/vendor/autoload.php';
|
|
||||||
|
|
||||||
if (file_exists(__DIR__.'/config.php')) {
|
|
||||||
require __DIR__.'/config.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
defined('APP_VERSION') or define('APP_VERSION', Helper\parse_app_version('$Format:%d$','$Format:%H$'));
|
defined('APP_VERSION') or define('APP_VERSION', Helper\parse_app_version('$Format:%d$','$Format:%H$'));
|
||||||
|
|
||||||
defined('HTTP_TIMEOUT') or define('HTTP_TIMEOUT', 20);
|
defined('HTTP_TIMEOUT') or define('HTTP_TIMEOUT', 20);
|
||||||
defined('HTTP_MAX_RESPONSE_SIZE') or define('HTTP_MAX_RESPONSE_SIZE', 2097152);
|
defined('HTTP_MAX_RESPONSE_SIZE') or define('HTTP_MAX_RESPONSE_SIZE', 2097152);
|
||||||
|
|
||||||
defined('BASE_URL_DIRECTORY') or define('BASE_URL_DIRECTORY', dirname($_SERVER['PHP_SELF']));
|
defined('BASE_URL_DIRECTORY') or define('BASE_URL_DIRECTORY', dirname($_SERVER['PHP_SELF']));
|
||||||
defined('ROOT_DIRECTORY') or define('ROOT_DIRECTORY', __DIR__);
|
defined('ROOT_DIRECTORY') or define('ROOT_DIRECTORY', implode(DIRECTORY_SEPARATOR, array(__DIR__, '..')));
|
||||||
defined('DATA_DIRECTORY') or define('DATA_DIRECTORY', ROOT_DIRECTORY.DIRECTORY_SEPARATOR.'data');
|
defined('DATA_DIRECTORY') or define('DATA_DIRECTORY', ROOT_DIRECTORY.DIRECTORY_SEPARATOR.'data');
|
||||||
|
|
||||||
defined('FAVICON_DIRECTORY') or define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
defined('FAVICON_DIRECTORY') or define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
||||||
@ -45,32 +39,3 @@ defined('ENABLE_HSTS') or define('ENABLE_HSTS', true);
|
|||||||
defined('BEANSTALKD_HOST') or define('BEANSTALKD_HOST', '127.0.0.1');
|
defined('BEANSTALKD_HOST') or define('BEANSTALKD_HOST', '127.0.0.1');
|
||||||
defined('BEANSTALKD_QUEUE') or define('BEANSTALKD_QUEUE', 'feeds');
|
defined('BEANSTALKD_QUEUE') or define('BEANSTALKD_QUEUE', 'feeds');
|
||||||
defined('BEANSTALKD_TTL') or define('BEANSTALKD_TTL', 120);
|
defined('BEANSTALKD_TTL') or define('BEANSTALKD_TTL', 120);
|
||||||
|
|
||||||
require __DIR__.'/check_setup.php';
|
|
||||||
|
|
||||||
PicoDb\Database::setInstance('db', function() {
|
|
||||||
|
|
||||||
$db = new PicoDb\Database(array(
|
|
||||||
'driver' => 'sqlite',
|
|
||||||
'filename' => Model\Database\get_path(),
|
|
||||||
));
|
|
||||||
|
|
||||||
if ($db->schema()->check(Schema\VERSION)) {
|
|
||||||
return $db;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$errors = $db->getLogMessages();
|
|
||||||
|
|
||||||
$html = 'Unable to migrate the database schema, <strong>please copy and paste this message and create a bug report:</strong><hr/>';
|
|
||||||
$html .= '<pre><code>';
|
|
||||||
$html .= (isset($errors[0]) ? $errors[0] : 'Unknown SQL error').PHP_EOL.PHP_EOL;
|
|
||||||
$html .= '- PHP version: '.phpversion().PHP_EOL;
|
|
||||||
$html .= '- SAPI: '.php_sapi_name().PHP_EOL;
|
|
||||||
$html .= '- PDO Sqlite version: '.phpversion('pdo_sqlite').PHP_EOL;
|
|
||||||
$html .= '- Sqlite version: '.$db->getDriver()->getDatabaseVersion().PHP_EOL;
|
|
||||||
$html .= '- OS: '.php_uname();
|
|
||||||
$html .= '</code></pre>';
|
|
||||||
|
|
||||||
die($html);
|
|
||||||
}
|
|
||||||
});
|
|
@ -7,26 +7,22 @@ function get_server_variable($variable)
|
|||||||
return isset($_SERVER[$variable]) ? $_SERVER[$variable] : '';
|
return isset($_SERVER[$variable]) ? $_SERVER[$variable] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function param($name, $default_value = null)
|
function param($name, $default_value = null)
|
||||||
{
|
{
|
||||||
return isset($_GET[$name]) ? $_GET[$name] : $default_value;
|
return isset($_GET[$name]) ? $_GET[$name] : $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function int_param($name, $default_value = 0)
|
function int_param($name, $default_value = 0)
|
||||||
{
|
{
|
||||||
return isset($_GET[$name]) && ctype_digit($_GET[$name]) ? (int) $_GET[$name] : $default_value;
|
return isset($_GET[$name]) && ctype_digit($_GET[$name]) ? (int) $_GET[$name] : $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function value($name)
|
function value($name)
|
||||||
{
|
{
|
||||||
$values = values();
|
$values = values();
|
||||||
return isset($values[$name]) ? $values[$name] : null;
|
return isset($values[$name]) ? $values[$name] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function values()
|
function values()
|
||||||
{
|
{
|
||||||
if (! empty($_POST)) {
|
if (! empty($_POST)) {
|
||||||
@ -42,13 +38,11 @@ function values()
|
|||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function body()
|
function body()
|
||||||
{
|
{
|
||||||
return file_get_contents('php://input');
|
return file_get_contents('php://input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function file_content($field)
|
function file_content($field)
|
||||||
{
|
{
|
||||||
if (isset($_FILES[$field])) {
|
if (isset($_FILES[$field])) {
|
||||||
@ -58,25 +52,21 @@ function file_content($field)
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function uri()
|
function uri()
|
||||||
{
|
{
|
||||||
return $_SERVER['REQUEST_URI'];
|
return $_SERVER['REQUEST_URI'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function is_post()
|
function is_post()
|
||||||
{
|
{
|
||||||
return $_SERVER['REQUEST_METHOD'] === 'POST';
|
return $_SERVER['REQUEST_METHOD'] === 'POST';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function get_user_agent()
|
function get_user_agent()
|
||||||
{
|
{
|
||||||
return get_server_variable('HTTP_USER_AGENT') ?: t('Unknown');
|
return get_server_variable('HTTP_USER_AGENT') ?: 'Unknown';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function get_ip_address()
|
function get_ip_address()
|
||||||
{
|
{
|
||||||
$keys = array(
|
$keys = array(
|
||||||
@ -99,5 +89,5 @@ function get_ip_address()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return t('Unknown');
|
return 'Unknown';
|
||||||
}
|
}
|
@ -7,7 +7,6 @@ function force_download($filename)
|
|||||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function status($status_code)
|
function status($status_code)
|
||||||
{
|
{
|
||||||
$sapi_name = php_sapi_name();
|
$sapi_name = php_sapi_name();
|
||||||
@ -19,14 +18,12 @@ function status($status_code)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function redirect($url, $status_code = 302)
|
function redirect($url, $status_code = 302)
|
||||||
{
|
{
|
||||||
header('Location: '.$url, true, $status_code);
|
header('Location: '.$url, true, $status_code);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function json(array $data, $status_code = 200)
|
function json(array $data, $status_code = 200)
|
||||||
{
|
{
|
||||||
status($status_code);
|
status($status_code);
|
||||||
@ -37,7 +34,6 @@ function json(array $data, $status_code = 200)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function text($data, $status_code = 200)
|
function text($data, $status_code = 200)
|
||||||
{
|
{
|
||||||
status($status_code);
|
status($status_code);
|
||||||
@ -48,7 +44,6 @@ function text($data, $status_code = 200)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function html($data, $status_code = 200)
|
function html($data, $status_code = 200)
|
||||||
{
|
{
|
||||||
status($status_code);
|
status($status_code);
|
||||||
@ -59,7 +54,6 @@ function html($data, $status_code = 200)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function xml($data, $status_code = 200)
|
function xml($data, $status_code = 200)
|
||||||
{
|
{
|
||||||
status($status_code);
|
status($status_code);
|
||||||
@ -70,7 +64,6 @@ function xml($data, $status_code = 200)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function raw($data, $status_code = 200)
|
function raw($data, $status_code = 200)
|
||||||
{
|
{
|
||||||
status($status_code);
|
status($status_code);
|
||||||
@ -78,7 +71,6 @@ function raw($data, $status_code = 200)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function binary($data, $status_code = 200)
|
function binary($data, $status_code = 200)
|
||||||
{
|
{
|
||||||
status($status_code);
|
status($status_code);
|
||||||
@ -90,7 +82,6 @@ function binary($data, $status_code = 200)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function csp(array $policies = array())
|
function csp(array $policies = array())
|
||||||
{
|
{
|
||||||
$policies['default-src'] = "'self'";
|
$policies['default-src'] = "'self'";
|
||||||
@ -115,25 +106,21 @@ function csp(array $policies = array())
|
|||||||
header('Content-Security-Policy: '.$values);
|
header('Content-Security-Policy: '.$values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function nosniff()
|
function nosniff()
|
||||||
{
|
{
|
||||||
header('X-Content-Type-Options: nosniff');
|
header('X-Content-Type-Options: nosniff');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function xss()
|
function xss()
|
||||||
{
|
{
|
||||||
header('X-XSS-Protection: 1; mode=block');
|
header('X-XSS-Protection: 1; mode=block');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function hsts()
|
function hsts()
|
||||||
{
|
{
|
||||||
header('Strict-Transport-Security: max-age=31536000');
|
header('Strict-Transport-Security: max-age=31536000');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function xframe($mode = 'DENY', array $urls = array())
|
function xframe($mode = 'DENY', array $urls = array())
|
||||||
{
|
{
|
||||||
header('X-Frame-Options: '.$mode.' '.implode(' ', $urls));
|
header('X-Frame-Options: '.$mode.' '.implode(' ', $urls));
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
namespace Router;
|
namespace Router;
|
||||||
|
|
||||||
// Load controllers: bootstrap('controllers', 'controller1', 'controller2')
|
use Closure;
|
||||||
|
|
||||||
function bootstrap()
|
function bootstrap()
|
||||||
{
|
{
|
||||||
$files = \func_get_args();
|
$files = func_get_args();
|
||||||
$base_path = array_shift($files);
|
$base_path = array_shift($files);
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
@ -38,7 +39,7 @@ function before_action($name, $value = null)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute an action
|
// Execute an action
|
||||||
function action($name, \Closure $callback)
|
function action($name, Closure $callback)
|
||||||
{
|
{
|
||||||
$handler = isset($_GET['action']) ? $_GET['action'] : 'default';
|
$handler = isset($_GET['action']) ? $_GET['action'] : 'default';
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ function action($name, \Closure $callback)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute an action only for POST requests
|
// Execute an action only for POST requests
|
||||||
function post_action($name, \Closure $callback)
|
function post_action($name, Closure $callback)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||||
action($name, $callback);
|
action($name, $callback);
|
||||||
@ -58,7 +59,7 @@ function post_action($name, \Closure $callback)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute an action only for GET requests
|
// Execute an action only for GET requests
|
||||||
function get_action($name, \Closure $callback)
|
function get_action($name, Closure $callback)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||||
action($name, $callback);
|
action($name, $callback);
|
||||||
@ -66,7 +67,7 @@ function get_action($name, \Closure $callback)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Run when no action have been executed before
|
// Run when no action have been executed before
|
||||||
function notfound(\Closure $callback)
|
function notfound(Closure $callback)
|
||||||
{
|
{
|
||||||
before('notfound');
|
before('notfound');
|
||||||
before_action('notfound');
|
before_action('notfound');
|
@ -4,7 +4,6 @@ namespace Session;
|
|||||||
|
|
||||||
const SESSION_LIFETIME = 2678400;
|
const SESSION_LIFETIME = 2678400;
|
||||||
|
|
||||||
|
|
||||||
function open($base_path = '/', $save_path = '', $session_lifetime = SESSION_LIFETIME)
|
function open($base_path = '/', $save_path = '', $session_lifetime = SESSION_LIFETIME)
|
||||||
{
|
{
|
||||||
if ($save_path !== '') {
|
if ($save_path !== '') {
|
||||||
@ -40,19 +39,16 @@ function open($base_path = '/', $save_path = '', $session_lifetime = SESSION_LIF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
session_destroy();
|
session_destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function flash($message)
|
function flash($message)
|
||||||
{
|
{
|
||||||
$_SESSION['flash_message'] = $message;
|
$_SESSION['flash_message'] = $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function flash_error($message)
|
function flash_error($message)
|
||||||
{
|
{
|
||||||
$_SESSION['flash_error_message'] = $message;
|
$_SESSION['flash_error_message'] = $message;
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Template;
|
namespace Template;
|
||||||
|
|
||||||
const PATH = 'templates/';
|
const PATH = __DIR__.'/../templates/';
|
||||||
|
|
||||||
// Template\load('template_name', ['bla' => 'value']);
|
// Template\load('template_name', ['bla' => 'value']);
|
||||||
function load()
|
function load()
|
||||||
@ -28,7 +28,6 @@ function load()
|
|||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function layout($template_name, array $template_args = array(), $layout_name = 'layout')
|
function layout($template_name, array $template_args = array(), $layout_name = 'layout')
|
||||||
{
|
{
|
||||||
return load($layout_name, $template_args + array('content_for_layout' => load($template_name, $template_args)));
|
return load($layout_name, $template_args + array('content_for_layout' => load($template_name, $template_args)));
|
143
app/core/Translator.php
Normal file
143
app/core/Translator.php
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Translator;
|
||||||
|
|
||||||
|
const PATH = __DIR__.'/../locales/';
|
||||||
|
|
||||||
|
function translate($identifier)
|
||||||
|
{
|
||||||
|
$args = func_get_args();
|
||||||
|
|
||||||
|
array_shift($args);
|
||||||
|
array_unshift($args, get($identifier, $identifier, $args));
|
||||||
|
|
||||||
|
foreach ($args as &$arg) {
|
||||||
|
$arg = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return \call_user_func_array(
|
||||||
|
'sprintf',
|
||||||
|
$args
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function translate_no_escaping($identifier)
|
||||||
|
{
|
||||||
|
$args = func_get_args();
|
||||||
|
|
||||||
|
array_shift($args);
|
||||||
|
array_unshift($args, get($identifier, $identifier));
|
||||||
|
|
||||||
|
return call_user_func_array(
|
||||||
|
'sprintf',
|
||||||
|
$args
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function number($number)
|
||||||
|
{
|
||||||
|
return number_format(
|
||||||
|
$number,
|
||||||
|
get('number.decimals', 2),
|
||||||
|
get('number.decimals_separator', '.'),
|
||||||
|
get('number.thousands_separator', ',')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function currency($amount)
|
||||||
|
{
|
||||||
|
$position = get('currency.position', 'before');
|
||||||
|
$symbol = get('currency.symbol', '$');
|
||||||
|
$str = '';
|
||||||
|
|
||||||
|
if ($position === 'before') {
|
||||||
|
$str .= $symbol;
|
||||||
|
}
|
||||||
|
|
||||||
|
$str .= number($amount);
|
||||||
|
|
||||||
|
if ($position === 'after') {
|
||||||
|
$str .= ' '.$symbol;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
function datetime($format, $timestamp)
|
||||||
|
{
|
||||||
|
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
|
||||||
|
$format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format);
|
||||||
|
$format = preg_replace('#(?<!%)((?:%%)*)%k#', '\1%#H', $format);
|
||||||
|
}
|
||||||
|
|
||||||
|
return strftime($format, (int) $timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
function get($identifier, $default = '', array $values = array())
|
||||||
|
{
|
||||||
|
$locales = container();
|
||||||
|
$translation = $default;
|
||||||
|
|
||||||
|
if (isset($locales[$identifier])) {
|
||||||
|
if (is_array($locales[$identifier])) {
|
||||||
|
$translation = plural($identifier, $default, $values);
|
||||||
|
} else {
|
||||||
|
$translation = $locales[$identifier];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $translation;
|
||||||
|
}
|
||||||
|
|
||||||
|
function plural($identifier, $default, array $values)
|
||||||
|
{
|
||||||
|
$locales = container();
|
||||||
|
$plural = 0;
|
||||||
|
|
||||||
|
foreach ($values as $value) {
|
||||||
|
if (is_numeric($value)) {
|
||||||
|
$value = abs($value);
|
||||||
|
$plural = (int) $locales['plural']($value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for ($i = $plural; $i >= 0; --$i) {
|
||||||
|
if (isset($locales[$identifier][$i])) {
|
||||||
|
return $locales[$identifier][$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
function load($language)
|
||||||
|
{
|
||||||
|
setlocale(LC_TIME, $language.'.UTF-8');
|
||||||
|
|
||||||
|
$path = PATH.$language;
|
||||||
|
$locales = array();
|
||||||
|
|
||||||
|
if (is_dir($path)) {
|
||||||
|
$dir = new \DirectoryIterator($path);
|
||||||
|
|
||||||
|
foreach ($dir as $fileinfo) {
|
||||||
|
if (strpos($fileinfo->getFilename(), '.php') !== false) {
|
||||||
|
$locales = array_merge($locales, include $fileinfo->getPathname());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
container($locales);
|
||||||
|
}
|
||||||
|
|
||||||
|
function container($locales = null)
|
||||||
|
{
|
||||||
|
static $values = array();
|
||||||
|
|
||||||
|
if ($locales !== null) {
|
||||||
|
$values = $locales;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $values;
|
||||||
|
}
|
26
app/functions.php
Normal file
26
app/functions.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function tne()
|
||||||
|
{
|
||||||
|
return call_user_func_array('\Translator\translate_no_escaping', func_get_args());
|
||||||
|
}
|
||||||
|
|
||||||
|
function t()
|
||||||
|
{
|
||||||
|
return call_user_func_array('\Translator\translate', func_get_args());
|
||||||
|
}
|
||||||
|
|
||||||
|
function c()
|
||||||
|
{
|
||||||
|
return call_user_func_array('\Translator\currency', func_get_args());
|
||||||
|
}
|
||||||
|
|
||||||
|
function n()
|
||||||
|
{
|
||||||
|
return call_user_func_array('\Translator\number', func_get_args());
|
||||||
|
}
|
||||||
|
|
||||||
|
function dt()
|
||||||
|
{
|
||||||
|
return call_user_func_array('\Translator\datetime', func_get_args());
|
||||||
|
}
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
'Item title links to' => 'Titulek článku odkazuje na',
|
'Item title links to' => 'Titulek článku odkazuje na',
|
||||||
'Original' => 'Originál',
|
'Original' => 'Originál',
|
||||||
'Last login:' => 'Poslední přihlášení:',
|
'Last login:' => 'Poslední přihlášení:',
|
||||||
'Search' => 'Hledat',
|
|
||||||
'There are no results for your search' => 'Žádné výsledky vašeho hledání',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -247,6 +247,4 @@ return array(
|
|||||||
'Item title links to' => 'アイテムのタイトルのリンク先',
|
'Item title links to' => 'アイテムのタイトルのリンク先',
|
||||||
'Original' => '元のページ',
|
'Original' => '元のページ',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
'Item title links to' => 'Заголовок статьи ведет на',
|
'Item title links to' => 'Заголовок статьи ведет на',
|
||||||
'Original' => 'Оригинал',
|
'Original' => 'Оригинал',
|
||||||
'Last login:' => 'Последний вход:',
|
'Last login:' => 'Последний вход:',
|
||||||
'Search' => 'Поиск',
|
|
||||||
'There are no results for your search' => 'По вашему запросу ничего не нашлось',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
'Item title links to' => 'Öğe başlığıyla ilişkili bağlantılar',
|
'Item title links to' => 'Öğe başlığıyla ilişkili bağlantılar',
|
||||||
'Original' => 'Orijinal',
|
'Original' => 'Orijinal',
|
||||||
'Last login:' => 'En son sisteme giriş zamanı:',
|
'Last login:' => 'En son sisteme giriş zamanı:',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -245,6 +245,4 @@ return array(
|
|||||||
// 'Item title links to' => '',
|
// 'Item title links to' => '',
|
||||||
// 'Original' => '',
|
// 'Original' => '',
|
||||||
// 'Last login:' => '',
|
// 'Last login:' => '',
|
||||||
// 'Search' => '',
|
|
||||||
// 'There are no results for your search' => '',
|
|
||||||
);
|
);
|
@ -4,7 +4,6 @@ namespace Schema;
|
|||||||
|
|
||||||
use PDO;
|
use PDO;
|
||||||
use Helper;
|
use Helper;
|
||||||
use Model\Config;
|
|
||||||
|
|
||||||
const VERSION = 44;
|
const VERSION = 44;
|
||||||
|
|
@ -25,29 +25,29 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"helpers/app.php",
|
"app/schemas/sqlite.php",
|
||||||
"helpers/csrf.php",
|
"app/helpers/app.php",
|
||||||
"helpers/favicon.php",
|
"app/helpers/csrf.php",
|
||||||
"helpers/form.php",
|
"app/helpers/favicon.php",
|
||||||
"helpers/template.php",
|
"app/helpers/form.php",
|
||||||
"lib/Translator.php",
|
"app/helpers/template.php",
|
||||||
"lib/Request.php",
|
"app/core/translator.php",
|
||||||
"lib/Response.php",
|
"app/core/request.php",
|
||||||
"lib/Router.php",
|
"app/core/response.php",
|
||||||
"lib/Session.php",
|
"app/core/router.php",
|
||||||
"lib/Template.php",
|
"app/core/session.php",
|
||||||
"models/config.php",
|
"app/core/template.php",
|
||||||
"models/service.php",
|
"app/models/config.php",
|
||||||
"models/user.php",
|
"app/models/service.php",
|
||||||
"models/feed.php",
|
"app/models/user.php",
|
||||||
"models/item.php",
|
"app/models/feed.php",
|
||||||
"models/proxy.php",
|
"app/models/item.php",
|
||||||
"models/schema.php",
|
"app/models/proxy.php",
|
||||||
"models/auto_update.php",
|
"app/models/auto_update.php",
|
||||||
"models/database.php",
|
"app/models/database.php",
|
||||||
"models/remember_me.php",
|
"app/models/remember_me.php",
|
||||||
"models/group.php",
|
"app/models/group.php",
|
||||||
"models/favicon.php"
|
"app/models/favicon.php"
|
||||||
],
|
],
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"vendor/fguillot/json-rpc/src/",
|
"vendor/fguillot/json-rpc/src/",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require '../common.php';
|
require __DIR__.'/../app/common.php';
|
||||||
|
|
||||||
use Model\Feed;
|
use Model\Feed;
|
||||||
use Model\Group;
|
use Model\Group;
|
||||||
|
16
index.php
16
index.php
@ -1,10 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require __DIR__.'/common.php';
|
require __DIR__.'/app/common.php';
|
||||||
|
|
||||||
Router\bootstrap(__DIR__.'/controllers', 'common', 'console', 'user', 'config', 'item', 'history', 'bookmark', 'feed', 'search');
|
Router\bootstrap(
|
||||||
|
__DIR__.'/app/controllers',
|
||||||
|
'common',
|
||||||
|
'console',
|
||||||
|
'user',
|
||||||
|
'config',
|
||||||
|
'item',
|
||||||
|
'history',
|
||||||
|
'bookmark',
|
||||||
|
'feed',
|
||||||
|
'search'
|
||||||
|
);
|
||||||
|
|
||||||
// Page not found
|
|
||||||
Router\notfound(function() {
|
Router\notfound(function() {
|
||||||
Response\redirect('?action=unread');
|
Response\redirect('?action=unread');
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require __DIR__.'/common.php';
|
require __DIR__.'/app/common.php';
|
||||||
|
|
||||||
use JsonRPC\Server;
|
use JsonRPC\Server;
|
||||||
use Model\Config;
|
use Model\Config;
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Deny from all
|
|
@ -1,180 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Translator {
|
|
||||||
|
|
||||||
const PATH = 'locales/';
|
|
||||||
|
|
||||||
|
|
||||||
function translate($identifier)
|
|
||||||
{
|
|
||||||
$args = \func_get_args();
|
|
||||||
|
|
||||||
\array_shift($args);
|
|
||||||
\array_unshift($args, get($identifier, $identifier, $args));
|
|
||||||
|
|
||||||
foreach ($args as &$arg) {
|
|
||||||
$arg = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return \call_user_func_array(
|
|
||||||
'sprintf',
|
|
||||||
$args
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function translate_no_escaping($identifier)
|
|
||||||
{
|
|
||||||
$args = \func_get_args();
|
|
||||||
|
|
||||||
\array_shift($args);
|
|
||||||
\array_unshift($args, get($identifier, $identifier));
|
|
||||||
|
|
||||||
return \call_user_func_array(
|
|
||||||
'sprintf',
|
|
||||||
$args
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function number($number)
|
|
||||||
{
|
|
||||||
return number_format(
|
|
||||||
$number,
|
|
||||||
get('number.decimals', 2),
|
|
||||||
get('number.decimals_separator', '.'),
|
|
||||||
get('number.thousands_separator', ',')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function currency($amount)
|
|
||||||
{
|
|
||||||
$position = get('currency.position', 'before');
|
|
||||||
$symbol = get('currency.symbol', '$');
|
|
||||||
$str = '';
|
|
||||||
|
|
||||||
if ($position === 'before') {
|
|
||||||
$str .= $symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
$str .= number($amount);
|
|
||||||
|
|
||||||
if ($position === 'after') {
|
|
||||||
$str .= ' '.$symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function datetime($format, $timestamp)
|
|
||||||
{
|
|
||||||
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
|
|
||||||
$format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format);
|
|
||||||
$format = preg_replace('#(?<!%)((?:%%)*)%k#', '\1%#H', $format);
|
|
||||||
}
|
|
||||||
|
|
||||||
return strftime($format, (int) $timestamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function get($identifier, $default = '', array $values = array())
|
|
||||||
{
|
|
||||||
$locales = container();
|
|
||||||
$translation = $default;
|
|
||||||
|
|
||||||
if (isset($locales[$identifier])) {
|
|
||||||
if (is_array($locales[$identifier])) {
|
|
||||||
$translation = plural($identifier, $default, $values);
|
|
||||||
} else {
|
|
||||||
$translation = $locales[$identifier];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $translation;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function plural($identifier, $default, array $values)
|
|
||||||
{
|
|
||||||
$locales = container();
|
|
||||||
$plural = 0;
|
|
||||||
|
|
||||||
foreach ($values as $value) {
|
|
||||||
if (is_numeric($value)) {
|
|
||||||
$value = abs($value);
|
|
||||||
$plural = (int) $locales['plural']($value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = $plural; $i >= 0; --$i) {
|
|
||||||
if (isset($locales[$identifier][$i])) {
|
|
||||||
return $locales[$identifier][$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $default;
|
|
||||||
}
|
|
||||||
|
|
||||||
function load($language)
|
|
||||||
{
|
|
||||||
setlocale(LC_TIME, $language.'.UTF-8');
|
|
||||||
|
|
||||||
$path = PATH.$language;
|
|
||||||
$locales = array();
|
|
||||||
|
|
||||||
if (is_dir($path)) {
|
|
||||||
$dir = new \DirectoryIterator($path);
|
|
||||||
|
|
||||||
foreach ($dir as $fileinfo) {
|
|
||||||
if (strpos($fileinfo->getFilename(), '.php') !== false) {
|
|
||||||
$locales = array_merge($locales, include $fileinfo->getPathname());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
container($locales);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function container($locales = null)
|
|
||||||
{
|
|
||||||
static $values = array();
|
|
||||||
|
|
||||||
if ($locales !== null) {
|
|
||||||
$values = $locales;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $values;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
function tne()
|
|
||||||
{
|
|
||||||
return call_user_func_array('\Translator\translate_no_escaping', func_get_args());
|
|
||||||
}
|
|
||||||
|
|
||||||
function t()
|
|
||||||
{
|
|
||||||
return call_user_func_array('\Translator\translate', func_get_args());
|
|
||||||
}
|
|
||||||
|
|
||||||
function c()
|
|
||||||
{
|
|
||||||
return call_user_func_array('\Translator\currency', func_get_args());
|
|
||||||
}
|
|
||||||
|
|
||||||
function n()
|
|
||||||
{
|
|
||||||
return call_user_func_array('\Translator\number', func_get_args());
|
|
||||||
}
|
|
||||||
|
|
||||||
function dt()
|
|
||||||
{
|
|
||||||
return call_user_func_array('\Translator\datetime', func_get_args());
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
Deny from all
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use Pheanstalk\Pheanstalk;
|
use Pheanstalk\Pheanstalk;
|
||||||
|
|
||||||
require __DIR__.'/common.php';
|
require __DIR__.'/app/common.php';
|
||||||
|
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
die('This script can run only from the command line.'.PHP_EOL);
|
die('This script can run only from the command line.'.PHP_EOL);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
REF_LANG=${1:-fr_FR}
|
REF_LANG=${1:-fr_FR}
|
||||||
|
|
||||||
###
|
###
|
||||||
APP_DIR=`dirname $0`/../
|
APP_DIR=`dirname $0`/../app
|
||||||
LANG_FILE=$APP_DIR/locales/$REF_LANG/translations.php
|
LANG_FILE=$APP_DIR/locales/$REF_LANG/translations.php
|
||||||
TMPFILE=`mktemp`
|
TMPFILE=`mktemp`
|
||||||
|
|
||||||
@ -20,4 +20,4 @@ do
|
|||||||
done < $TMPFILE
|
done < $TMPFILE
|
||||||
|
|
||||||
# delete the work file
|
# delete the work file
|
||||||
rm $TMPFILE
|
rm $TMPFILE
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$reference_lang = 'fr_FR';
|
$reference_lang = 'fr_FR';
|
||||||
$reference_file = 'locales/'.$reference_lang.'/translations.php';
|
$reference_file = 'app/locales/'.$reference_lang.'/translations.php';
|
||||||
$reference = include $reference_file;
|
$reference = include $reference_file;
|
||||||
|
|
||||||
|
|
||||||
@ -43,11 +43,9 @@ function update_missing_locales(array $reference, $outdated_file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (new DirectoryIterator('locales') as $fileInfo) {
|
foreach (new DirectoryIterator('app/locales') as $fileInfo) {
|
||||||
|
|
||||||
if (! $fileInfo->isDot() && $fileInfo->isDir() && $fileInfo->getFilename() !== $reference_lang && $fileInfo->getFilename() !== 'en_US') {
|
if (! $fileInfo->isDot() && $fileInfo->isDir() && $fileInfo->getFilename() !== $reference_lang && $fileInfo->getFilename() !== 'en_US') {
|
||||||
|
$filename = 'app/locales/'.$fileInfo->getFilename().'/translations.php';
|
||||||
$filename = 'locales/'.$fileInfo->getFilename().'/translations.php';
|
|
||||||
|
|
||||||
echo $fileInfo->getFilename(), ' (', $filename, ')', PHP_EOL;
|
echo $fileInfo->getFilename(), ' (', $filename, ')', PHP_EOL;
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Deny from all
|
|
46
vendor/composer/autoload_files.php
vendored
46
vendor/composer/autoload_files.php
vendored
@ -6,27 +6,27 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'b799c009807ac0660ab624d18f619399' => $baseDir . '/helpers/app.php',
|
'1c6478a893aa3a9ae898668d7af7b441' => $baseDir . '/app/schemas/sqlite.php',
|
||||||
'4b6f1c38c1cab2809f0444d3a253f8f7' => $baseDir . '/helpers/csrf.php',
|
'f0aaf41fd213d5a97cf56c060c89445c' => $baseDir . '/app/helpers/app.php',
|
||||||
'1ec82876b83b01f4d5d91ab48a9cf9df' => $baseDir . '/helpers/favicon.php',
|
'5d8e3de7e01942090f1b7b4dbdfb5577' => $baseDir . '/app/helpers/csrf.php',
|
||||||
'3956a461ed00a30b727001d1c861a9b9' => $baseDir . '/helpers/form.php',
|
'3f7c6586b45b98746d18450089390313' => $baseDir . '/app/helpers/favicon.php',
|
||||||
'f4ed4710801c5f157356a94c00aae76c' => $baseDir . '/helpers/template.php',
|
'e96e91c85d691b966391981f72a31834' => $baseDir . '/app/helpers/form.php',
|
||||||
'2ba60f191527015eb45c05a71d95b69f' => $baseDir . '/lib/Translator.php',
|
'b8d3001d29a919647064eeaec3f6551e' => $baseDir . '/app/helpers/template.php',
|
||||||
'1d58cdba7ce052ff0ce0219a932c284a' => $baseDir . '/lib/Request.php',
|
'7793918f03299c5c8c900e412e166b4f' => $baseDir . '/app/core/translator.php',
|
||||||
'8e1ed5229092ce48fdcef0a911fd739d' => $baseDir . '/lib/Response.php',
|
'69d59b59e8b15a53cc782e283523018d' => $baseDir . '/app/core/request.php',
|
||||||
'4782391ac54646918f4edda27244ef7a' => $baseDir . '/lib/Router.php',
|
'3fd802226a33a97ae29d1f8315ff66a9' => $baseDir . '/app/core/response.php',
|
||||||
'8254a9abcf2a29f2c9e0505482e542ca' => $baseDir . '/lib/Session.php',
|
'dbd9090b0db725af4a3cd765a9d2e39a' => $baseDir . '/app/core/router.php',
|
||||||
'ff80894032fd9c2cba066a346e2e80a4' => $baseDir . '/lib/Template.php',
|
'98faa6699f100c5ddb2013d85f9dfabb' => $baseDir . '/app/core/session.php',
|
||||||
'044f1c6c1ed68d7380e7cf9c1cbf264f' => $baseDir . '/models/config.php',
|
'93228d441890e5962b0566344884332c' => $baseDir . '/app/core/template.php',
|
||||||
'66494fdbaa467880453e0c3bf7e1b4b6' => $baseDir . '/models/service.php',
|
'bc98222aedc910930f5b76b8c84f334e' => $baseDir . '/app/models/config.php',
|
||||||
'1f1a35303269c57e110e7f2e8ad5322c' => $baseDir . '/models/user.php',
|
'c3080c7edf4a590ce36fc4f3561968dc' => $baseDir . '/app/models/service.php',
|
||||||
'13b4e62b011b583c99539e59127b04c8' => $baseDir . '/models/feed.php',
|
'73671a34a21e27508f85cea36a9837de' => $baseDir . '/app/models/user.php',
|
||||||
'a34e2b55c1e205f246bb314c6ece3ece' => $baseDir . '/models/item.php',
|
'e8bcd5701df9db676003b87e27b091c9' => $baseDir . '/app/models/feed.php',
|
||||||
'5f0802749b9b6c20dcc4a40bad2c5ab5' => $baseDir . '/models/proxy.php',
|
'7318478c1ab18cc398507355a29a93c3' => $baseDir . '/app/models/item.php',
|
||||||
'5fd6b051860571d955491546dde72b3e' => $baseDir . '/models/schema.php',
|
'0bdc342df97b8a477df96dbb288b21bf' => $baseDir . '/app/models/proxy.php',
|
||||||
'19b5b92aaacb0223866ea24a70b6a079' => $baseDir . '/models/auto_update.php',
|
'd06207bd4580f7e9250cf39d0d648fc5' => $baseDir . '/app/models/auto_update.php',
|
||||||
'70b7654853824fd9bf3e8f66157a36b3' => $baseDir . '/models/database.php',
|
'6a19d5803b084354df8269801d4e98e4' => $baseDir . '/app/models/database.php',
|
||||||
'6b591661432612d3117d7448ab74aebf' => $baseDir . '/models/remember_me.php',
|
'ee585b658e324609d721bc6f959e85c8' => $baseDir . '/app/models/remember_me.php',
|
||||||
'7a00c855e2b58e86f58b8e0eed83ebdb' => $baseDir . '/models/group.php',
|
'fc49fda782025f9f73852265b1fa7760' => $baseDir . '/app/models/group.php',
|
||||||
'5d5d97d152d4281dff599cbd7871bf65' => $baseDir . '/models/favicon.php',
|
'785cebb801997d40232b8337459f1606' => $baseDir . '/app/models/favicon.php',
|
||||||
);
|
);
|
||||||
|
46
vendor/composer/autoload_static.php
vendored
46
vendor/composer/autoload_static.php
vendored
@ -7,29 +7,29 @@ namespace Composer\Autoload;
|
|||||||
class ComposerStaticInitfd7e8d436e1dc450edc3153ac8bc31b4
|
class ComposerStaticInitfd7e8d436e1dc450edc3153ac8bc31b4
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'b799c009807ac0660ab624d18f619399' => __DIR__ . '/../..' . '/helpers/app.php',
|
'1c6478a893aa3a9ae898668d7af7b441' => __DIR__ . '/../..' . '/app/schemas/sqlite.php',
|
||||||
'4b6f1c38c1cab2809f0444d3a253f8f7' => __DIR__ . '/../..' . '/helpers/csrf.php',
|
'f0aaf41fd213d5a97cf56c060c89445c' => __DIR__ . '/../..' . '/app/helpers/app.php',
|
||||||
'1ec82876b83b01f4d5d91ab48a9cf9df' => __DIR__ . '/../..' . '/helpers/favicon.php',
|
'5d8e3de7e01942090f1b7b4dbdfb5577' => __DIR__ . '/../..' . '/app/helpers/csrf.php',
|
||||||
'3956a461ed00a30b727001d1c861a9b9' => __DIR__ . '/../..' . '/helpers/form.php',
|
'3f7c6586b45b98746d18450089390313' => __DIR__ . '/../..' . '/app/helpers/favicon.php',
|
||||||
'f4ed4710801c5f157356a94c00aae76c' => __DIR__ . '/../..' . '/helpers/template.php',
|
'e96e91c85d691b966391981f72a31834' => __DIR__ . '/../..' . '/app/helpers/form.php',
|
||||||
'2ba60f191527015eb45c05a71d95b69f' => __DIR__ . '/../..' . '/lib/Translator.php',
|
'b8d3001d29a919647064eeaec3f6551e' => __DIR__ . '/../..' . '/app/helpers/template.php',
|
||||||
'1d58cdba7ce052ff0ce0219a932c284a' => __DIR__ . '/../..' . '/lib/Request.php',
|
'7793918f03299c5c8c900e412e166b4f' => __DIR__ . '/../..' . '/app/core/translator.php',
|
||||||
'8e1ed5229092ce48fdcef0a911fd739d' => __DIR__ . '/../..' . '/lib/Response.php',
|
'69d59b59e8b15a53cc782e283523018d' => __DIR__ . '/../..' . '/app/core/request.php',
|
||||||
'4782391ac54646918f4edda27244ef7a' => __DIR__ . '/../..' . '/lib/Router.php',
|
'3fd802226a33a97ae29d1f8315ff66a9' => __DIR__ . '/../..' . '/app/core/response.php',
|
||||||
'8254a9abcf2a29f2c9e0505482e542ca' => __DIR__ . '/../..' . '/lib/Session.php',
|
'dbd9090b0db725af4a3cd765a9d2e39a' => __DIR__ . '/../..' . '/app/core/router.php',
|
||||||
'ff80894032fd9c2cba066a346e2e80a4' => __DIR__ . '/../..' . '/lib/Template.php',
|
'98faa6699f100c5ddb2013d85f9dfabb' => __DIR__ . '/../..' . '/app/core/session.php',
|
||||||
'044f1c6c1ed68d7380e7cf9c1cbf264f' => __DIR__ . '/../..' . '/models/config.php',
|
'93228d441890e5962b0566344884332c' => __DIR__ . '/../..' . '/app/core/template.php',
|
||||||
'66494fdbaa467880453e0c3bf7e1b4b6' => __DIR__ . '/../..' . '/models/service.php',
|
'bc98222aedc910930f5b76b8c84f334e' => __DIR__ . '/../..' . '/app/models/config.php',
|
||||||
'1f1a35303269c57e110e7f2e8ad5322c' => __DIR__ . '/../..' . '/models/user.php',
|
'c3080c7edf4a590ce36fc4f3561968dc' => __DIR__ . '/../..' . '/app/models/service.php',
|
||||||
'13b4e62b011b583c99539e59127b04c8' => __DIR__ . '/../..' . '/models/feed.php',
|
'73671a34a21e27508f85cea36a9837de' => __DIR__ . '/../..' . '/app/models/user.php',
|
||||||
'a34e2b55c1e205f246bb314c6ece3ece' => __DIR__ . '/../..' . '/models/item.php',
|
'e8bcd5701df9db676003b87e27b091c9' => __DIR__ . '/../..' . '/app/models/feed.php',
|
||||||
'5f0802749b9b6c20dcc4a40bad2c5ab5' => __DIR__ . '/../..' . '/models/proxy.php',
|
'7318478c1ab18cc398507355a29a93c3' => __DIR__ . '/../..' . '/app/models/item.php',
|
||||||
'5fd6b051860571d955491546dde72b3e' => __DIR__ . '/../..' . '/models/schema.php',
|
'0bdc342df97b8a477df96dbb288b21bf' => __DIR__ . '/../..' . '/app/models/proxy.php',
|
||||||
'19b5b92aaacb0223866ea24a70b6a079' => __DIR__ . '/../..' . '/models/auto_update.php',
|
'd06207bd4580f7e9250cf39d0d648fc5' => __DIR__ . '/../..' . '/app/models/auto_update.php',
|
||||||
'70b7654853824fd9bf3e8f66157a36b3' => __DIR__ . '/../..' . '/models/database.php',
|
'6a19d5803b084354df8269801d4e98e4' => __DIR__ . '/../..' . '/app/models/database.php',
|
||||||
'6b591661432612d3117d7448ab74aebf' => __DIR__ . '/../..' . '/models/remember_me.php',
|
'ee585b658e324609d721bc6f959e85c8' => __DIR__ . '/../..' . '/app/models/remember_me.php',
|
||||||
'7a00c855e2b58e86f58b8e0eed83ebdb' => __DIR__ . '/../..' . '/models/group.php',
|
'fc49fda782025f9f73852265b1fa7760' => __DIR__ . '/../..' . '/app/models/group.php',
|
||||||
'5d5d97d152d4281dff599cbd7871bf65' => __DIR__ . '/../..' . '/models/favicon.php',
|
'785cebb801997d40232b8337459f1606' => __DIR__ . '/../..' . '/app/models/favicon.php',
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $prefixLengthsPsr4 = array (
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use Pheanstalk\Pheanstalk;
|
use Pheanstalk\Pheanstalk;
|
||||||
|
|
||||||
require __DIR__.'/common.php';
|
require __DIR__.'/app/common.php';
|
||||||
|
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
die('This script can run only from the command line.'.PHP_EOL);
|
die('This script can run only from the command line.'.PHP_EOL);
|
||||||
|
Loading…
Reference in New Issue
Block a user