diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85c11ecb..95a8b9b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
# PrivateBin version history
- * **next release (2016-08-25)**
+ * **1.0 (2016-08-25)**
* ADDED: Translations for Slowene and Chinese
* ADDED: re-introduced (optional) URL shortener support, which was removed back in version 0.16 for privacy concerns
* ADDED: Preview tab, helpful for writing markdown code or check the source code rendering
diff --git a/README.md b/README.md
index 2c17e5e3..d31c8808 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/094500f62abf4c9aa0c8a8a4520e4789)](https://www.codacy.com/app/PrivateBin/PrivateBin)
[![Test Coverage](https://codeclimate.com/github/PrivateBin/PrivateBin/badges/coverage.svg)](https://codeclimate.com/github/PrivateBin/PrivateBin/coverage) [![Code Coverage](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
-*Current version: 0.22*
+*Current version: 1.0*
**PrivateBin** is a minimalist, open source online pastebin where the server has
zero knowledge of pasted data.
diff --git a/css/bootstrap/privatebin.css b/css/bootstrap/privatebin.css
index 609de236..b26421b4 100644
--- a/css/bootstrap/privatebin.css
+++ b/css/bootstrap/privatebin.css
@@ -1,5 +1,13 @@
-/* PrivateBin 0.22 - https://github.com/PrivateBin/PrivateBin */
-
+/**
+ * PrivateBin
+ *
+ * a zero-knowledge paste bin
+ *
+ * @link https://github.com/PrivateBin/PrivateBin
+ * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
+ * @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
+ * @version 1.0
+ */
body {
padding: 0 0 30px;
diff --git a/css/privatebin.css b/css/privatebin.css
index ab3c6d07..5a6d80d6 100644
--- a/css/privatebin.css
+++ b/css/privatebin.css
@@ -1,5 +1,13 @@
-/* PrivateBin 0.22 - https://github.com/PrivateBin/PrivateBin */
-
+/**
+ * PrivateBin
+ *
+ * a zero-knowledge paste bin
+ *
+ * @link https://github.com/PrivateBin/PrivateBin
+ * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
+ * @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
+ * @version 1.0
+ */
/* CSS Reset from YUI 3.4.1 (build 4118) - Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License. - http://yuilibrary.com/license/ */
diff --git a/index.php b/index.php
index 14553f9a..2b3ceb37 100644
--- a/index.php
+++ b/index.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
// change this, if your php files and data is outside of your webservers document root
diff --git a/js/privatebin.js b/js/privatebin.js
index cc2e60c0..d461ed8e 100644
--- a/js/privatebin.js
+++ b/js/privatebin.js
@@ -6,7 +6,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
'use strict';
diff --git a/lib/Configuration.php b/lib/Configuration.php
index 2ca46b4f..1b6fcd16 100644
--- a/lib/Configuration.php
+++ b/lib/Configuration.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/Data/AbstractData.php b/lib/Data/AbstractData.php
index 77600f9b..1f9d3f8e 100644
--- a/lib/Data/AbstractData.php
+++ b/lib/Data/AbstractData.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Data;
diff --git a/lib/Data/Database.php b/lib/Data/Database.php
index 95fa47fe..385ee94a 100644
--- a/lib/Data/Database.php
+++ b/lib/Data/Database.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Data;
@@ -699,6 +699,13 @@ class Database extends AbstractData
'CREATE INDEX IF NOT EXISTS comment_parent ON ' .
self::_sanitizeIdentifier('comment') . '(pasteid);'
);
+ // no break, continue with updates for 0.22
+ case '0.22':
+ self::_exec(
+ 'UPDATE ' . self::_sanitizeIdentifier('config') .
+ ' SET value = ? WHERE id = ?',
+ array('1.0', 'VERSION')
+ );
}
}
}
diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php
index 3507ab68..7381dbdf 100644
--- a/lib/Data/Filesystem.php
+++ b/lib/Data/Filesystem.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Data;
diff --git a/lib/Filter.php b/lib/Filter.php
index 51106c64..9b1aece6 100644
--- a/lib/Filter.php
+++ b/lib/Filter.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/I18n.php b/lib/I18n.php
index 8b2ecad7..7be42ea9 100644
--- a/lib/I18n.php
+++ b/lib/I18n.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/Json.php b/lib/Json.php
index 023304de..2f269565 100644
--- a/lib/Json.php
+++ b/lib/Json.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/Model.php b/lib/Model.php
index 0a39f683..6e388e45 100644
--- a/lib/Model.php
+++ b/lib/Model.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/Model/AbstractModel.php b/lib/Model/AbstractModel.php
index 1fce05cf..1bd436f2 100644
--- a/lib/Model/AbstractModel.php
+++ b/lib/Model/AbstractModel.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Model;
diff --git a/lib/Model/Comment.php b/lib/Model/Comment.php
index 29dcfb86..1f4283f7 100644
--- a/lib/Model/Comment.php
+++ b/lib/Model/Comment.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Model;
diff --git a/lib/Model/Paste.php b/lib/Model/Paste.php
index ce401caa..97e6b97e 100644
--- a/lib/Model/Paste.php
+++ b/lib/Model/Paste.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Model;
diff --git a/lib/Persistence/AbstractPersistence.php b/lib/Persistence/AbstractPersistence.php
index ff908850..d4dcd6c2 100644
--- a/lib/Persistence/AbstractPersistence.php
+++ b/lib/Persistence/AbstractPersistence.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Persistence;
diff --git a/lib/Persistence/PurgeLimiter.php b/lib/Persistence/PurgeLimiter.php
index 1468a685..d65eb320 100644
--- a/lib/Persistence/PurgeLimiter.php
+++ b/lib/Persistence/PurgeLimiter.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Persistence;
diff --git a/lib/Persistence/ServerSalt.php b/lib/Persistence/ServerSalt.php
index 70cc264b..1aa50ec0 100644
--- a/lib/Persistence/ServerSalt.php
+++ b/lib/Persistence/ServerSalt.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Persistence;
diff --git a/lib/Persistence/TrafficLimiter.php b/lib/Persistence/TrafficLimiter.php
index 00a995c9..6c2ce42e 100644
--- a/lib/Persistence/TrafficLimiter.php
+++ b/lib/Persistence/TrafficLimiter.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin\Persistence;
diff --git a/lib/PrivateBin.php b/lib/PrivateBin.php
index 434f3dea..47f58b60 100644
--- a/lib/PrivateBin.php
+++ b/lib/PrivateBin.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
@@ -27,7 +27,7 @@ class PrivateBin
*
* @const string
*/
- const VERSION = '0.22';
+ const VERSION = '1.0';
/**
* show the same error message if the paste expired or does not exist
diff --git a/lib/Request.php b/lib/Request.php
index b589315d..03cd100e 100644
--- a/lib/Request.php
+++ b/lib/Request.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/Sjcl.php b/lib/Sjcl.php
index 5b62681b..1e4ca2c8 100644
--- a/lib/Sjcl.php
+++ b/lib/Sjcl.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/View.php b/lib/View.php
index c5f0ea2d..45d7b3a0 100644
--- a/lib/View.php
+++ b/lib/View.php
@@ -7,7 +7,7 @@
* @link https://github.com/PrivateBin/PrivateBin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.22
+ * @version 1.0
*/
namespace PrivateBin;
diff --git a/lib/Vizhash16x16.php b/lib/Vizhash16x16.php
index f88dfe98..5afca38a 100644
--- a/lib/Vizhash16x16.php
+++ b/lib/Vizhash16x16.php
@@ -8,7 +8,7 @@
* @link http://sebsauvage.net/wiki/doku.php?id=php:vizhash_gd
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
- * @version 0.0.4 beta PrivateBin 0.22
+ * @version 0.0.5 beta PrivateBin 1.0
*/
namespace PrivateBin;
@@ -18,7 +18,7 @@ namespace PrivateBin;
*
* Example:
* $vz = new Vizhash16x16();
- * $data = $vz->generate('hello');
+ * $data = $vz->generate(sha512('hello'));
* header('Content-type: image/png');
* echo $data;
* exit;
diff --git a/tpl/bootstrap-compact.php b/tpl/bootstrap-compact.php
index a79f78b8..025f35ed 100644
--- a/tpl/bootstrap-compact.php
+++ b/tpl/bootstrap-compact.php
@@ -51,7 +51,7 @@ if ($MARKDOWN):
-
+
diff --git a/tpl/bootstrap-dark-page.php b/tpl/bootstrap-dark-page.php
index 07002f14..5e4a5ee6 100644
--- a/tpl/bootstrap-dark-page.php
+++ b/tpl/bootstrap-dark-page.php
@@ -51,7 +51,7 @@ if ($MARKDOWN):
-
+
diff --git a/tpl/bootstrap-dark.php b/tpl/bootstrap-dark.php
index 8c838f76..c6709a35 100644
--- a/tpl/bootstrap-dark.php
+++ b/tpl/bootstrap-dark.php
@@ -51,7 +51,7 @@ if ($MARKDOWN):
-
+
diff --git a/tpl/bootstrap-page.php b/tpl/bootstrap-page.php
index 06ac7aa2..2687339d 100644
--- a/tpl/bootstrap-page.php
+++ b/tpl/bootstrap-page.php
@@ -51,7 +51,7 @@ if ($MARKDOWN):
-
+
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index 4382435d..4e3291e7 100644
--- a/tpl/bootstrap.php
+++ b/tpl/bootstrap.php
@@ -51,7 +51,7 @@ if ($MARKDOWN):
-
+
diff --git a/tpl/page.php b/tpl/page.php
index e027cb7b..bbfbf199 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -46,7 +46,7 @@ if ($MARKDOWN):
-
+
diff --git a/tst/Data/DatabaseTest.php b/tst/Data/DatabaseTest.php
index e92410ef..37865e5d 100644
--- a/tst/Data/DatabaseTest.php
+++ b/tst/Data/DatabaseTest.php
@@ -1,6 +1,7 @@
assertInstanceOf(Database::class, Database::getInstance($this->_options));
+
+ // check if version number was upgraded in created configuration table
+ $statement = $db->prepare('SELECT value FROM foo_config WHERE id LIKE ?');
+ $statement->execute(array('VERSION'));
+ $result = $statement->fetch(PDO::FETCH_ASSOC);
+ $statement->closeCursor();
+ $this->assertEquals(PrivateBin::VERSION, $result['value']);
Helper::rmDir($this->_path);
}
}