]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
new folders
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 20 Jan 2015 06:40:39 +0000 (07:40 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 20 Jan 2015 06:40:39 +0000 (07:40 +0100)
61 files changed:
.gitignore
TRANSLATION.md [changed mode: 0755->0644]
app/cache/.gitignore [moved from cache/.gitignore with 100% similarity]
app/cache/.htaccess [moved from cache/.htaccess with 100% similarity]
app/check_essentials.php [moved from check_essentials.php with 100% similarity]
app/check_setup.php [new file with mode: 0755]
app/config/config.inc.default.php [moved from inc/poche/config.inc.default.php with 89% similarity]
app/config/global.inc.php [new file with mode: 0755]
app/db/.gitignore [moved from assets/.gitignore with 100% similarity, mode: 0644]
app/db/.htaccess [moved from db/.htaccess with 100% similarity]
app/db/poche.sqlite [new file with mode: 0755]
check_setup.php [deleted file]
composer.json
composer.lock
db/.gitignore [deleted file]
inc/poche/global.inc.php [deleted file]
index.php [deleted file]
locale/.htaccess [deleted file]
migrations/20150119171459_init_database.php [new file with mode: 0644]
phinx.yml [new file with mode: 0644]
src/Wallabag/Wallabag/Database.php [moved from inc/poche/Database.class.php with 99% similarity]
src/Wallabag/Wallabag/Ebooks.php [moved from inc/poche/WallabagEBooks.class.php with 99% similarity]
src/Wallabag/Wallabag/FlattrItem.php [moved from inc/poche/FlattrItem.class.php with 98% similarity]
src/Wallabag/Wallabag/Language.php [moved from inc/poche/Language.class.php with 97% similarity]
src/Wallabag/Wallabag/Picture.php [moved from inc/poche/pochePictures.php with 99% similarity]
src/Wallabag/Wallabag/Resources/translations/cs_CZ.utf8/LC_MESSAGES/cs_CZ.utf8.mo [moved from locale/cs_CZ.utf8/LC_MESSAGES/cs_CZ.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/cs_CZ.utf8/LC_MESSAGES/cs_CZ.utf8.po [moved from locale/cs_CZ.utf8/LC_MESSAGES/cs_CZ.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/de_DE.utf8/LC_MESSAGES/de_DE.utf8.mo [moved from locale/de_DE.utf8/LC_MESSAGES/de_DE.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/de_DE.utf8/LC_MESSAGES/de_DE.utf8.po [moved from locale/de_DE.utf8/LC_MESSAGES/de_DE.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo [moved from locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po [moved from locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/en_US.utf8/LC_MESSAGES/en_US.utf8.mo [moved from locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/en_US.utf8/LC_MESSAGES/en_US.utf8.po [moved from locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/es_ES.utf8/LC_MESSAGES/es_ES.utf8.mo [moved from locale/es_ES.utf8/LC_MESSAGES/es_ES.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/es_ES.utf8/LC_MESSAGES/es_ES.utf8.po [moved from locale/es_ES.utf8/LC_MESSAGES/es_ES.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/fa_IR.utf8/LC_MESSAGES/fa_IR.utf8.mo [moved from locale/fa_IR.utf8/LC_MESSAGES/fa_IR.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/fa_IR.utf8/LC_MESSAGES/fa_IR.utf8.po [moved from locale/fa_IR.utf8/LC_MESSAGES/fa_IR.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo [moved from locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po [moved from locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/it_IT.utf8/LC_MESSAGES/it_IT.utf8.mo [moved from locale/it_IT.utf8/LC_MESSAGES/it_IT.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/it_IT.utf8/LC_MESSAGES/it_IT.utf8.po [moved from locale/it_IT.utf8/LC_MESSAGES/it_IT.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo [moved from locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po [moved from locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/pt_BR.utf8/LC_MESSAGES/pt_BR.utf8.mo [moved from locale/pt_BR.utf8/LC_MESSAGES/pt_BR.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/pt_BR.utf8/LC_MESSAGES/pt_BR.utf8.po [moved from locale/pt_BR.utf8/LC_MESSAGES/pt_BR.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/ru_RU.utf8/LC_MESSAGES/ru_RU.utf8.mo [moved from locale/ru_RU.utf8/LC_MESSAGES/ru_RU.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/ru_RU.utf8/LC_MESSAGES/ru_RU.utf8.po [moved from locale/ru_RU.utf8/LC_MESSAGES/ru_RU.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/sl_SI.utf8/LC_MESSAGES/sl_SI.utf8.mo [moved from locale/sl_SI.utf8/LC_MESSAGES/sl_SI.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/sl_SI.utf8/LC_MESSAGES/sl_SI.utf8.po [moved from locale/sl_SI.utf8/LC_MESSAGES/sl_SI.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/tools/fillCache.php [moved from locale/tools/fillCache.php with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/uk_UA.utf8/LC_MESSAGES/uk_UA.utf8.mo [moved from locale/uk_UA.utf8/LC_MESSAGES/uk_UA.utf8.mo with 100% similarity]
src/Wallabag/Wallabag/Resources/translations/uk_UA.utf8/LC_MESSAGES/uk_UA.utf8.po [moved from locale/uk_UA.utf8/LC_MESSAGES/uk_UA.utf8.po with 100% similarity]
src/Wallabag/Wallabag/Routing.php [moved from inc/poche/Routing.class.php with 98% similarity]
src/Wallabag/Wallabag/Template.php [moved from inc/poche/Template.class.php with 98% similarity]
src/Wallabag/Wallabag/Tools.php [moved from inc/poche/Tools.class.php with 99% similarity]
src/Wallabag/Wallabag/Url.php [moved from inc/poche/Url.class.php with 95% similarity]
src/Wallabag/Wallabag/User.php [moved from inc/poche/User.class.php with 97% similarity]
src/Wallabag/Wallabag/Wallabag.php [moved from inc/poche/Poche.class.php with 99% similarity]
tests/Wallabag/Wallabag/Tests/EntryTest.php
web/index.php [new file with mode: 0644]
web/robots.txt [moved from robots.txt with 100% similarity]

index 5b34c79f4dc3750b68a1c757c61f6ee80702579a..e4979f3182f65a3140332e30f8a290485b0ae327 100644 (file)
@@ -1,9 +1,8 @@
 .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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from cache/.gitignore
rename to app/cache/.gitignore
similarity index 100%
rename from cache/.htaccess
rename to app/cache/.htaccess
diff --git a/app/check_setup.php b/app/check_setup.php
new file mode 100755 (executable)
index 0000000..57495f2
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+
+
+
+// install folder still present, need to install wallabag
+// if (is_dir('install')) {
+//     require('install/index.php');
+//     exit;
+// }
\ No newline at end of file
similarity index 89%
rename from inc/poche/config.inc.default.php
rename to app/config/config.inc.default.php
index a159e713c700deb013e21a3507d1c258d2635755..09095235d113e7508f85c859b3b41e01da9335f8 100755 (executable)
@@ -13,7 +13,7 @@
 
 @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');
 
diff --git a/app/config/global.inc.php b/app/config/global.inc.php
new file mode 100755 (executable)
index 0000000..4df68ea
--- /dev/null
@@ -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);
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from assets/.gitignore
rename to app/db/.gitignore
similarity index 100%
rename from db/.htaccess
rename to app/db/.htaccess
diff --git a/app/db/poche.sqlite b/app/db/poche.sqlite
new file mode 100755 (executable)
index 0000000..3d1a8e4
Binary files /dev/null and b/app/db/poche.sqlite differ
diff --git a/check_setup.php b/check_setup.php
deleted file mode 100755 (executable)
index cf02c34..0000000
+++ /dev/null
@@ -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;
-}
\ No newline at end of file
index fd4231b9492081c93b5137f8c2ac193b38bbf50a..a1dee4108e4b5d6ee9abb164206df48848164404 100644 (file)
@@ -74,6 +74,9 @@
     "require-dev": {
         "phpunit/phpunit": "~3.7"
     },
+    "autoload": {
+        "psr-0": { "Wallabag\\Wallabag": "src/" }
+    },
     "config": {
         "bin-dir": "bin"
     }
index 8275066f834d63152ac28f693f4cee8085434693..9888e4c4204678e07d03352e014aaa240bcfec02 100644 (file)
@@ -4,7 +4,7 @@
         "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",
diff --git a/db/.gitignore b/db/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php
deleted file mode 100755 (executable)
index ff7ebf6..0000000
+++ /dev/null
@@ -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);
-}
\ No newline at end of file
diff --git a/index.php b/index.php
deleted file mode 100755 (executable)
index adfef71..0000000
--- a/index.php
+++ /dev/null
@@ -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();
diff --git a/locale/.htaccess b/locale/.htaccess
deleted file mode 100644 (file)
index 93169e4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Order deny,allow
-Deny from all
diff --git a/migrations/20150119171459_init_database.php b/migrations/20150119171459_init_database.php
new file mode 100644 (file)
index 0000000..48a7d4b
--- /dev/null
@@ -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;");
+    }
+}
\ No newline at end of file
diff --git a/phinx.yml b/phinx.yml
new file mode 100644 (file)
index 0000000..f6c6300
--- /dev/null
+++ b/phinx.yml
@@ -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
similarity index 99%
rename from inc/poche/Database.class.php
rename to src/Wallabag/Wallabag/Database.php
index f6ba47089e8b1cb5b5a87d08787cf0b30397aefc..afda69de56e2cd0ffb87b8f3c647c30915b12050 100755 (executable)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class Database {
 
     var $handle;
@@ -25,7 +27,7 @@ class Database {
             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);
similarity index 99%
rename from inc/poche/WallabagEBooks.class.php
rename to src/Wallabag/Wallabag/Ebooks.php
index a9c62af936f3f2f6ece13925ce86ade91df22241..2ad89a1cbe22af8d699ca2318af82eb0d52a6270 100644 (file)
@@ -8,7 +8,9 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
-class WallabagEBooks
+namespace Wallabag\Wallabag;
+
+class Ebooks
 {
        protected $wallabag;
     protected $method;
@@ -18,7 +20,7 @@ class WallabagEBooks
     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;
similarity index 98%
rename from inc/poche/FlattrItem.class.php
rename to src/Wallabag/Wallabag/FlattrItem.php
index ef8c62f7f5606a8f72e2bedd05a5658580c23836..17eccd3fae03e67d70605f14893c3c2b4c7d7024 100644 (file)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class FlattrItem
 {
     public $status;
similarity index 97%
rename from inc/poche/Language.class.php
rename to src/Wallabag/Wallabag/Language.php
index 420f2fb9c2db9ae39888495f43be7bc2d78b69a8..434118176903c8f47385d56f2ac9d169392712b8 100644 (file)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class Language
 {
     protected $wallabag;
@@ -30,7 +32,7 @@ class Language
         'uk_UA.utf8' => 'Українська',
     );
 
-    public function __construct(Poche $wallabag)
+    public function __construct(Wallabag $wallabag)
     {
         $this->wallabag = $wallabag;
         $pocheUser = Session::getParam('poche_user');
similarity index 99%
rename from inc/poche/pochePictures.php
rename to src/Wallabag/Wallabag/Picture.php
index 52394c703b1130fb73bbd9aa8807f17b89a574a0..8a9cd764b4f9594b3bdf3970d40a1dfdce449fa1 100644 (file)
@@ -8,6 +8,7 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
 
 final class Picture
 {
similarity index 98%
rename from inc/poche/Routing.class.php
rename to src/Wallabag/Wallabag/Routing.php
index be06a433dce544c17a72c5d015a4b0f083348fe6..85b6af1e1bb9e2646197469adf2035de53303cb2 100755 (executable)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class Routing
 {
     protected $wallabag;
@@ -20,7 +22,7 @@ class Routing
     protected $defaultVars = array();
     protected $vars = array();
 
-    public function __construct(Poche $wallabag)
+    public function __construct(Wallabag $wallabag)
     {
         $this->wallabag = $wallabag;
         $this->_init();
similarity index 98%
rename from inc/poche/Template.class.php
rename to src/Wallabag/Wallabag/Template.php
index 4d0bfdbb13161c4a6c8b3a625bfd58bbfa1bd157..e8a6daa3b636091e8657dd2323c2744136b48e18 100644 (file)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class Template extends Twig_Environment
 {
     protected $wallabag;
@@ -15,7 +17,7 @@ class Template extends Twig_Environment
     private $canRenderTemplates = TRUE;
     private $currentTheme = '';
 
-    public function __construct(Poche $wallabag)
+    public function __construct(Wallabag $wallabag)
     {
         $this->wallabag = $wallabag;
 
similarity index 99%
rename from inc/poche/Tools.class.php
rename to src/Wallabag/Wallabag/Tools.php
index d625fc400ca528672dfae4f6ac268ea2f3f76901..19d98614a16ba97a58645f691ae7a27c48179de6 100755 (executable)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 final class Tools
 {
     /**
similarity index 95%
rename from inc/poche/Url.class.php
rename to src/Wallabag/Wallabag/Url.php
index d9172b7d0730d9eb6c075dcabbefe19bf3ddd69d..b18fe3d43bbfe3d78318611ec1eff038a2616b88 100644 (file)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class Url
 {
     public $url;
similarity index 97%
rename from inc/poche/User.class.php
rename to src/Wallabag/Wallabag/User.php
index eaadd3e5bcc7ed343c4617f62a3663e456a0d0bf..4a10c2edc1639e3422f3251c153e8fdd89af88c7 100644 (file)
@@ -8,6 +8,8 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
+namespace Wallabag\Wallabag;
+
 class User
 {
     public $id;
similarity index 99%
rename from inc/poche/Poche.class.php
rename to src/Wallabag/Wallabag/Wallabag.php
index 8b0d3a19fad82d1a828772a82d88e591a98689f1..c172a95d1b4ea92d6ba566775e17acba6cb5a743 100755 (executable)
@@ -8,7 +8,9 @@
  * @license    http://opensource.org/licenses/MIT see COPYING file
  */
 
-class Poche
+namespace Wallabag\Wallabag;
+
+class Wallabag
 {
     /**
      * @var User
index 2c3bf2fcbdde6694091a3cc8ee7b394f49c34ee5..dfff9fd4fbeb316cccd36df98a63299049465113 100644 (file)
@@ -12,7 +12,7 @@ namespace wallabag\wallabag\Tests;
 
 class EntryTest extends \PHPUnit_Framework_TestCase
 {
-    public function testFoo()
+    public function testCreateUser()
     {
         $this->assertTrue(true);
     }
diff --git a/web/index.php b/web/index.php
new file mode 100644 (file)
index 0000000..0535572
--- /dev/null
@@ -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();
\ No newline at end of file
similarity index 100%
rename from robots.txt
rename to web/robots.txt