]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
resolve conflicts
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Fri, 23 Aug 2013 21:18:36 +0000 (23:18 +0200)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Fri, 23 Aug 2013 21:18:36 +0000 (23:18 +0200)
13 files changed:
.travis.yml [deleted file]
COPYING.md [moved from COPYING with 100% similarity]
CREDITS.md [moved from CREDITS with 100% similarity]
TODO.md
inc/poche/Poche.class.php
inc/poche/Tools.class.php
install/poche.sqlite
install/update.php
install/update_to_1beta3.php [new file with mode: 0644]
phpunit.xml.dist [deleted file]
tpl/config.twig
tpl/error.twig
tpl/layout.twig

diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index 9d6ba13..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-language: php
-
-php:
-  - 5.4
-
-branches:
-  only:
-    - dev
-
-before_script:
-  - composer install
-
-notifications:
-  email:
-    - nicolas.loeuillet@gmail.com
\ No newline at end of file
similarity index 100%
rename from COPYING
rename to COPYING.md
similarity index 100%
rename from CREDITS
rename to CREDITS.md
diff --git a/TODO.md b/TODO.md
index ac3c0e9889932d9668d038b0020b2aa15b3ad04a..fdba2a514cec5e6ad2fa59d3fb89cc32d38e13d5 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -1,11 +1,9 @@
 # TODO
 
-pouvoir annuler la suppression
-conventions codage ? phing ? vérifier error_log qui trainent
-phpDocumentor
-minifier css 
-revoir tous les css
-barre fixe d'admin sur la page d'un billet ? 
-revoir export (export vers pocket &cie ? )
-raccourcis clavier 
-date d'ajout d'un lien
\ No newline at end of file
+* pouvoir annuler la suppression
+* conventions codage ? phing ? vérifier error_log qui trainent
+* phpDocumentor
+* minifier css 
+* barre fixe d'admin sur la page d'un billet ? 
+* revoir export (export vers pocket &cie ? )
+* raccourcis clavier 
\ No newline at end of file
index e0dc0d201daa27532d7aee8c82cfdf00812874a8..4832f81683c5b320aa0c2ae0aa4129b9d1e47f04 100644 (file)
@@ -47,16 +47,16 @@ class Poche
             die('You don\'t have write access on cache directory.');
         }
         else if (file_exists('./install/update.php') && !DEBUG_POCHE) {
-            $msg = 'A poche update is needed. Please execute this update <a href="install/update.php">by clicking here</a>. If you have already do the update, please delete /install folder.';
+            $msg = '<h1>setup</h1><p><strong>It\'s your first time here?</strong> Please copy /install/poche.sqlite in db folder. Then, delete install folder.<br /><strong>If you have already installed poche</strong>, an update is needed <a href="install/update.php">by clicking here</a>.</p>';
             $allIsGood = FALSE;
         }
         else if (file_exists('./install') && !DEBUG_POCHE) {
-            $msg = 'If you want to update your poche, you just have to delete /install folder. <br />To install your poche with sqlite, copy /install/poche.sqlite in /db and delete the folder /install. you have to delete the /install folder before using poche.';
+            $msg = '<h1>setup</h1><p><strong>If you want to update your poche</strong>, you just have to delete /install folder. <br /><strong>To install your poche with sqlite</strong>, copy /install/poche.sqlite in /db and delete the folder /install. you have to delete the /install folder before using poche.</p>';
             $allIsGood = FALSE;
         }
         else if (STORAGE == 'sqlite' && !is_writable(STORAGE_SQLITE)) {
             Tools::logm('you don\'t have write access on sqlite file');
-            $msg = 'You don\'t have write access on sqlite file.';
+            $msg = '<h1>error</h1><p>You don\'t have write access on sqlite file.</p>';
             $allIsGood = FALSE;
         }
         
index 52d0f2d5c7cfb90f19eba95f1c995d5b184b3967..8661ab6e60fa76a4b718c43c273d3b199bed9290 100644 (file)
@@ -238,7 +238,7 @@ class Tools
     public static function createMyConfig()
     {
         $myconfig_file = './inc/poche/myconfig.inc.php';
-        
+
         if (!is_writable('./inc/poche/')) {
             self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php');
             die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.');
@@ -248,7 +248,7 @@ class Tools
         {
             $fp = fopen($myconfig_file, 'w');
             fwrite($fp, '<?php'."\r\n");
-            fwrite($fp, "define ('POCHE_VERSION', '1.0-beta3');" . "\r\n");
+            fwrite($fp, "define ('POCHE_VERSION', '1.0-beta4');" . "\r\n");
             fwrite($fp, "define ('SALT', '" . md5(time() . $_SERVER['SCRIPT_FILENAME'] . rand()) . "');" . "\r\n");
             fwrite($fp, "define ('LANG', 'en_EN.utf8');" . "\r\n");
             fclose($fp);
index c268223db11c597b2102164aade2e2aeb6aa9030..7abf1f62ddbed441a90d283e9236a9bb3011ae84 100755 (executable)
Binary files a/install/poche.sqlite and b/install/poche.sqlite differ
index 8c93af6d2e1ad7718c8aeb27a9711e21408b157a..ccc0566f2c5e05adf6dbef4ec36d907ac0c09c54 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 require_once dirname(__FILE__).'/../inc/poche/Tools.class.php';
 include dirname(__FILE__).'/../inc/poche/define.inc.php';
+include dirname(__FILE__).'/../inc/poche/myconfig.inc.php';
 require_once __DIR__ . '/../inc/poche/Database.class.php';
 $store = new Database();
-$old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
 ?>
 <!DOCTYPE html>
 <!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]-->
@@ -16,25 +16,23 @@ $old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
         <title>updating poche</title>
     </head>
     <body>
-        <h1>update poche to 1.0-beta3</h1>
+        <h1>update poche to 1.0-beta4</h1>
 
         <h2>Changelog</h2>
-        <p>
-            <ul>
-                <li>this awesome updating step</li>
-                <li>error message when install folder exists</li>
-                <li>more tests before installation (write access, etc.)</li>
-                <li>updated README to make installation easier</li>
-                <li>german language thanks to HLFH</li>
-                <li>spanish language thanks to Nitche</li>
-                <li>new file ./inc/poche/myconfig.inc.php created to store language and salt</li>
-                <li><a href="https://github.com/inthepoche/poche/issues/119">#119</a>: salt is now created when installing poche</li>
-                <li><a href="https://github.com/inthepoche/poche/issues/130">#130</a>: robots.txt added</li>
-                <li><a href="https://github.com/inthepoche/poche/issues/136">#136</a>: error during readability import</li>
-                <li><a href="https://github.com/inthepoche/poche/issues/137">#137</a>: mixed content alert in https</li>
-                <li><a href="https://github.com/inthepoche/poche/issues/138">#138</a>: change pattern to parse url with #</li>
-            </ul>
-        </p>
+        <ul>
+            <li>this awesome updating step</li>
+            <li>error message when install folder exists</li>
+            <li>more tests before installation (write access, etc.)</li>
+            <li>updated README to make installation easier</li>
+            <li>german language thanks to HLFH</li>
+            <li>spanish language thanks to Nitche</li>
+            <li>new file ./inc/poche/myconfig.inc.php created to store language and salt</li>
+            <li><a href="https://github.com/inthepoche/poche/issues/119">#119</a>: salt is now created when installing poche</li>
+            <li><a href="https://github.com/inthepoche/poche/issues/130">#130</a>: robots.txt added</li>
+            <li><a href="https://github.com/inthepoche/poche/issues/136">#136</a>: error during readability import</li>
+            <li><a href="https://github.com/inthepoche/poche/issues/137">#137</a>: mixed content alert in https</li>
+            <li><a href="https://github.com/inthepoche/poche/issues/138">#138</a>: change pattern to parse url with #</li>
+        </ul>
         <p>To update your poche, please fill the following fields.</p>
         <p>
         <form name="update" method="post">
@@ -46,26 +44,20 @@ $old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
 <?php
 if (isset($_POST['go'])) {
     if (!empty($_POST['login']) && !empty($_POST['password'])) {
-        $user = $store->login($_POST['login'], sha1($_POST['password'] . $_POST['login'] . $old_salt));
+        $user = $store->login($_POST['login'], sha1($_POST['password'] . $_POST['login'] . SALT));
         if ($user != array()) {
-            $new_salt = md5(time() . $_SERVER['SCRIPT_FILENAME'] . rand());
             $myconfig_file = '../inc/poche/myconfig.inc.php';
-            if (!is_writable('../inc/poche/')) {
-                die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.');
+            # just change version number in config file
+            
+            if (!is_writable('../inc/poche/myconfig.inc.php')) {
+                die('You don\'t have write access to open ./inc/poche/myconfig.inc.php.');
             }
 
-            if (!file_exists($myconfig_file))
+            if (file_exists($myconfig_file))
             {
-                $fp = fopen($myconfig_file, 'w');
-                
-                fwrite($fp, '<?php'."\r\n");
-                fwrite($fp, "define ('POCHE_VERSION', '1.0-beta3');" . "\r\n");
-                fwrite($fp, "define ('SALT', '" . $new_salt . "');" . "\r\n");
-                fwrite($fp, "define ('LANG', 'en_EN.utf8');" . "\r\n");
-                fclose($fp);
+                $content = str_replace('1.0-beta3', '1.0-beta4', file_get_contents($myconfig_file));
+                file_put_contents($myconfig_file, $content);
             }
-            # faire une mise à jour de la table users en prenant en compte le nouveau SALT généré
-            $store->updatePassword($user['id'], sha1($_POST['password'] . $_POST['login'] . $new_salt));
 ?>
         <p><span style="color: green;">your poche is up to date!</span></p>
         <p><span style="color: red;">don't forget to delete ./install/ folder after the update.</span></p>
diff --git a/install/update_to_1beta3.php b/install/update_to_1beta3.php
new file mode 100644 (file)
index 0000000..8c93af6
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+require_once dirname(__FILE__).'/../inc/poche/Tools.class.php';
+include dirname(__FILE__).'/../inc/poche/define.inc.php';
+require_once __DIR__ . '/../inc/poche/Database.class.php';
+$store = new Database();
+$old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
+?>
+<!DOCTYPE html>
+<!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]-->
+<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
+<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>updating poche</title>
+    </head>
+    <body>
+        <h1>update poche to 1.0-beta3</h1>
+
+        <h2>Changelog</h2>
+        <p>
+            <ul>
+                <li>this awesome updating step</li>
+                <li>error message when install folder exists</li>
+                <li>more tests before installation (write access, etc.)</li>
+                <li>updated README to make installation easier</li>
+                <li>german language thanks to HLFH</li>
+                <li>spanish language thanks to Nitche</li>
+                <li>new file ./inc/poche/myconfig.inc.php created to store language and salt</li>
+                <li><a href="https://github.com/inthepoche/poche/issues/119">#119</a>: salt is now created when installing poche</li>
+                <li><a href="https://github.com/inthepoche/poche/issues/130">#130</a>: robots.txt added</li>
+                <li><a href="https://github.com/inthepoche/poche/issues/136">#136</a>: error during readability import</li>
+                <li><a href="https://github.com/inthepoche/poche/issues/137">#137</a>: mixed content alert in https</li>
+                <li><a href="https://github.com/inthepoche/poche/issues/138">#138</a>: change pattern to parse url with #</li>
+            </ul>
+        </p>
+        <p>To update your poche, please fill the following fields.</p>
+        <p>
+        <form name="update" method="post">
+            <div><label for="login">login:</label> <input type="text" name="login" id="login" /></div>
+            <div><label for="password">password:</label> <input type="password" name="password" id="password" /></div>
+            <div><input type="hidden" name="go" value="ok" /><input type="submit" value="update" /></div>
+        </form>
+        </p>
+<?php
+if (isset($_POST['go'])) {
+    if (!empty($_POST['login']) && !empty($_POST['password'])) {
+        $user = $store->login($_POST['login'], sha1($_POST['password'] . $_POST['login'] . $old_salt));
+        if ($user != array()) {
+            $new_salt = md5(time() . $_SERVER['SCRIPT_FILENAME'] . rand());
+            $myconfig_file = '../inc/poche/myconfig.inc.php';
+            if (!is_writable('../inc/poche/')) {
+                die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.');
+            }
+
+            if (!file_exists($myconfig_file))
+            {
+                $fp = fopen($myconfig_file, 'w');
+                
+                fwrite($fp, '<?php'."\r\n");
+                fwrite($fp, "define ('POCHE_VERSION', '1.0-beta3');" . "\r\n");
+                fwrite($fp, "define ('SALT', '" . $new_salt . "');" . "\r\n");
+                fwrite($fp, "define ('LANG', 'en_EN.utf8');" . "\r\n");
+                fclose($fp);
+            }
+            # faire une mise à jour de la table users en prenant en compte le nouveau SALT généré
+            $store->updatePassword($user['id'], sha1($_POST['password'] . $_POST['login'] . $new_salt));
+?>
+        <p><span style="color: green;">your poche is up to date!</span></p>
+        <p><span style="color: red;">don't forget to delete ./install/ folder after the update.</span></p>
+        <p><a href="../">go back to your poche</a></p>
+<?php
+        }
+    }
+}
+?>
+    </body>
+</html>
\ No newline at end of file
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
deleted file mode 100644 (file)
index e69de29..0000000
index 0b2311870f666a4fb92996ffd4093bdbc3a33b1c..e8563721060efe81bcea7bf02e204d1e30231cfc 100644 (file)
 {% block content %}
             <h2>{% trans "Poching a link" %}</h2>
             <p>You can poche a link by several methods: (<a href="http://www.inthepoche.com/?pages/Documentation" title="{% trans "read the documentation" %}">?</a>)</p>
-                       <ul>
-                               <li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">download the extension</a></li>
-                               <li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">download the extension</a></li>
-                               <li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">download the application</a></li>
-                               <li>bookmarklet: drag & drop this link to your bookmarks bar <a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white; padding: 5px;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></li>
-                       </ul>
+            <ul>
+                <li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">download the extension</a></li>
+                <li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">download the extension</a></li>
+                <li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">download the application</a></li>
+                <li>bookmarklet: drag & drop this link to your bookmarks bar <a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white; padding: 5px;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></li>
+            </ul>
 
             <h2>{% trans "Updating poche" %}</h2>
             <ul>
@@ -50,9 +50,9 @@
             <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p>
             <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p>
             <ul>
-                               <li><a href="./?import&amp;from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li>
-                               <li><a href="./?import&amp;from=readability">{% trans "import from Readability" %}</a>  (you must have a "readability" file on your server)</li>
-                               <li><a href="./?import&amp;from=instapaper">{% trans "import from Instapaper" %}</a>  (you must have a "instapaper-export.html" file on your server)</li>
+                <li><a href="./?import&amp;from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li>
+                <li><a href="./?import&amp;from=readability">{% trans "import from Readability" %}</a>  (you must have a "readability" file on your server)</li>
+                <li><a href="./?import&amp;from=instapaper">{% trans "import from Instapaper" %}</a>  (you must have a "instapaper-export.html" file on your server)</li>
             </ul>
 
             <h2>{% trans "Export your poche datas" %}</h2>
index 84c3bc1c2aa8b5174e601a1e18c9488ee1f7db88..14c499254419a5a230a495a314a74ac501dcdebd 100644 (file)
@@ -1,7 +1,6 @@
 {% extends "layout.twig" %}
-{% block title %}{% trans "error" %}{% endblock %}
+{% block title %}{% trans "plop" %}{% endblock %}
 {% block content %}
-    <h1>error</h1>
-        <p>{{ msg|raw }}</p>
+        {{ msg|raw }}
         <p>Don't forget <a href="http://inthepoche.com/?pages/Documentation">the documentation</a>.</p>
 {% endblock %}
\ No newline at end of file
index 7084a21548764eab5a65b0a1f34bce8fa67a5bd0..07ca231c004135b8ef3012cc9dd883e6515ad9c3 100644 (file)
@@ -7,7 +7,9 @@
     <head>
         <meta name="viewport" content="initial-scale=1.0">
         <meta charset="utf-8">
+        <!--[if IE]>
         <meta http-equiv="X-UA-Compatible" content="IE=10">
+        <![endif]-->
         <title>{% block title %}{% endblock %} - poche</title>
 {% include '_head.twig' %}
 {% include '_bookmarklet.twig' %}