.DS_Store
-assets/*
-cache/*
+.vagrant
+app/assets/*
+app/cache/*
vendor
composer.phar
db/poche.sqlite
-inc/poche/config.inc.php
-inc/3rdparty/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer/
-.vagrant
\ No newline at end of file
+app/config/config.inc.php
\ No newline at end of file
--- /dev/null
+<?php
+
+
+
+// install folder still present, need to install wallabag
+// if (is_dir('install')) {
+// require('install/index.php');
+// exit;
+// }
\ No newline at end of file
@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
@define ('STORAGE_SERVER', 'localhost');
@define ('SHOW_PRINTLINK', '1');
// display or not percent of read in article view. Affects only default theme.
@define ('SHOW_READPERCENT', '1');
-@define ('ABS_PATH', 'assets/');
+@define ('ABS_PATH', ROOT . '/app/assets/');
@define ('DEFAULT_THEME', 'baggy');
@define ('THEME', ROOT . '/themes');
-@define ('LOCALE', ROOT . '/locale');
-@define ('CACHE', ROOT . '/cache');
+@define ('LOCALE', ROOT . '/src/Wallabag/Wallabag/Resources/translations/locale');
+@define ('CACHE', ROOT . '/app/cache');
@define ('PAGINATION', '12');
--- /dev/null
+<?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);
+}
\ No newline at end of file
+++ /dev/null
-<?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;
-}
\ No newline at end of file
"require-dev": {
"phpunit/phpunit": "~3.7"
},
+ "autoload": {
+ "psr-0": { "Wallabag\\Wallabag": "src/" }
+ },
"config": {
"bin-dir": "bin"
}
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "93ca2016541bb1e9aaf52a82468ce04d",
+ "hash": "7915fd3c1343f447145fb167b0bb4d36",
"packages": [
{
"name": "ezyang/htmlpurifier",
+++ /dev/null
-<?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);
-}
\ No newline at end of file
+++ /dev/null
-<?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();
+++ /dev/null
-Order deny,allow
-Deny from all
--- /dev/null
+<?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;");
+ }
+}
\ No newline at end of file
--- /dev/null
+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
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class Database {
var $handle;
case 'sqlite':
// Check if /db is writeable
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;
$this->handle = new PDO($db_path);
* @license http://opensource.org/licenses/MIT see COPYING file
*/
-class WallabagEBooks
+namespace Wallabag\Wallabag;
+
+class Ebooks
{
protected $wallabag;
protected $method;
protected $bookFileName;
protected $author = 'wallabag';
- public function __construct(Poche $wallabag, $method, $value)
+ public function __construct(Wallabag $wallabag, $method, $value)
{
$this->wallabag = $wallabag;
$this->method = $method;
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class FlattrItem
{
public $status;
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class Language
{
protected $wallabag;
'uk_UA.utf8' => 'Українська',
);
- public function __construct(Poche $wallabag)
+ public function __construct(Wallabag $wallabag)
{
$this->wallabag = $wallabag;
$pocheUser = Session::getParam('poche_user');
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
final class Picture
{
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class Routing
{
protected $wallabag;
protected $defaultVars = array();
protected $vars = array();
- public function __construct(Poche $wallabag)
+ public function __construct(Wallabag $wallabag)
{
$this->wallabag = $wallabag;
$this->_init();
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class Template extends Twig_Environment
{
protected $wallabag;
private $canRenderTemplates = TRUE;
private $currentTheme = '';
- public function __construct(Poche $wallabag)
+ public function __construct(Wallabag $wallabag)
{
$this->wallabag = $wallabag;
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
final class Tools
{
/**
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class Url
{
public $url;
* @license http://opensource.org/licenses/MIT see COPYING file
*/
+namespace Wallabag\Wallabag;
+
class User
{
public $id;
* @license http://opensource.org/licenses/MIT see COPYING file
*/
-class Poche
+namespace Wallabag\Wallabag;
+
+class Wallabag
{
/**
* @var User
class EntryTest extends \PHPUnit_Framework_TestCase
{
- public function testFoo()
+ public function testCreateUser()
{
$this->assertTrue(true);
}
--- /dev/null
+<?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();
\ No newline at end of file