mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-22 17:11:07 +00:00
new folders
This commit is contained in:
parent
c78c1a3f08
commit
6ad93dff69
61 changed files with 146 additions and 97 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -1,9 +1,8 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
assets/*
|
.vagrant
|
||||||
cache/*
|
app/assets/*
|
||||||
|
app/cache/*
|
||||||
vendor
|
vendor
|
||||||
composer.phar
|
composer.phar
|
||||||
db/poche.sqlite
|
db/poche.sqlite
|
||||||
inc/poche/config.inc.php
|
app/config/config.inc.php
|
||||||
inc/3rdparty/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer/
|
|
||||||
.vagrant
|
|
0
TRANSLATION.md
Executable file → Normal file
0
TRANSLATION.md
Executable file → Normal file
0
cache/.gitignore → app/cache/.gitignore
vendored
0
cache/.gitignore → app/cache/.gitignore
vendored
0
cache/.htaccess → app/cache/.htaccess
vendored
0
cache/.htaccess → app/cache/.htaccess
vendored
9
app/check_setup.php
Executable file
9
app/check_setup.php
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// install folder still present, need to install wallabag
|
||||||
|
// if (is_dir('install')) {
|
||||||
|
// require('install/index.php');
|
||||||
|
// exit;
|
||||||
|
// }
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
@define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite
|
@define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite
|
||||||
|
|
||||||
@define ('STORAGE_SQLITE', ROOT . '/db/poche.sqlite'); # if you are using sqlite, where the database file is located
|
@define ('STORAGE_SQLITE', ROOT . '/app/db/poche.sqlite'); # if you are using sqlite, where the database file is located
|
||||||
|
|
||||||
# only for postgres & mysql
|
# only for postgres & mysql
|
||||||
@define ('STORAGE_SERVER', 'localhost');
|
@define ('STORAGE_SERVER', 'localhost');
|
||||||
|
@ -62,13 +62,13 @@
|
||||||
@define ('SHOW_PRINTLINK', '1');
|
@define ('SHOW_PRINTLINK', '1');
|
||||||
// display or not percent of read in article view. Affects only default theme.
|
// display or not percent of read in article view. Affects only default theme.
|
||||||
@define ('SHOW_READPERCENT', '1');
|
@define ('SHOW_READPERCENT', '1');
|
||||||
@define ('ABS_PATH', 'assets/');
|
@define ('ABS_PATH', ROOT . '/app/assets/');
|
||||||
|
|
||||||
@define ('DEFAULT_THEME', 'baggy');
|
@define ('DEFAULT_THEME', 'baggy');
|
||||||
|
|
||||||
@define ('THEME', ROOT . '/themes');
|
@define ('THEME', ROOT . '/themes');
|
||||||
@define ('LOCALE', ROOT . '/locale');
|
@define ('LOCALE', ROOT . '/src/Wallabag/Wallabag/Resources/translations/locale');
|
||||||
@define ('CACHE', ROOT . '/cache');
|
@define ('CACHE', ROOT . '/app/cache');
|
||||||
|
|
||||||
@define ('PAGINATION', '12');
|
@define ('PAGINATION', '12');
|
||||||
|
|
25
app/config/global.inc.php
Executable file
25
app/config/global.inc.php
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* wallabag, self hostable application allowing you to not miss any content anymore
|
||||||
|
*
|
||||||
|
* @category wallabag
|
||||||
|
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||||
|
* @copyright 2013
|
||||||
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
|
*/
|
||||||
|
|
||||||
|
define('ROOT', dirname(__FILE__) . '/../..');
|
||||||
|
|
||||||
|
require_once ROOT . '/vendor/autoload.php';
|
||||||
|
|
||||||
|
# system configuration; database credentials et caetera
|
||||||
|
require_once dirname(__FILE__) . '/config.inc.php';
|
||||||
|
require_once dirname(__FILE__) . '/config.inc.default.php';
|
||||||
|
|
||||||
|
if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timezone'))) {
|
||||||
|
date_default_timezone_set('UTC');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (defined('ERROR_REPORTING')) {
|
||||||
|
error_reporting(ERROR_REPORTING);
|
||||||
|
}
|
0
assets/.gitignore → app/db/.gitignore
vendored
Executable file → Normal file
0
assets/.gitignore → app/db/.gitignore
vendored
Executable file → Normal file
BIN
app/db/poche.sqlite
Executable file
BIN
app/db/poche.sqlite
Executable file
Binary file not shown.
|
@ -1,12 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// Check if /cache is writeable
|
|
||||||
if (! is_writable('cache')) {
|
|
||||||
die('The directory "cache" must be writeable by your web server user');
|
|
||||||
}
|
|
||||||
|
|
||||||
// install folder still present, need to install wallabag
|
|
||||||
if (is_dir('install')) {
|
|
||||||
require('install/index.php');
|
|
||||||
exit;
|
|
||||||
}
|
|
|
@ -74,6 +74,9 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~3.7"
|
"phpunit/phpunit": "~3.7"
|
||||||
},
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": { "Wallabag\\Wallabag": "src/" }
|
||||||
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"bin-dir": "bin"
|
"bin-dir": "bin"
|
||||||
}
|
}
|
||||||
|
|
2
composer.lock
generated
2
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "93ca2016541bb1e9aaf52a82468ce04d",
|
"hash": "7915fd3c1343f447145fb167b0bb4d36",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "ezyang/htmlpurifier",
|
"name": "ezyang/htmlpurifier",
|
||||||
|
|
0
db/.gitignore
vendored
0
db/.gitignore
vendored
|
@ -1,43 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* wallabag, self hostable application allowing you to not miss any content anymore
|
|
||||||
*
|
|
||||||
* @category wallabag
|
|
||||||
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
|
||||||
* @copyright 2013
|
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
|
||||||
*/
|
|
||||||
|
|
||||||
# the poche system root directory (/inc)
|
|
||||||
define('INCLUDES', dirname(__FILE__) . '/..');
|
|
||||||
|
|
||||||
# the poche root directory
|
|
||||||
define('ROOT', INCLUDES . '/..');
|
|
||||||
|
|
||||||
require_once ROOT . '/vendor/autoload.php';
|
|
||||||
require_once INCLUDES . '/poche/Tools.class.php';
|
|
||||||
require_once INCLUDES . '/poche/User.class.php';
|
|
||||||
require_once INCLUDES . '/poche/Url.class.php';
|
|
||||||
require_once INCLUDES . '/poche/Template.class.php';
|
|
||||||
require_once INCLUDES . '/poche/Language.class.php';
|
|
||||||
require_once INCLUDES . '/poche/Routing.class.php';
|
|
||||||
require_once INCLUDES . '/poche/WallabagEBooks.class.php';
|
|
||||||
require_once INCLUDES . '/poche/Poche.class.php';
|
|
||||||
require_once INCLUDES . '/poche/Database.class.php';
|
|
||||||
require_once INCLUDES . '/poche/FlattrItem.class.php';
|
|
||||||
|
|
||||||
# system configuration; database credentials et caetera
|
|
||||||
require_once INCLUDES . '/poche/config.inc.php';
|
|
||||||
require_once INCLUDES . '/poche/config.inc.default.php';
|
|
||||||
|
|
||||||
if (DOWNLOAD_PICTURES) {
|
|
||||||
require_once INCLUDES . '/poche/pochePictures.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timezone'))) {
|
|
||||||
date_default_timezone_set('UTC');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defined('ERROR_REPORTING')) {
|
|
||||||
error_reporting(ERROR_REPORTING);
|
|
||||||
}
|
|
22
index.php
22
index.php
|
@ -1,22 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* wallabag, self hostable application allowing you to not miss any content anymore
|
|
||||||
*
|
|
||||||
* @category wallabag
|
|
||||||
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
|
||||||
* @copyright 2013
|
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
|
||||||
*/
|
|
||||||
|
|
||||||
define ('POCHE', '1.8.1');
|
|
||||||
require 'check_essentials.php';
|
|
||||||
require 'check_setup.php';
|
|
||||||
require_once 'inc/poche/global.inc.php';
|
|
||||||
|
|
||||||
// Start session
|
|
||||||
Session::$sessionName = 'wallabag';
|
|
||||||
Session::init();
|
|
||||||
|
|
||||||
// Let's rock !
|
|
||||||
$wallabag = new Poche();
|
|
||||||
$wallabag->run();
|
|
|
@ -1,2 +0,0 @@
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
27
migrations/20150119171459_init_database.php
Normal file
27
migrations/20150119171459_init_database.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
class InitDatabase extends AbstractMigration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Migrate Up.
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->execute("CREATE TABLE IF NOT EXISTS `montest` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) NOT NULL,
|
||||||
|
`value` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate Down.
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->execute("DROP DATABASE montest;");
|
||||||
|
}
|
||||||
|
}
|
17
phinx.yml
Normal file
17
phinx.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
paths:
|
||||||
|
migrations: %%PHINX_CONFIG_DIR%%/migrations
|
||||||
|
|
||||||
|
environments:
|
||||||
|
default_migration_table: phinxlog
|
||||||
|
default_database: development
|
||||||
|
production:
|
||||||
|
adapter: sqlite
|
||||||
|
name: db/poche
|
||||||
|
|
||||||
|
development:
|
||||||
|
adapter: sqlite
|
||||||
|
name: db/poche
|
||||||
|
|
||||||
|
testing:
|
||||||
|
adapter: sqlite
|
||||||
|
name: db/poche
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class Database {
|
class Database {
|
||||||
|
|
||||||
var $handle;
|
var $handle;
|
||||||
|
@ -25,7 +27,7 @@ class Database {
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
// Check if /db is writeable
|
// Check if /db is writeable
|
||||||
if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {
|
if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {
|
||||||
die('An error occured: "db" directory must be writeable for your web server user!');
|
die('An error occured: ' . STORAGE_SQLITE . ' directory must be writeable for your web server user!');
|
||||||
}
|
}
|
||||||
$db_path = 'sqlite:' . STORAGE_SQLITE;
|
$db_path = 'sqlite:' . STORAGE_SQLITE;
|
||||||
$this->handle = new PDO($db_path);
|
$this->handle = new PDO($db_path);
|
|
@ -8,7 +8,9 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WallabagEBooks
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
|
class Ebooks
|
||||||
{
|
{
|
||||||
protected $wallabag;
|
protected $wallabag;
|
||||||
protected $method;
|
protected $method;
|
||||||
|
@ -18,7 +20,7 @@ class WallabagEBooks
|
||||||
protected $bookFileName;
|
protected $bookFileName;
|
||||||
protected $author = 'wallabag';
|
protected $author = 'wallabag';
|
||||||
|
|
||||||
public function __construct(Poche $wallabag, $method, $value)
|
public function __construct(Wallabag $wallabag, $method, $value)
|
||||||
{
|
{
|
||||||
$this->wallabag = $wallabag;
|
$this->wallabag = $wallabag;
|
||||||
$this->method = $method;
|
$this->method = $method;
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class FlattrItem
|
class FlattrItem
|
||||||
{
|
{
|
||||||
public $status;
|
public $status;
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class Language
|
class Language
|
||||||
{
|
{
|
||||||
protected $wallabag;
|
protected $wallabag;
|
||||||
|
@ -30,7 +32,7 @@ class Language
|
||||||
'uk_UA.utf8' => 'Українська',
|
'uk_UA.utf8' => 'Українська',
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct(Poche $wallabag)
|
public function __construct(Wallabag $wallabag)
|
||||||
{
|
{
|
||||||
$this->wallabag = $wallabag;
|
$this->wallabag = $wallabag;
|
||||||
$pocheUser = Session::getParam('poche_user');
|
$pocheUser = Session::getParam('poche_user');
|
|
@ -8,6 +8,7 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
final class Picture
|
final class Picture
|
||||||
{
|
{
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class Routing
|
class Routing
|
||||||
{
|
{
|
||||||
protected $wallabag;
|
protected $wallabag;
|
||||||
|
@ -20,7 +22,7 @@ class Routing
|
||||||
protected $defaultVars = array();
|
protected $defaultVars = array();
|
||||||
protected $vars = array();
|
protected $vars = array();
|
||||||
|
|
||||||
public function __construct(Poche $wallabag)
|
public function __construct(Wallabag $wallabag)
|
||||||
{
|
{
|
||||||
$this->wallabag = $wallabag;
|
$this->wallabag = $wallabag;
|
||||||
$this->_init();
|
$this->_init();
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class Template extends Twig_Environment
|
class Template extends Twig_Environment
|
||||||
{
|
{
|
||||||
protected $wallabag;
|
protected $wallabag;
|
||||||
|
@ -15,7 +17,7 @@ class Template extends Twig_Environment
|
||||||
private $canRenderTemplates = TRUE;
|
private $canRenderTemplates = TRUE;
|
||||||
private $currentTheme = '';
|
private $currentTheme = '';
|
||||||
|
|
||||||
public function __construct(Poche $wallabag)
|
public function __construct(Wallabag $wallabag)
|
||||||
{
|
{
|
||||||
$this->wallabag = $wallabag;
|
$this->wallabag = $wallabag;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
final class Tools
|
final class Tools
|
||||||
{
|
{
|
||||||
/**
|
/**
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class Url
|
class Url
|
||||||
{
|
{
|
||||||
public $url;
|
public $url;
|
|
@ -8,6 +8,8 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
class User
|
class User
|
||||||
{
|
{
|
||||||
public $id;
|
public $id;
|
|
@ -8,7 +8,9 @@
|
||||||
* @license http://opensource.org/licenses/MIT see COPYING file
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Poche
|
namespace Wallabag\Wallabag;
|
||||||
|
|
||||||
|
class Wallabag
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var User
|
* @var User
|
|
@ -12,7 +12,7 @@ namespace wallabag\wallabag\Tests;
|
||||||
|
|
||||||
class EntryTest extends \PHPUnit_Framework_TestCase
|
class EntryTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testFoo()
|
public function testCreateUser()
|
||||||
{
|
{
|
||||||
$this->assertTrue(true);
|
$this->assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|
27
web/index.php
Normal file
27
web/index.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* wallabag, self hostable application allowing you to not miss any content anymore
|
||||||
|
*
|
||||||
|
* @category wallabag
|
||||||
|
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||||
|
* @copyright 2013
|
||||||
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
||||||
|
*/
|
||||||
|
|
||||||
|
define ('WALLABAG', '2.0.0-alpha');
|
||||||
|
|
||||||
|
require_once '../app/check_essentials.php';
|
||||||
|
require_once '../app/check_setup.php';
|
||||||
|
require_once '../app/config/global.inc.php';
|
||||||
|
|
||||||
|
// Check if /cache is writeable
|
||||||
|
if (! is_writable(CACHE)) {
|
||||||
|
die('The directory ' . CACHE . ' must be writeable by your web server user');
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::$sessionName = 'wallabag';
|
||||||
|
Session::init();
|
||||||
|
|
||||||
|
// Let's rock !
|
||||||
|
$wallabag = new Wallabag\Wallabag\Wallabag();
|
||||||
|
$wallabag->run();
|
Loading…
Reference in a new issue