From e925833090bebf235b7563e8210cfaaf9512c8ac Mon Sep 17 00:00:00 2001 From: El RIDO Date: Thu, 25 Aug 2016 09:53:31 +0200 Subject: [PATCH] bumping version number to 1.0 --- CHANGELOG.md | 2 +- README.md | 2 +- css/bootstrap/privatebin.css | 12 ++++++++++-- css/privatebin.css | 12 ++++++++++-- index.php | 2 +- js/privatebin.js | 2 +- lib/Configuration.php | 2 +- lib/Data/AbstractData.php | 2 +- lib/Data/Database.php | 9 ++++++++- lib/Data/Filesystem.php | 2 +- lib/Filter.php | 2 +- lib/I18n.php | 2 +- lib/Json.php | 2 +- lib/Model.php | 2 +- lib/Model/AbstractModel.php | 2 +- lib/Model/Comment.php | 2 +- lib/Model/Paste.php | 2 +- lib/Persistence/AbstractPersistence.php | 2 +- lib/Persistence/PurgeLimiter.php | 2 +- lib/Persistence/ServerSalt.php | 2 +- lib/Persistence/TrafficLimiter.php | 2 +- lib/PrivateBin.php | 4 ++-- lib/Request.php | 2 +- lib/Sjcl.php | 2 +- lib/View.php | 2 +- lib/Vizhash16x16.php | 4 ++-- tpl/bootstrap-compact.php | 2 +- tpl/bootstrap-dark-page.php | 2 +- tpl/bootstrap-dark.php | 2 +- tpl/bootstrap-page.php | 2 +- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- tst/Data/DatabaseTest.php | 8 ++++++++ 33 files changed, 67 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c11ec..95a8b9b 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 2c17e5e..d31c880 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 609de23..b26421b 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 ab3c6d0..5a6d80d 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 14553f9..2b3ceb3 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 cc2e60c..d461ed8 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 2ca46b4..1b6fcd1 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 77600f9..1f9d3f8 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 95fa47f..385ee94 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 3507ab6..7381dbd 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 51106c6..9b1aece 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 8b2ecad..7be42ea 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 023304d..2f26956 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 0a39f68..6e388e4 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 1fce05c..1bd436f 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 29dcfb8..1f4283f 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 ce401ca..97e6b97 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 ff90885..d4dcd6c 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 1468a68..d65eb32 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 70cc264..1aa50ec 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 00a995c..6c2ce42 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 434f3de..47f58b6 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 b589315..03cd100 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 5b62681..1e4ca2c 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 c5f0ea2..45d7b3a 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 f88dfe9..5afca38 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 a79f78b..025f35e 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 07002f1..5e4a5ee 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 8c838f7..c6709a3 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 06ac7aa..2687339 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 4382435..4e3291e 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 e027cb7..bbfbf19 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 e92410e..37865e5 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); } }