From 5f87ea68437374997fa6914548c0cee29d9c3ce7 Mon Sep 17 00:00:00 2001 From: Sebastien SAUVAGE Date: Sun, 24 Feb 2013 17:41:32 +0100 Subject: [PATCH] ZeroBin 0.18 (cherry picked from commit 7a8cbee2f99cd74a50bce7e8df8130e2c477d903) Conflicts: CHANGELOG.md index.php js/zerobin.js lib/vizhash16x16.php --- CHANGELOG.md | 14 +++++++++++++- README.md | 2 +- cfg/conf.ini | 2 +- css/zerobin.css | 2 +- index.php | 2 +- js/zerobin.js | 2 +- lib/auto.php | 2 +- lib/filter.php | 2 +- lib/persistence.php | 2 +- lib/serversalt.php | 8 ++++---- lib/sjcl.php | 2 +- lib/trafficlimiter.php | 2 +- lib/vizhash16x16.php | 2 +- lib/zerobin.php | 4 ++-- lib/zerobin/abstract.php | 2 +- lib/zerobin/data.php | 2 +- lib/zerobin/db.php | 6 +++--- 17 files changed, 35 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01020eb3..5b445c64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,5 +50,17 @@ * small refactoring. * improved regex checks. * larger server alt on installation. - + * **Alpha 0.18 (2013-02-24)**: + * ADDED: The resulting URL is automatically selected after pressing "Send". You just have to press CTRL+C. + * ADDED: Automatic syntax highlighting for 53 languages using highlight.js + * ADDED: "5 minutes" and "1 week" expirations. + * ADDED: "Raw text" button. + * jQuery upgraded to 1.9.1 + * sjcl upgraded to GitHub master 2013-02-23 + * base64.js upgraded to 1.7 + * FIXED: Dates in discussion are now proper local dates. + * ADDED: Robot meta tags in HTML to prevent search engines indexing. + * ADDED: Better json checking (including entropy). + * ADDED: Added version to js/css assets URLs in order to prevent some abusive caches to serve an obsolete version of these files when ZeroBin is upgraded. + * "Burn after reading" option has been moved out of Expiration combo to a separate checkbox. Reason is: You can prevent a read-once paste to be available ad vitam eternam on the net. diff --git a/README.md b/README.md index 5b4fd701..3a1617c1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -ZeroBin 0.17 Alpha +ZeroBin 0.18 Alpha ==== THIS IS ALPHA SOFTWARE - USE AT YOUR OWN RISKS ==== diff --git a/cfg/conf.ini b/cfg/conf.ini index e997b23a..ef7a178a 100644 --- a/cfg/conf.ini +++ b/cfg/conf.ini @@ -5,7 +5,7 @@ ; @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin ; @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) ; @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License -; @version 0.17 +; @version 0.18 [main] ; enable or disable discussions diff --git a/css/zerobin.css b/css/zerobin.css index d2ea8043..1dff3185 100644 --- a/css/zerobin.css +++ b/css/zerobin.css @@ -1,4 +1,4 @@ -/* ZeroBin 0.17 - http://sebsauvage.net/wiki/doku.php?id=php:zerobin */ +/* ZeroBin 0.18 - http://sebsauvage.net/wiki/doku.php?id=php:zerobin */ /* CSS Reset from YUI 3.4.1 (build 4118) - Copyright 2011 Yahoo! Inc. All rights reserved. diff --git a/index.php b/index.php index 7e662e33..a2b8e083 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.17 + * @version 0.18 */ // change this, if your php files and data is outside of your webservers document root diff --git a/js/zerobin.js b/js/zerobin.js index cb699b66..bcd86fdb 100644 --- a/js/zerobin.js +++ b/js/zerobin.js @@ -6,7 +6,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.17 + * @version 0.18 */ // Immediately start random number generator collector. diff --git a/lib/auto.php b/lib/auto.php index ac3f169a..42ae9e64 100644 --- a/lib/auto.php +++ b/lib/auto.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.15 + * @version 0.18 */ spl_autoload_register('auto::loader'); diff --git a/lib/filter.php b/lib/filter.php index 68c4f590..5380f7e7 100644 --- a/lib/filter.php +++ b/lib/filter.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.15 + * @version 0.18 */ /** diff --git a/lib/persistence.php b/lib/persistence.php index 58faadfc..44483f76 100644 --- a/lib/persistence.php +++ b/lib/persistence.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.17 + * @version 0.18 */ /** diff --git a/lib/serversalt.php b/lib/serversalt.php index caa7e95a..28b81697 100644 --- a/lib/serversalt.php +++ b/lib/serversalt.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.17 + * @version 0.18 */ /** @@ -59,10 +59,10 @@ class serversalt extends persistence $file = 'salt.php'; if (!self::_exists($file)) { - self::_store( + self::_store( $file, - '' - ); + '' + ); } $items = explode('|', file_get_contents(self::getPath($file))); self::$_salt = $items[1]; diff --git a/lib/sjcl.php b/lib/sjcl.php index a5130815..139e91d5 100644 --- a/lib/sjcl.php +++ b/lib/sjcl.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.15 + * @version 0.18 */ /** diff --git a/lib/trafficlimiter.php b/lib/trafficlimiter.php index 9dd4a44f..7d9b18eb 100644 --- a/lib/trafficlimiter.php +++ b/lib/trafficlimiter.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.17 + * @version 0.18 */ /** diff --git a/lib/vizhash16x16.php b/lib/vizhash16x16.php index 128091c9..b7145a49 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 http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.0.4 beta ZeroBin 0.17 + * @version 0.0.4 beta ZeroBin 0.18 */ /** diff --git a/lib/zerobin.php b/lib/zerobin.php index 3c260cfe..821ff749 100644 --- a/lib/zerobin.php +++ b/lib/zerobin.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.17 + * @version 0.18 */ /** @@ -20,7 +20,7 @@ class zerobin /* * @const string version */ - const VERSION = 'Alpha 0.17'; + const VERSION = 'Alpha 0.18'; /** * @access private diff --git a/lib/zerobin/abstract.php b/lib/zerobin/abstract.php index 234fb7f5..9bf2fdcb 100644 --- a/lib/zerobin/abstract.php +++ b/lib/zerobin/abstract.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.15 + * @version 0.18 */ /** diff --git a/lib/zerobin/data.php b/lib/zerobin/data.php index a9e42dbc..6b3195b3 100644 --- a/lib/zerobin/data.php +++ b/lib/zerobin/data.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.15 + * @version 0.18 */ /** diff --git a/lib/zerobin/db.php b/lib/zerobin/db.php index 714dbd87..21b5d66f 100644 --- a/lib/zerobin/db.php +++ b/lib/zerobin/db.php @@ -7,7 +7,7 @@ * @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin * @copyright 2012 Sébastien SAUVAGE (sebsauvage.net) * @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License - * @version 0.15 + * @version 0.18 */ /** @@ -175,8 +175,8 @@ class zerobin_db extends zerobin_abstract */ public function create($pasteid, $paste) { - if ( - array_key_exists($pasteid, self::$_cache) + if ( + array_key_exists($pasteid, self::$_cache) ) { if(false !== self::$_cache[$pasteid]) { return false;