aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/update.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-23 22:43:16 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-23 22:43:16 +0200
commit679b6b85ad1f8c9110334101a1568510ad15891b (patch)
tree1b633e36232604ffbf7d87c94f1a990c0d787652 /install/update.php
parent6d7defc87cd6ce40910b66472168e3d86c362164 (diff)
downloadwallabag-679b6b85ad1f8c9110334101a1568510ad15891b.tar.gz
wallabag-679b6b85ad1f8c9110334101a1568510ad15891b.tar.zst
wallabag-679b6b85ad1f8c9110334101a1568510ad15891b.zip
preparing to beta4
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php71
1 files changed, 71 insertions, 0 deletions
diff --git a/install/update.php b/install/update.php
new file mode 100644
index 00000000..ccc0566f
--- /dev/null
+++ b/install/update.php
@@ -0,0 +1,71 @@
1<?php
2require_once dirname(__FILE__).'/../inc/poche/Tools.class.php';
3include dirname(__FILE__).'/../inc/poche/define.inc.php';
4include dirname(__FILE__).'/../inc/poche/myconfig.inc.php';
5require_once __DIR__ . '/../inc/poche/Database.class.php';
6$store = new Database();
7?>
8<!DOCTYPE html>
9<!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]-->
10<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
11<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
12<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
13<html>
14 <head>
15 <meta charset="utf-8">
16 <title>updating poche</title>
17 </head>
18 <body>
19 <h1>update poche to 1.0-beta4</h1>
20
21 <h2>Changelog</h2>
22 <ul>
23 <li>this awesome updating step</li>
24 <li>error message when install folder exists</li>
25 <li>more tests before installation (write access, etc.)</li>
26 <li>updated README to make installation easier</li>
27 <li>german language thanks to HLFH</li>
28 <li>spanish language thanks to Nitche</li>
29 <li>new file ./inc/poche/myconfig.inc.php created to store language and salt</li>
30 <li><a href="https://github.com/inthepoche/poche/issues/119">#119</a>: salt is now created when installing poche</li>
31 <li><a href="https://github.com/inthepoche/poche/issues/130">#130</a>: robots.txt added</li>
32 <li><a href="https://github.com/inthepoche/poche/issues/136">#136</a>: error during readability import</li>
33 <li><a href="https://github.com/inthepoche/poche/issues/137">#137</a>: mixed content alert in https</li>
34 <li><a href="https://github.com/inthepoche/poche/issues/138">#138</a>: change pattern to parse url with #</li>
35 </ul>
36 <p>To update your poche, please fill the following fields.</p>
37 <p>
38 <form name="update" method="post">
39 <div><label for="login">login:</label> <input type="text" name="login" id="login" /></div>
40 <div><label for="password">password:</label> <input type="password" name="password" id="password" /></div>
41 <div><input type="hidden" name="go" value="ok" /><input type="submit" value="update" /></div>
42 </form>
43 </p>
44<?php
45if (isset($_POST['go'])) {
46 if (!empty($_POST['login']) && !empty($_POST['password'])) {
47 $user = $store->login($_POST['login'], sha1($_POST['password'] . $_POST['login'] . SALT));
48 if ($user != array()) {
49 $myconfig_file = '../inc/poche/myconfig.inc.php';
50 # just change version number in config file
51
52 if (!is_writable('../inc/poche/myconfig.inc.php')) {
53 die('You don\'t have write access to open ./inc/poche/myconfig.inc.php.');
54 }
55
56 if (file_exists($myconfig_file))
57 {
58 $content = str_replace('1.0-beta3', '1.0-beta4', file_get_contents($myconfig_file));
59 file_put_contents($myconfig_file, $content);
60 }
61?>
62 <p><span style="color: green;">your poche is up to date!</span></p>
63 <p><span style="color: red;">don't forget to delete ./install/ folder after the update.</span></p>
64 <p><a href="../">go back to your poche</a></p>
65<?php
66 }
67 }
68}
69?>
70 </body>
71</html> \ No newline at end of file