renaming the fork to PrivateBin
This commit is contained in:
parent
6a663ba07f
commit
79509ad48a
@ -33,10 +33,10 @@
|
|||||||
* for simpler maintenance the functions were grouped into objects: zerobin (display logic, event handling), filter (compression,
|
* for simpler maintenance the functions were grouped into objects: zerobin (display logic, event handling), filter (compression,
|
||||||
encryption), i18n (translation, counterpart of i18n.php) and helper (stateless utilities)
|
encryption), i18n (translation, counterpart of i18n.php) and helper (stateless utilities)
|
||||||
* Wiki pages were added to address common topics:
|
* Wiki pages were added to address common topics:
|
||||||
* [Upgrading from ZeroBin 0.19 Alpha](https://github.com/elrido/ZeroBin/wiki/Upgrading-from-ZeroBin-0.19-Alpha)
|
* [Upgrading from ZeroBin 0.19 Alpha](https://github.com/PrivateBin/PrivateBin/wiki/Upgrading-from-ZeroBin-0.19-Alpha)
|
||||||
* [ZeroBin Directory of public servers](https://github.com/elrido/ZeroBin/wiki/ZeroBin-Directory)
|
* [Directory of public PrivateBin servers](https://github.com/PrivateBin/PrivateBin/wiki/PrivateBin-Directory)
|
||||||
* [Translation](https://github.com/elrido/ZeroBin/wiki/Translation)
|
* [Translation](https://github.com/PrivateBin/PrivateBin/wiki/Translation)
|
||||||
* [Templates](https://github.com/elrido/ZeroBin/wiki/Templates)
|
* [Templates](https://github.com/PrivateBin/PrivateBin/wiki/Templates)
|
||||||
* **0.20 (2015-09-03)**:
|
* **0.20 (2015-09-03)**:
|
||||||
* ADDED: Password protected pastes (optional)
|
* ADDED: Password protected pastes (optional)
|
||||||
* ADDED: configuration options for highlighting, password, discussions, expiration times, rate limiting
|
* ADDED: configuration options for highlighting, password, discussions, expiration times, rate limiting
|
||||||
|
@ -53,7 +53,7 @@ languageselection = false
|
|||||||
; the pastes encryption key
|
; the pastes encryption key
|
||||||
; urlshortener = "https://shortener.example.com/api?link="
|
; urlshortener = "https://shortener.example.com/api?link="
|
||||||
|
|
||||||
; stay compatible with ZeroBin Alpha 0.19, less secure
|
; stay compatible with PrivateBin Alpha 0.19, less secure
|
||||||
; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
|
; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
|
||||||
; sha256 in HMAC for the deletion token
|
; sha256 in HMAC for the deletion token
|
||||||
zerobincompatibility = false
|
zerobincompatibility = false
|
||||||
@ -100,24 +100,24 @@ dir = PATH "data"
|
|||||||
|
|
||||||
[model]
|
[model]
|
||||||
; name of data model class to load and directory for storage
|
; name of data model class to load and directory for storage
|
||||||
; the default model "zerobin_data" stores everything in the filesystem
|
; the default model "privatebin_data" stores everything in the filesystem
|
||||||
class = zerobin_data
|
class = privatebin_data
|
||||||
[model_options]
|
[model_options]
|
||||||
dir = PATH "data"
|
dir = PATH "data"
|
||||||
|
|
||||||
;[model]
|
;[model]
|
||||||
; example of DB configuration for MySQL
|
; example of DB configuration for MySQL
|
||||||
;class = zerobin_db
|
;class = privatebin_db
|
||||||
;[model_options]
|
;[model_options]
|
||||||
;dsn = "mysql:host=localhost;dbname=zerobin;charset=UTF8"
|
;dsn = "mysql:host=localhost;dbname=privatebin;charset=UTF8"
|
||||||
;tbl = "zerobin_" ; table prefix
|
;tbl = "privatebin_" ; table prefix
|
||||||
;usr = "zerobin"
|
;usr = "privatebin"
|
||||||
;pwd = "Z3r0P4ss"
|
;pwd = "Z3r0P4ss"
|
||||||
;opt[12] = true ; PDO::ATTR_PERSISTENT
|
;opt[12] = true ; PDO::ATTR_PERSISTENT
|
||||||
|
|
||||||
;[model]
|
;[model]
|
||||||
; example of DB configuration for SQLite
|
; example of DB configuration for SQLite
|
||||||
;class = zerobin_db
|
;class = privatebin_db
|
||||||
;[model_options]
|
;[model_options]
|
||||||
;dsn = "sqlite:" PATH "data/db.sq3"
|
;dsn = "sqlite:" PATH "data/db.sq3"
|
||||||
;usr = null
|
;usr = null
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* ZeroBin 0.22 - http://sebsauvage.net/wiki/doku.php?id=php:zerobin */
|
/* PrivateBin 0.22 - https://github.com/PrivateBin/PrivateBin */
|
||||||
|
|
||||||
|
|
||||||
body {
|
body {
|
@ -1,4 +1,4 @@
|
|||||||
/* ZeroBin 0.22 - http://sebsauvage.net/wiki/doku.php?id=php:zerobin */
|
/* PrivateBin 0.22 - https://github.com/PrivateBin/PrivateBin */
|
||||||
|
|
||||||
|
|
||||||
/* CSS Reset from YUI 3.4.1 (build 4118) - Copyright 2011 Yahoo! Inc. All rights reserved.
|
/* CSS Reset from YUI 3.4.1 (build 4118) - Copyright 2011 Yahoo! Inc. All rights reserved.
|
@ -18,6 +18,6 @@ $ sudo pear install phpdoc/phpDocumentor
|
|||||||
|
|
||||||
To generate the documentation, change into the main directory and run phpdoc:
|
To generate the documentation, change into the main directory and run phpdoc:
|
||||||
```console
|
```console
|
||||||
$ cd ZeroBin
|
$ cd PrivateBin
|
||||||
$ phpdoc -d lib/ -t doc/
|
$ phpdoc -d lib/ -t doc/
|
||||||
```
|
```
|
||||||
|
22
i18n/de.json
22
i18n/de.json
@ -2,10 +2,10 @@
|
|||||||
"en": "de",
|
"en": "de",
|
||||||
"Paste does not exist, has expired or has been deleted.":
|
"Paste does not exist, has expired or has been deleted.":
|
||||||
"Diesen Text gibt es nicht, er ist abgelaufen oder wurde gelöscht.",
|
"Diesen Text gibt es nicht, er ist abgelaufen oder wurde gelöscht.",
|
||||||
"ZeroBin requires php 5.2.6 or above to work. Sorry.":
|
"PrivateBin requires php 5.2.6 or above to work. Sorry.":
|
||||||
"ZeroBin benötigt PHP 5.2.6 oder höher, um zu funktionieren. Sorry.",
|
"PrivateBin benötigt PHP 5.2.6 oder höher, um zu funktionieren. Sorry.",
|
||||||
"ZeroBin requires configuration section [%s] to be present in configuration file.":
|
"PrivateBin requires configuration section [%s] to be present in configuration file.":
|
||||||
"ZeroBin benötigt den Konfigurationsabschnitt [%s] in der Konfigurationsdatei um zu funktionieren.",
|
"PrivateBin benötigt den Konfigurationsabschnitt [%s] in der Konfigurationsdatei um zu funktionieren.",
|
||||||
"Please wait %d seconds between each post.":
|
"Please wait %d seconds between each post.":
|
||||||
"Bitte warte %d Sekunden zwischen dem Absenden.",
|
"Bitte warte %d Sekunden zwischen dem Absenden.",
|
||||||
"Paste is limited to %s of encrypted data.":
|
"Paste is limited to %s of encrypted data.":
|
||||||
@ -26,15 +26,15 @@
|
|||||||
"Falscher Lösch-Code. Text wurde nicht gelöscht.",
|
"Falscher Lösch-Code. Text wurde nicht gelöscht.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Text wurde erfolgreich gelöscht.",
|
"Text wurde erfolgreich gelöscht.",
|
||||||
"ZeroBin": "ZeroBin",
|
"PrivateBin": "PrivateBin",
|
||||||
"ZeroBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/ZeroBin/wiki\">project page</a>.":
|
"PrivateBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/PrivateBin/wiki\">project page</a>.":
|
||||||
"ZeroBin ist ein minimalistischer, quelloffener \"Pastebin\"-artiger Dienst, bei dem der Server keinerlei Kenntnis der Inhalte hat. Die Daten werden <i>im Browser</i> mit 256 Bit AES ver- und entschlüsselt. Weitere Informationen sind auf der <a href=\"https://github.com/elrido/ZeroBin/wiki\">Projektseite</a> zu finden.",
|
"PrivateBin ist ein minimalistischer, quelloffener \"Pastebin\"-artiger Dienst, bei dem der Server keinerlei Kenntnis der Inhalte hat. Die Daten werden <i>im Browser</i> mit 256 Bit AES ver- und entschlüsselt. Weitere Informationen sind auf der <a href=\"https://github.com/elrido/PrivateBin/wiki\">Projektseite</a> zu finden.",
|
||||||
"Because ignorance is bliss":
|
"Because ignorance is bliss":
|
||||||
"Unwissenheit ist ein Segen",
|
"Unwissenheit ist ein Segen",
|
||||||
"Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.":
|
"Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.":
|
||||||
"Javascript ist eine Voraussetzung, um ZeroBin zu nutzen.<br />Bitte entschuldige die Unannehmlichkeiten.",
|
"Javascript ist eine Voraussetzung, um PrivateBin zu nutzen.<br />Bitte entschuldige die Unannehmlichkeiten.",
|
||||||
"ZeroBin requires a modern browser to work.":
|
"PrivateBin requires a modern browser to work.":
|
||||||
"ZeroBin setzt einen modernen Browser voraus, um funktionieren zu können.",
|
"PrivateBin setzt einen modernen Browser voraus, um funktionieren zu können.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
"Du benutzt immer noch den Internet Explorer? Tu Dir einen Gefallen und wechsle zu einem moderneren Browser:",
|
"Du benutzt immer noch den Internet Explorer? Tu Dir einen Gefallen und wechsle zu einem moderneren Browser:",
|
||||||
"New":
|
"New":
|
||||||
|
22
i18n/fr.json
22
i18n/fr.json
@ -2,10 +2,10 @@
|
|||||||
"en": "fr",
|
"en": "fr",
|
||||||
"Paste does not exist, has expired or has been deleted.":
|
"Paste does not exist, has expired or has been deleted.":
|
||||||
"Le paste n'existe pas, a expiré, ou a été supprimé.",
|
"Le paste n'existe pas, a expiré, ou a été supprimé.",
|
||||||
"ZeroBin requires php 5.2.6 or above to work. Sorry.":
|
"PrivateBin requires php 5.2.6 or above to work. Sorry.":
|
||||||
"Désolé, ZeroBin nécessite php 5.2.6 ou supérieur pour fonctionner.",
|
"Désolé, PrivateBin nécessite php 5.2.6 ou supérieur pour fonctionner.",
|
||||||
"ZeroBin requires configuration section [%s] to be present in configuration file.":
|
"PrivateBin requires configuration section [%s] to be present in configuration file.":
|
||||||
"ZeroBin a besoin de la section de configuration [%s] dans le fichier de configuration pour fonctionner.",
|
"PrivateBin a besoin de la section de configuration [%s] dans le fichier de configuration pour fonctionner.",
|
||||||
"Please wait %d seconds between each post.":
|
"Please wait %d seconds between each post.":
|
||||||
"Merci d'attendre %d secondes entre chaque publication.",
|
"Merci d'attendre %d secondes entre chaque publication.",
|
||||||
"Paste is limited to %s of encrypted data.":
|
"Paste is limited to %s of encrypted data.":
|
||||||
@ -26,15 +26,15 @@
|
|||||||
"Jeton de suppression incorrect. Le paste n'a pas été supprimé.",
|
"Jeton de suppression incorrect. Le paste n'a pas été supprimé.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Le paste a été correctement supprimé.",
|
"Le paste a été correctement supprimé.",
|
||||||
"ZeroBin": "ZeroBin",
|
"PrivateBin": "PrivateBin",
|
||||||
"ZeroBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/ZeroBin/wiki\">project page</a>.":
|
"PrivateBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/PrivateBin/wiki\">project page</a>.":
|
||||||
"Zerobin est un 'pastebin' (ou gestionnaire d'extraits de texte et de code source) minimaliste et open source, dans lequel le serveur n'a aucune connaissance des données envoyées. Les données sont chiffrées/déchiffrées <i>dans le navigateur</i> par un chiffrage AES 256 bits. Plus d'informations sur <a href=\"https://github.com/elrido/ZeroBin/wiki\">la page du projet</a>.",
|
"PrivateBin est un 'pastebin' (ou gestionnaire d'extraits de texte et de code source) minimaliste et open source, dans lequel le serveur n'a aucune connaissance des données envoyées. Les données sont chiffrées/déchiffrées <i>dans le navigateur</i> par un chiffrage AES 256 bits. Plus d'informations sur <a href=\"https://github.com/elrido/PrivateBin/wiki\">la page du projet</a>.",
|
||||||
"Because ignorance is bliss":
|
"Because ignorance is bliss":
|
||||||
"Parce que l'ignorance est le bonheur",
|
"Parce que l'ignorance est le bonheur",
|
||||||
"Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.":
|
"Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.":
|
||||||
"Javascript est requis pour faire fonctionner ZeroBin. <br />Désolé pour cet inconvénient.",
|
"Javascript est requis pour faire fonctionner PrivateBin. <br />Désolé pour cet inconvénient.",
|
||||||
"ZeroBin requires a modern browser to work.":
|
"PrivateBin requires a modern browser to work.":
|
||||||
"ZeroBin nécessite un navigateur moderne pour fonctionner.",
|
"PrivateBin nécessite un navigateur moderne pour fonctionner.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
"Encore sur Internet Explorer ? Faites-vous une faveur, passez à un navigateur moderne :",
|
"Encore sur Internet Explorer ? Faites-vous une faveur, passez à un navigateur moderne :",
|
||||||
"New":
|
"New":
|
||||||
|
22
i18n/pl.json
22
i18n/pl.json
@ -2,10 +2,10 @@
|
|||||||
"en": "pl",
|
"en": "pl",
|
||||||
"Paste does not exist, has expired or has been deleted.":
|
"Paste does not exist, has expired or has been deleted.":
|
||||||
"Wklejka nie istnieje, wygasła albo została usunięta.",
|
"Wklejka nie istnieje, wygasła albo została usunięta.",
|
||||||
"ZeroBin requires php 5.2.6 or above to work. Sorry.":
|
"PrivateBin requires php 5.2.6 or above to work. Sorry.":
|
||||||
"ZeroBin wymaga PHP w wersji 5.2.6 lub nowszej, sorry.",
|
"PrivateBin wymaga PHP w wersji 5.2.6 lub nowszej, sorry.",
|
||||||
"ZeroBin requires configuration section [%s] to be present in configuration file.":
|
"PrivateBin requires configuration section [%s] to be present in configuration file.":
|
||||||
"ZeroBin wymaga obecności sekcji [%s] w pliku konfiguracyjnym.",
|
"PrivateBin wymaga obecności sekcji [%s] w pliku konfiguracyjnym.",
|
||||||
"Please wait %d seconds between each post.":
|
"Please wait %d seconds between each post.":
|
||||||
"Poczekaj %d sekund pomiędzy każdą wklejką.",
|
"Poczekaj %d sekund pomiędzy każdą wklejką.",
|
||||||
"Paste is limited to %s of encrypted data.":
|
"Paste is limited to %s of encrypted data.":
|
||||||
@ -26,15 +26,15 @@
|
|||||||
"Nieprawidłowy token usuwania. Wklejka nie została usunięta.",
|
"Nieprawidłowy token usuwania. Wklejka nie została usunięta.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Wklejka usunięta poprawnie.",
|
"Wklejka usunięta poprawnie.",
|
||||||
"ZeroBin": "ZeroBin",
|
"PrivateBin": "PrivateBin",
|
||||||
"ZeroBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/ZeroBin/wiki\">project page</a>.":
|
"PrivateBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/PrivateBin/wiki\">project page</a>.":
|
||||||
"ZeroBin jest minimalistycznym, otwartoźródłowym serwisem typu pastebin, w którym serwer nie ma jakichkolwiek informacji o tym, co jest wklejane. Dane są szyfrowane i deszyfrowane <i>w przeglądarce</i> z użyciem 256-bitowego klucza AES. Więcej informacji na <a href=\"https://github.com/elrido/ZeroBin/wiki\">stronie projektu</a>.",
|
"PrivateBin jest minimalistycznym, otwartoźródłowym serwisem typu pastebin, w którym serwer nie ma jakichkolwiek informacji o tym, co jest wklejane. Dane są szyfrowane i deszyfrowane <i>w przeglądarce</i> z użyciem 256-bitowego klucza AES. Więcej informacji na <a href=\"https://github.com/elrido/PrivateBin/wiki\">stronie projektu</a>.",
|
||||||
"Because ignorance is bliss":
|
"Because ignorance is bliss":
|
||||||
"Ponieważ ignorancja jest cnotą",
|
"Ponieważ ignorancja jest cnotą",
|
||||||
"Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.":
|
"Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.":
|
||||||
"Do działania ZeroBina jest wymagany JavaScript. Przepraszamy za tę niedogodność.",
|
"Do działania PrivateBina jest wymagany JavaScript. Przepraszamy za tę niedogodność.",
|
||||||
"ZeroBin requires a modern browser to work.":
|
"PrivateBin requires a modern browser to work.":
|
||||||
"ZeroBin wymaga do działania nowoczesnej przeglądarki.",
|
"PrivateBin wymaga do działania nowoczesnej przeglądarki.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
"Cały czas używasz Internet Explorera? Zrób sobie przysługę, przesiądź się na nowoczesną przeglądarkę:",
|
"Cały czas używasz Internet Explorera? Zrób sobie przysługę, przesiądź się na nowoczesną przeglądarkę:",
|
||||||
"New":
|
"New":
|
||||||
|
22
i18n/sl.json
22
i18n/sl.json
@ -2,10 +2,10 @@
|
|||||||
"en": "sl",
|
"en": "sl",
|
||||||
"Paste does not exist, has expired or has been deleted.":
|
"Paste does not exist, has expired or has been deleted.":
|
||||||
"Prilepek ne obstaja, mu je potekla življenjska doba, ali pa je izbrisan.",
|
"Prilepek ne obstaja, mu je potekla življenjska doba, ali pa je izbrisan.",
|
||||||
"ZeroBin requires php 5.2.6 or above to work. Sorry.":
|
"PrivateBin requires php 5.2.6 or above to work. Sorry.":
|
||||||
"Oprosti, ZeroBin za delovanje potrebuje vsaj php 5.2.6.",
|
"Oprosti, PrivateBin za delovanje potrebuje vsaj php 5.2.6.",
|
||||||
"ZeroBin requires configuration section [%s] to be present in configuration file.":
|
"PrivateBin requires configuration section [%s] to be present in configuration file.":
|
||||||
"ZeroBin potrebuje sekcijo konfiguracij [%s] v konfiguracijski datoteki.",
|
"PrivateBin potrebuje sekcijo konfiguracij [%s] v konfiguracijski datoteki.",
|
||||||
"Please wait %d seconds between each post.":
|
"Please wait %d seconds between each post.":
|
||||||
"Prosim počakaj vsaj %d sekund pred vsako naslednjo objavo.",
|
"Prosim počakaj vsaj %d sekund pred vsako naslednjo objavo.",
|
||||||
"Paste is limited to %s of encrypted data.":
|
"Paste is limited to %s of encrypted data.":
|
||||||
@ -26,15 +26,15 @@
|
|||||||
"Napačen token za izbris. Prilepek ni bil izbrisan..",
|
"Napačen token za izbris. Prilepek ni bil izbrisan..",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Prilepek je uspešno izbrisan.",
|
"Prilepek je uspešno izbrisan.",
|
||||||
"ZeroBin": "ZeroBin",
|
"PrivateBin": "PrivateBin",
|
||||||
"ZeroBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/ZeroBin/wiki\">project page</a>.":
|
"PrivateBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/PrivateBin/wiki\">project page</a>.":
|
||||||
"Zerobin je minimalističen, odprtokodni spletni 'pastebin', kjer server ne ve ničesar o prilepljenih podatkih. Podatki so zakodirani/odkodirani <i>v brskalniku</i> z uporabo 256 bitnega AES. Več informacij na < href=\"https://github.com/elrido/ZeroBin/wiki\">spletni strani projekta.</a>.",
|
"PrivateBin je minimalističen, odprtokodni spletni 'pastebin', kjer server ne ve ničesar o prilepljenih podatkih. Podatki so zakodirani/odkodirani <i>v brskalniku</i> z uporabo 256 bitnega AES. Več informacij na < href=\"https://github.com/elrido/PrivateBin/wiki\">spletni strani projekta.</a>.",
|
||||||
"Because ignorance is bliss":
|
"Because ignorance is bliss":
|
||||||
"Ker kar ne veš ne boli.",
|
"Ker kar ne veš ne boli.",
|
||||||
"Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.":
|
"Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.":
|
||||||
"Da ZeroBin deluje, moraš vklopiti Javascript.<br />Oprosti za povročene nevšečnosti.",
|
"Da PrivateBin deluje, moraš vklopiti Javascript.<br />Oprosti za povročene nevšečnosti.",
|
||||||
"ZeroBin requires a modern browser to work.":
|
"PrivateBin requires a modern browser to work.":
|
||||||
"ZeroBin za svoje delovanje potrebuje moderen brskalnik.",
|
"PrivateBin za svoje delovanje potrebuje moderen brskalnik.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
"Še vedno uporabljaš Internet Explorer? Naredi si uslugo, preklopi na moderen brskalnik:",
|
"Še vedno uporabljaš Internet Explorer? Naredi si uslugo, preklopi na moderen brskalnik:",
|
||||||
"New":
|
"New":
|
||||||
|
22
i18n/zh.json
22
i18n/zh.json
@ -2,10 +2,10 @@
|
|||||||
"en": "zh",
|
"en": "zh",
|
||||||
"Paste does not exist, has expired or has been deleted.":
|
"Paste does not exist, has expired or has been deleted.":
|
||||||
"粘贴不存在,已过期或者已被删除。",
|
"粘贴不存在,已过期或者已被删除。",
|
||||||
"ZeroBin requires php 5.2.6 or above to work. Sorry.":
|
"PrivateBin requires php 5.2.6 or above to work. Sorry.":
|
||||||
"ZeroBin需要工作于PHP 5.2.6及以上版本,抱歉。",
|
"PrivateBin需要工作于PHP 5.2.6及以上版本,抱歉。",
|
||||||
"ZeroBin requires configuration section [%s] to be present in configuration file.":
|
"PrivateBin requires configuration section [%s] to be present in configuration file.":
|
||||||
"ZeroBin需要设置配置文件中 [%s] 的部分。",
|
"PrivateBin需要设置配置文件中 [%s] 的部分。",
|
||||||
"Please wait %d seconds between each post.":
|
"Please wait %d seconds between each post.":
|
||||||
"每 %d 秒只能粘贴一次。",
|
"每 %d 秒只能粘贴一次。",
|
||||||
"Paste is limited to %s of encrypted data.":
|
"Paste is limited to %s of encrypted data.":
|
||||||
@ -26,15 +26,15 @@
|
|||||||
"错误的删除token,粘贴没有被删除。",
|
"错误的删除token,粘贴没有被删除。",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"粘贴已被正确删除。",
|
"粘贴已被正确删除。",
|
||||||
"ZeroBin": "ZeroBin",
|
"PrivateBin": "PrivateBin",
|
||||||
"ZeroBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/ZeroBin/wiki\">project page</a>.":
|
"PrivateBin is a minimalist, opensource online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href=\"https://github.com/elrido/PrivateBin/wiki\">project page</a>.":
|
||||||
"ZeroBin是一个极简,开源,对粘贴内容毫不知情的在线粘贴板,数据<i>在浏览器内</i>进行AES-256加密。更多信息请查看<a href=\"https://github.com/elrido/ZeroBin/wiki\">项目主页</a>。",
|
"PrivateBin是一个极简,开源,对粘贴内容毫不知情的在线粘贴板,数据<i>在浏览器内</i>进行AES-256加密。更多信息请查看<a href=\"https://github.com/elrido/PrivateBin/wiki\">项目主页</a>。",
|
||||||
"Because ignorance is bliss":
|
"Because ignorance is bliss":
|
||||||
"因为无知是福",
|
"因为无知是福",
|
||||||
"Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.":
|
"Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.":
|
||||||
"ZeroBin需要JavaScript来进行加解密。<br />带来的不便敬请谅解。",
|
"PrivateBin需要JavaScript来进行加解密。<br />带来的不便敬请谅解。",
|
||||||
"ZeroBin requires a modern browser to work.":
|
"PrivateBin requires a modern browser to work.":
|
||||||
"ZeroBin需要工作于现代化的浏览器。",
|
"PrivateBin需要工作于现代化的浏览器。",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
"还在使用Internet Explorer?帮自己个忙,换上一个现代化的浏览器:",
|
"还在使用Internet Explorer?帮自己个忙,换上一个现代化的浏览器:",
|
||||||
"New":
|
"New":
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -15,4 +15,4 @@ define('PATH', '');
|
|||||||
|
|
||||||
define('PUBLIC_PATH', dirname(__FILE__));
|
define('PUBLIC_PATH', dirname(__FILE__));
|
||||||
require PATH . 'lib/auto.php';
|
require PATH . 'lib/auto.php';
|
||||||
new zerobin;
|
new privatebin;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -481,7 +481,7 @@ $(function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var zerobin = {
|
var privatebin = {
|
||||||
/**
|
/**
|
||||||
* headers to send in AJAX requests
|
* headers to send in AJAX requests
|
||||||
*/
|
*/
|
||||||
@ -695,7 +695,7 @@ $(function() {
|
|||||||
headers: this.headers
|
headers: this.headers
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
zerobin.showError(i18n._('Could not delete the paste, it was not stored in burn after reading mode.'));
|
privatebin.showError(i18n._('Could not delete the paste, it was not stored in burn after reading mode.'));
|
||||||
});
|
});
|
||||||
helper.setMessage(this.remainingTime, i18n._(
|
helper.setMessage(this.remainingTime, i18n._(
|
||||||
'FOR YOUR EYES ONLY. Don\'t close this window, this message can\'t be displayed again.'
|
'FOR YOUR EYES ONLY. Don\'t close this window, this message can\'t be displayed again.'
|
||||||
@ -842,44 +842,44 @@ $(function() {
|
|||||||
{
|
{
|
||||||
if (data.status == 0)
|
if (data.status == 0)
|
||||||
{
|
{
|
||||||
zerobin.showStatus(i18n._('Comment posted.'), false);
|
privatebin.showStatus(i18n._('Comment posted.'), false);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: zerobin.scriptLocation() + '?' + zerobin.pasteID(),
|
url: privatebin.scriptLocation() + '?' + privatebin.pasteID(),
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
headers: zerobin.headers,
|
headers: privatebin.headers,
|
||||||
success: function(data)
|
success: function(data)
|
||||||
{
|
{
|
||||||
if (data.status == 0)
|
if (data.status == 0)
|
||||||
{
|
{
|
||||||
zerobin.displayMessages(zerobin.pageKey(), data);
|
privatebin.displayMessages(privatebin.pageKey(), data);
|
||||||
}
|
}
|
||||||
else if (data.status == 1)
|
else if (data.status == 1)
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not refresh display: %s', data.message));
|
privatebin.showError(i18n._('Could not refresh display: %s', data.message));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not refresh display: %s', i18n._('unknown status')));
|
privatebin.showError(i18n._('Could not refresh display: %s', i18n._('unknown status')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
zerobin.showError(i18n._('Could not refresh display: %s', i18n._('server error or not responding')));
|
privatebin.showError(i18n._('Could not refresh display: %s', i18n._('server error or not responding')));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (data.status == 1)
|
else if (data.status == 1)
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not post comment: %s', data.message));
|
privatebin.showError(i18n._('Could not post comment: %s', data.message));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not post comment: %s', i18n._('unknown status')));
|
privatebin.showError(i18n._('Could not post comment: %s', i18n._('unknown status')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
zerobin.showError(i18n._('Could not post comment: %s', i18n._('server error or not responding')));
|
privatebin.showError(i18n._('Could not post comment: %s', i18n._('server error or not responding')));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -926,7 +926,7 @@ $(function() {
|
|||||||
reader.onload = (function(theFile)
|
reader.onload = (function(theFile)
|
||||||
{
|
{
|
||||||
return function(e) {
|
return function(e) {
|
||||||
zerobin.sendDataContinue(
|
privatebin.sendDataContinue(
|
||||||
randomkey,
|
randomkey,
|
||||||
filter.cipher(randomkey, password, e.target.result),
|
filter.cipher(randomkey, password, e.target.result),
|
||||||
filter.cipher(randomkey, password, theFile.name)
|
filter.cipher(randomkey, password, theFile.name)
|
||||||
@ -983,38 +983,38 @@ $(function() {
|
|||||||
success: function(data)
|
success: function(data)
|
||||||
{
|
{
|
||||||
if (data.status == 0) {
|
if (data.status == 0) {
|
||||||
zerobin.stateExistingPaste();
|
privatebin.stateExistingPaste();
|
||||||
var url = zerobin.scriptLocation() + '?' + data.id + '#' + randomkey;
|
var url = privatebin.scriptLocation() + '?' + data.id + '#' + randomkey;
|
||||||
var deleteUrl = zerobin.scriptLocation() + '?pasteid=' + data.id + '&deletetoken=' + data.deletetoken;
|
var deleteUrl = privatebin.scriptLocation() + '?pasteid=' + data.id + '&deletetoken=' + data.deletetoken;
|
||||||
zerobin.showStatus('', false);
|
privatebin.showStatus('', false);
|
||||||
zerobin.errorMessage.addClass('hidden');
|
privatebin.errorMessage.addClass('hidden');
|
||||||
|
|
||||||
$('#pastelink').html(
|
$('#pastelink').html(
|
||||||
i18n._(
|
i18n._(
|
||||||
'Your paste is <a id="pasteurl" href="%s">%s</a> <span id="copyhint">(Hit [Ctrl]+[c] to copy)</span>',
|
'Your paste is <a id="pasteurl" href="%s">%s</a> <span id="copyhint">(Hit [Ctrl]+[c] to copy)</span>',
|
||||||
url, url
|
url, url
|
||||||
) + zerobin.shortenUrl(url)
|
) + privatebin.shortenUrl(url)
|
||||||
);
|
);
|
||||||
$('#deletelink').html('<a href="' + deleteUrl + '">' + i18n._('Delete data') + '</a>');
|
$('#deletelink').html('<a href="' + deleteUrl + '">' + i18n._('Delete data') + '</a>');
|
||||||
zerobin.pasteResult.removeClass('hidden');
|
privatebin.pasteResult.removeClass('hidden');
|
||||||
// We pre-select the link so that the user only has to [Ctrl]+[c] the link.
|
// We pre-select the link so that the user only has to [Ctrl]+[c] the link.
|
||||||
helper.selectText('pasteurl');
|
helper.selectText('pasteurl');
|
||||||
zerobin.showStatus('', false);
|
privatebin.showStatus('', false);
|
||||||
zerobin.formatPaste(data_to_send.formatter, zerobin.message.val());
|
privatebin.formatPaste(data_to_send.formatter, privatebin.message.val());
|
||||||
}
|
}
|
||||||
else if (data.status==1)
|
else if (data.status==1)
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not create paste: %s', data.message));
|
privatebin.showError(i18n._('Could not create paste: %s', data.message));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not create paste: %s', i18n._('unknown status')));
|
privatebin.showError(i18n._('Could not create paste: %s', i18n._('unknown status')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function()
|
.fail(function()
|
||||||
{
|
{
|
||||||
zerobin.showError(i18n._('Could not create paste: %s', i18n._('server error or not responding')));
|
privatebin.showError(i18n._('Could not create paste: %s', i18n._('server error or not responding')));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1397,8 +1397,8 @@ $(function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* main application start, called when DOM is fully loaded
|
* main application start, called when DOM is fully loaded
|
||||||
* runs zerobin when translations were loaded
|
* runs privatebin when translations were loaded
|
||||||
*/
|
*/
|
||||||
i18n.loadTranslations($.proxy(zerobin.init, zerobin));
|
i18n.loadTranslations($.proxy(privatebin.init, privatebin));
|
||||||
});
|
});
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -71,7 +71,7 @@ class configuration
|
|||||||
'dir' => 'data',
|
'dir' => 'data',
|
||||||
),
|
),
|
||||||
'model' => array(
|
'model' => array(
|
||||||
'class' => 'zerobin_data',
|
'class' => 'privatebin_data',
|
||||||
),
|
),
|
||||||
'model_options' => array(
|
'model_options' => array(
|
||||||
'dir' => 'data',
|
'dir' => 'data',
|
||||||
@ -92,7 +92,7 @@ class configuration
|
|||||||
$config = parse_ini_file($configFile, true);
|
$config = parse_ini_file($configFile, true);
|
||||||
foreach (array('main', 'model') as $section) {
|
foreach (array('main', 'model') as $section) {
|
||||||
if (!array_key_exists($section, $config)) {
|
if (!array_key_exists($section, $config)) {
|
||||||
throw new Exception(i18n::_('ZeroBin requires configuration section [%s] to be present in configuration file.', $section), 2);
|
throw new Exception(i18n::_('PrivateBin requires configuration section [%s] to be present in configuration file.', $section), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ class configuration
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// provide different defaults for database model
|
// provide different defaults for database model
|
||||||
elseif ($section == 'model_options' && $this->_configuration['model']['class'] == 'zerobin_db')
|
elseif ($section == 'model_options' && $this->_configuration['model']['class'] == 'privatebin_db')
|
||||||
{
|
{
|
||||||
$values = array(
|
$values = array(
|
||||||
'dsn' => 'sqlite:' . PATH . 'data/db.sq3',
|
'dsn' => 'sqlite:' . PATH . 'data/db.sq3',
|
||||||
@ -228,7 +228,7 @@ class configuration
|
|||||||
{
|
{
|
||||||
if (!array_key_exists($section, $this->_configuration))
|
if (!array_key_exists($section, $this->_configuration))
|
||||||
{
|
{
|
||||||
throw new Exception(i18n::_('ZeroBin requires configuration section [%s] to be present in configuration file.', $section), 3);
|
throw new Exception(i18n::_('PrivateBin requires configuration section [%s] to be present in configuration file.', $section), 3);
|
||||||
}
|
}
|
||||||
return $this->_configuration[$section];
|
return $this->_configuration[$section];
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -13,7 +13,7 @@
|
|||||||
/**
|
/**
|
||||||
* model
|
* model
|
||||||
*
|
*
|
||||||
* Factory of ZeroBin instance models.
|
* Factory of PrivateBin instance models.
|
||||||
*/
|
*/
|
||||||
class model
|
class model
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ class model
|
|||||||
/**
|
/**
|
||||||
* Data storage.
|
* Data storage.
|
||||||
*
|
*
|
||||||
* @var zerobin_abstract
|
* @var privatebin_abstract
|
||||||
*/
|
*/
|
||||||
private $_store = null;
|
private $_store = null;
|
||||||
|
|
||||||
@ -61,11 +61,16 @@ class model
|
|||||||
{
|
{
|
||||||
if ($this->_store === null)
|
if ($this->_store === null)
|
||||||
{
|
{
|
||||||
|
// added option to support old config file format
|
||||||
|
$model = str_replace(
|
||||||
|
'zerobin_', 'privatebin_',
|
||||||
|
$this->_conf->getKey('class', 'model')
|
||||||
|
);
|
||||||
$this->_store = forward_static_call(
|
$this->_store = forward_static_call(
|
||||||
array($this->_conf->getKey('class', 'model'), 'getInstance'),
|
array($model, 'getInstance'),
|
||||||
$this->_conf->getSection('model_options')
|
$this->_conf->getSection('model_options')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $this->_store;
|
return $this->_store;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -13,7 +13,7 @@
|
|||||||
/**
|
/**
|
||||||
* model_abstract
|
* model_abstract
|
||||||
*
|
*
|
||||||
* Abstract model for ZeroBin objects.
|
* Abstract model for PrivateBin objects.
|
||||||
*/
|
*/
|
||||||
abstract class model_abstract
|
abstract class model_abstract
|
||||||
{
|
{
|
||||||
@ -45,7 +45,7 @@ abstract class model_abstract
|
|||||||
* Data storage.
|
* Data storage.
|
||||||
*
|
*
|
||||||
* @access protected
|
* @access protected
|
||||||
* @var zerobin_abstract
|
* @var privatebin_abstract
|
||||||
*/
|
*/
|
||||||
protected $_store;
|
protected $_store;
|
||||||
|
|
||||||
@ -54,10 +54,10 @@ abstract class model_abstract
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param configuration $configuration
|
* @param configuration $configuration
|
||||||
* @param zerobin_abstract $storage
|
* @param privatebin_abstract $storage
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(configuration $configuration, zerobin_abstract $storage)
|
public function __construct(configuration $configuration, privatebin_abstract $storage)
|
||||||
{
|
{
|
||||||
$this->_conf = $configuration;
|
$this->_conf = $configuration;
|
||||||
$this->_store = $storage;
|
$this->_store = $storage;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -13,7 +13,7 @@
|
|||||||
/**
|
/**
|
||||||
* model_comment
|
* model_comment
|
||||||
*
|
*
|
||||||
* Model of a ZeroBin comment.
|
* Model of a PrivateBin comment.
|
||||||
*/
|
*/
|
||||||
class model_comment extends model_abstract
|
class model_comment extends model_abstract
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -13,7 +13,7 @@
|
|||||||
/**
|
/**
|
||||||
* model_paste
|
* model_paste
|
||||||
*
|
*
|
||||||
* Model of a ZeroBin paste.
|
* Model of a PrivateBin paste.
|
||||||
*/
|
*/
|
||||||
class model_paste extends model_abstract
|
class model_paste extends model_abstract
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ class model_paste extends model_abstract
|
|||||||
public function get()
|
public function get()
|
||||||
{
|
{
|
||||||
$this->_data = $this->_store->read($this->getId());
|
$this->_data = $this->_store->read($this->getId());
|
||||||
if ($this->_data === false) throw new Exception(zerobin::GENERIC_ERROR, 64);
|
if ($this->_data === false) throw new Exception(privatebin::GENERIC_ERROR, 64);
|
||||||
|
|
||||||
// check if paste has expired and delete it if neccessary.
|
// check if paste has expired and delete it if neccessary.
|
||||||
if (property_exists($this->_data->meta, 'expire_date'))
|
if (property_exists($this->_data->meta, 'expire_date'))
|
||||||
@ -35,7 +35,7 @@ class model_paste extends model_abstract
|
|||||||
if ($this->_data->meta->expire_date < time())
|
if ($this->_data->meta->expire_date < time())
|
||||||
{
|
{
|
||||||
$this->delete();
|
$this->delete();
|
||||||
throw new Exception(zerobin::GENERIC_ERROR, 63);
|
throw new Exception(privatebin::GENERIC_ERROR, 63);
|
||||||
}
|
}
|
||||||
// We kindly provide the remaining time before expiration (in seconds)
|
// We kindly provide the remaining time before expiration (in seconds)
|
||||||
$this->_data->meta->remaining_time = $this->_data->meta->expire_date - time();
|
$this->_data->meta->remaining_time = $this->_data->meta->expire_date - time();
|
||||||
@ -153,7 +153,7 @@ class model_paste extends model_abstract
|
|||||||
*
|
*
|
||||||
* The token is the hmac of the pastes ID signed with the server salt.
|
* The token is the hmac of the pastes ID signed with the server salt.
|
||||||
* The paste can be deleted by calling:
|
* The paste can be deleted by calling:
|
||||||
* http://example.com/zerobin/?pasteid=<pasteid>&deletetoken=<deletetoken>
|
* http://example.com/privatebin/?pasteid=<pasteid>&deletetoken=<deletetoken>
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zerobin
|
* privatebin
|
||||||
*
|
*
|
||||||
* Controller, puts it all together.
|
* Controller, puts it all together.
|
||||||
*/
|
*/
|
||||||
class zerobin
|
class privatebin
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* version
|
* version
|
||||||
@ -106,7 +106,7 @@ class zerobin
|
|||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
*
|
*
|
||||||
* initializes and runs ZeroBin
|
* initializes and runs PrivateBin
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
@ -115,7 +115,7 @@ class zerobin
|
|||||||
{
|
{
|
||||||
if (version_compare(PHP_VERSION, '5.2.6') < 0)
|
if (version_compare(PHP_VERSION, '5.2.6') < 0)
|
||||||
{
|
{
|
||||||
throw new Exception(i18n::_('ZeroBin requires php 5.2.6 or above to work. Sorry.'), 1);
|
throw new Exception(i18n::_('PrivateBin requires php 5.2.6 or above to work. Sorry.'), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// load config from ini file
|
// load config from ini file
|
||||||
@ -156,7 +156,7 @@ class zerobin
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initialize zerobin
|
* initialize privatebin
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @return void
|
* @return void
|
||||||
@ -388,7 +388,7 @@ class zerobin
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display ZeroBin frontend.
|
* Display PrivateBin frontend.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @return void
|
* @return void
|
@ -1,35 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zerobin_abstract
|
* privatebin_abstract
|
||||||
*
|
*
|
||||||
* Abstract model for ZeroBin data access, implemented as a singleton.
|
* Abstract model for PrivateBin data access, implemented as a singleton.
|
||||||
*/
|
*/
|
||||||
abstract class zerobin_abstract
|
abstract class privatebin_abstract
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* singleton instance
|
* singleton instance
|
||||||
*
|
*
|
||||||
* @access protected
|
* @access protected
|
||||||
* @static
|
* @static
|
||||||
* @var zerobin_abstract
|
* @var privatebin_abstract
|
||||||
*/
|
*/
|
||||||
protected static $_instance = null;
|
protected static $_instance = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enforce singleton, disable constructor
|
* enforce singleton, disable constructor
|
||||||
*
|
*
|
||||||
* Instantiate using {@link getInstance()}, zerobin is a singleton object.
|
* Instantiate using {@link getInstance()}, privatebin is a singleton object.
|
||||||
*
|
*
|
||||||
* @access protected
|
* @access protected
|
||||||
*/
|
*/
|
||||||
@ -38,7 +38,7 @@ abstract class zerobin_abstract
|
|||||||
/**
|
/**
|
||||||
* enforce singleton, disable cloning
|
* enforce singleton, disable cloning
|
||||||
*
|
*
|
||||||
* Instantiate using {@link getInstance()}, zerobin is a singleton object.
|
* Instantiate using {@link getInstance()}, privatebin is a singleton object.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -50,7 +50,7 @@ abstract class zerobin_abstract
|
|||||||
* @access public
|
* @access public
|
||||||
* @static
|
* @static
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* @return zerobin_abstract
|
* @return privatebin_abstract
|
||||||
*/
|
*/
|
||||||
public static function getInstance($options) {}
|
public static function getInstance($options) {}
|
||||||
|
|
@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zerobin_data
|
* privatebin_data
|
||||||
*
|
*
|
||||||
* Model for data access, implemented as a singleton.
|
* Model for data access, implemented as a singleton.
|
||||||
*/
|
*/
|
||||||
class zerobin_data extends zerobin_abstract
|
class privatebin_data extends privatebin_abstract
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* directory where data is stored
|
* directory where data is stored
|
||||||
@ -32,7 +32,7 @@ class zerobin_data extends zerobin_abstract
|
|||||||
* @access public
|
* @access public
|
||||||
* @static
|
* @static
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* @return zerobin_data
|
* @return privatebin_data
|
||||||
*/
|
*/
|
||||||
public static function getInstance($options = null)
|
public static function getInstance($options = null)
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@ class zerobin_data extends zerobin_abstract
|
|||||||
array_key_exists('dir', $options)
|
array_key_exists('dir', $options)
|
||||||
) self::$_dir = $options['dir'] . DIRECTORY_SEPARATOR;
|
) self::$_dir = $options['dir'] . DIRECTORY_SEPARATOR;
|
||||||
// if needed initialize the singleton
|
// if needed initialize the singleton
|
||||||
if(!(self::$_instance instanceof zerobin_data)) {
|
if(!(self::$_instance instanceof privatebin_data)) {
|
||||||
self::$_instance = new self;
|
self::$_instance = new self;
|
||||||
self::_init();
|
self::_init();
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ class zerobin_data extends zerobin_abstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initialize zerobin
|
* initialize privatebin
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @static
|
* @static
|
@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zerobin_db
|
* privatebin_db
|
||||||
*
|
*
|
||||||
* Model for DB access, implemented as a singleton.
|
* Model for DB access, implemented as a singleton.
|
||||||
*/
|
*/
|
||||||
class zerobin_db extends zerobin_abstract
|
class privatebin_db extends privatebin_abstract
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* cache for select queries
|
* cache for select queries
|
||||||
@ -58,12 +58,12 @@ class zerobin_db extends zerobin_abstract
|
|||||||
* @static
|
* @static
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return zerobin_db
|
* @return privatebin_db
|
||||||
*/
|
*/
|
||||||
public static function getInstance($options = null)
|
public static function getInstance($options = null)
|
||||||
{
|
{
|
||||||
// if needed initialize the singleton
|
// if needed initialize the singleton
|
||||||
if(!(self::$_instance instanceof zerobin_db)) {
|
if(!(self::$_instance instanceof privatebin_db)) {
|
||||||
self::$_instance = new self;
|
self::$_instance = new self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ class zerobin_db extends zerobin_abstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create config table if necessary
|
// create config table if necessary
|
||||||
$db_version = zerobin::VERSION;
|
$db_version = privatebin::VERSION;
|
||||||
if (!in_array(self::$_prefix . 'config', $tables))
|
if (!in_array(self::$_prefix . 'config', $tables))
|
||||||
{
|
{
|
||||||
self::_createConfigTable();
|
self::_createConfigTable();
|
||||||
@ -129,7 +129,7 @@ class zerobin_db extends zerobin_abstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update database structure if necessary
|
// update database structure if necessary
|
||||||
if (version_compare($db_version, zerobin::VERSION, '<'))
|
if (version_compare($db_version, privatebin::VERSION, '<'))
|
||||||
{
|
{
|
||||||
self::_upgradeDatabase($db_version);
|
self::_upgradeDatabase($db_version);
|
||||||
}
|
}
|
||||||
@ -588,7 +588,7 @@ class zerobin_db extends zerobin_abstract
|
|||||||
);
|
);
|
||||||
self::_exec(
|
self::_exec(
|
||||||
'INSERT INTO ' . self::$_prefix . 'config VALUES(?,?)',
|
'INSERT INTO ' . self::$_prefix . 'config VALUES(?,?)',
|
||||||
array('VERSION', zerobin::VERSION)
|
array('VERSION', privatebin::VERSION)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
@ -13,12 +13,12 @@
|
|||||||
/**
|
/**
|
||||||
* serversalt
|
* serversalt
|
||||||
*
|
*
|
||||||
* This is a random string which is unique to each ZeroBin installation.
|
* This is a random string which is unique to each PrivateBin installation.
|
||||||
* It is automatically created if not present.
|
* It is automatically created if not present.
|
||||||
*
|
*
|
||||||
* Salt is used:
|
* Salt is used:
|
||||||
* - to generate unique VizHash in discussions (which are not reproductible across ZeroBin servers)
|
* - to generate unique VizHash in discussions (which are not reproductible across PrivateBin servers)
|
||||||
* - to generate unique deletion token (which are not re-usable across ZeroBin servers)
|
* - to generate unique deletion token (which are not re-usable across PrivateBin servers)
|
||||||
*/
|
*/
|
||||||
class serversalt extends persistence
|
class serversalt extends persistence
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* ZeroBin
|
* PrivateBin
|
||||||
*
|
*
|
||||||
* a zero-knowledge paste bin
|
* a zero-knowledge paste bin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.22
|
* @version 0.22
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
* VizHash_GD
|
* VizHash_GD
|
||||||
*
|
*
|
||||||
* Visual Hash implementation in php4+GD,
|
* Visual Hash implementation in php4+GD,
|
||||||
* stripped down and modified version for ZeroBin
|
* stripped down and modified version for PrivateBin
|
||||||
*
|
*
|
||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:vizhash_gd
|
* @link http://sebsauvage.net/wiki/doku.php?id=php:vizhash_gd
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.0.4 beta ZeroBin 0.22
|
* @version 0.0.4 beta PrivateBin 0.22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{function="t('ZeroBin')"}</title>
|
<title>{function="t('PrivateBin')"}</title>
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/zerobin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
||||||
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
||||||
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
||||||
<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}"></script>
|
<script type="text/javascript" src="js/privatebin.js?{$VERSION|rawurlencode}"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="reloadlink navbar-brand" href="/">{function="t('ZeroBin')"}</a>
|
<a class="reloadlink navbar-brand" href="/">{function="t('PrivateBin')"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
@ -158,8 +158,8 @@
|
|||||||
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
||||||
</div>{/if}
|
</div>{/if}
|
||||||
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
||||||
<noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
<noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
||||||
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('ZeroBin requires a modern browser to work.')"}</div>
|
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('PrivateBin requires a modern browser to work.')"}</div>
|
||||||
<div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
<div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
||||||
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
||||||
<a href="http://www.opera.com/">Opera</a>,
|
<a href="http://www.opera.com/">Opera</a>,
|
||||||
@ -198,10 +198,10 @@
|
|||||||
</section>
|
</section>
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="col-md-5 col-xs-8">{function="t('ZeroBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
||||||
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
||||||
<p id="aboutbox" class="col-md-6 col-xs-12">
|
<p id="aboutbox" class="col-md-6 col-xs-12">
|
||||||
{function="t('ZeroBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/ZeroBin/wiki">project page</a>.')"}
|
{function="t('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/PrivateBin/wiki">project page</a>.')"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{function="t('ZeroBin')"}</title>
|
<title>{function="t('PrivateBin')"}</title>
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/darkstrap-0.9.3.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/darkstrap-0.9.3.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/zerobin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
||||||
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
||||||
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
||||||
<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}"></script>
|
<script type="text/javascript" src="js/privatebin.js?{$VERSION|rawurlencode}"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="reloadlink navbar-brand" href="/">{function="t('ZeroBin')"}</a>
|
<a class="reloadlink navbar-brand" href="/">{function="t('PrivateBin')"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
@ -154,8 +154,8 @@
|
|||||||
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
||||||
</div>{/if}
|
</div>{/if}
|
||||||
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
||||||
<noscript><div id="noscript" role="alert" class="nonworking alert alert-error"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
<noscript><div id="noscript" role="alert" class="nonworking alert alert-error"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
||||||
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('ZeroBin requires a modern browser to work.')"}</div>
|
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('PrivateBin requires a modern browser to work.')"}</div>
|
||||||
<div id="ienotice" role="alert" class="hidden alert alert-error"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
<div id="ienotice" role="alert" class="hidden alert alert-error"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
||||||
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
||||||
<a href="http://www.opera.com/">Opera</a>,
|
<a href="http://www.opera.com/">Opera</a>,
|
||||||
@ -194,10 +194,10 @@
|
|||||||
</section>
|
</section>
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="col-md-5 col-xs-8">{function="t('ZeroBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
||||||
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
||||||
<p id="aboutbox" class="col-md-6 col-xs-12">
|
<p id="aboutbox" class="col-md-6 col-xs-12">
|
||||||
{function="t('ZeroBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/ZeroBin/wiki">project page</a>.')"}
|
{function="t('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/PrivateBin/wiki">project page</a>.')"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{function="t('ZeroBin')"}</title>
|
<title>{function="t('PrivateBin')"}</title>
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/darkstrap-0.9.3.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/darkstrap-0.9.3.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/zerobin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
||||||
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
||||||
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
||||||
<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}"></script>
|
<script type="text/javascript" src="js/privatebin.js?{$VERSION|rawurlencode}"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="reloadlink navbar-brand" href="/">{function="t('ZeroBin')"}</a>
|
<a class="reloadlink navbar-brand" href="/">{function="t('PrivateBin')"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
@ -154,8 +154,8 @@
|
|||||||
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
||||||
</div>{/if}
|
</div>{/if}
|
||||||
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
||||||
<noscript><div id="noscript" role="alert" class="nonworking alert alert-error"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
<noscript><div id="noscript" role="alert" class="nonworking alert alert-error"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
||||||
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('ZeroBin requires a modern browser to work.')"}</div>
|
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('PrivateBin requires a modern browser to work.')"}</div>
|
||||||
<div id="ienotice" role="alert" class="hidden alert alert-error"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
<div id="ienotice" role="alert" class="hidden alert alert-error"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
||||||
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
||||||
<a href="http://www.opera.com/">Opera</a>,
|
<a href="http://www.opera.com/">Opera</a>,
|
||||||
@ -194,10 +194,10 @@
|
|||||||
</section>
|
</section>
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="col-md-5 col-xs-8">{function="t('ZeroBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
||||||
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
||||||
<p id="aboutbox" class="col-md-6 col-xs-12">
|
<p id="aboutbox" class="col-md-6 col-xs-12">
|
||||||
{function="t('ZeroBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/ZeroBin/wiki">project page</a>.')"}
|
{function="t('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/PrivateBin/wiki">project page</a>.')"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{function="t('ZeroBin')"}</title>
|
<title>{function="t('PrivateBin')"}</title>
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/zerobin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
||||||
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
||||||
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
||||||
<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}"></script>
|
<script type="text/javascript" src="js/privatebin.js?{$VERSION|rawurlencode}"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="reloadlink navbar-brand" href="/">{function="t('ZeroBin')"}</a>
|
<a class="reloadlink navbar-brand" href="/">{function="t('PrivateBin')"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
@ -154,8 +154,8 @@
|
|||||||
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
||||||
</div>{/if}
|
</div>{/if}
|
||||||
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
||||||
<noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
<noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
||||||
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('ZeroBin requires a modern browser to work.')"}</div>
|
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('PrivateBin requires a modern browser to work.')"}</div>
|
||||||
<div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
<div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
||||||
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
||||||
<a href="http://www.opera.com/">Opera</a>,
|
<a href="http://www.opera.com/">Opera</a>,
|
||||||
@ -194,10 +194,10 @@
|
|||||||
</section>
|
</section>
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="col-md-5 col-xs-8">{function="t('ZeroBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
||||||
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
||||||
<p id="aboutbox" class="col-md-6 col-xs-12">
|
<p id="aboutbox" class="col-md-6 col-xs-12">
|
||||||
{function="t('ZeroBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/ZeroBin/wiki">project page</a>.')"}
|
{function="t('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/PrivateBin/wiki">project page</a>.')"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{function="t('ZeroBin')"}</title>
|
<title>{function="t('PrivateBin')"}</title>
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/bootstrap/zerobin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
<link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
||||||
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
<script type="text/javascript" src="js/bootstrap-3.3.5.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
||||||
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
||||||
<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}"></script>
|
<script type="text/javascript" src="js/privatebin.js?{$VERSION|rawurlencode}"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
<style type="text/css">#ienotice {display:block !important;} #oldienotice {display:block !important;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="reloadlink navbar-brand" href="/">{function="t('ZeroBin')"}</a>
|
<a class="reloadlink navbar-brand" href="/">{function="t('PrivateBin')"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
@ -154,8 +154,8 @@
|
|||||||
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {$STATUS|htmlspecialchars}
|
||||||
</div>{/if}
|
</div>{/if}
|
||||||
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
<div id="errormessage" role="alert" class="{if="!strlen($ERROR)"}hidden {/if}alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {$ERROR|htmlspecialchars}</div>
|
||||||
<noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
<noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {function="t('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
||||||
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('ZeroBin requires a modern browser to work.')"}</div>
|
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> {function="t('PrivateBin requires a modern browser to work.')"}</div>
|
||||||
<div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
<div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> {function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
||||||
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
||||||
<a href="http://www.opera.com/">Opera</a>,
|
<a href="http://www.opera.com/">Opera</a>,
|
||||||
@ -194,10 +194,10 @@
|
|||||||
</section>
|
</section>
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="col-md-5 col-xs-8">{function="t('ZeroBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4>
|
||||||
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
<p class="col-md-1 col-xs-4 text-center">{$VERSION}</p>
|
||||||
<p id="aboutbox" class="col-md-6 col-xs-12">
|
<p id="aboutbox" class="col-md-6 col-xs-12">
|
||||||
{function="t('ZeroBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/ZeroBin/wiki">project page</a>.')"}
|
{function="t('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/PrivateBin/wiki">project page</a>.')"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{function="t('ZeroBin')"}</title>
|
<title>{function="t('PrivateBin')"}</title>
|
||||||
<link type="text/css" rel="stylesheet" href="css/zerobin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
<link type="text/css" rel="stylesheet" href="css/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
<link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?{$VERSION|rawurlencode}" />{if="strlen($SYNTAXHIGHLIGHTINGTHEME)"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
<link type="text/css" rel="stylesheet" href="css/prettify/{$SYNTAXHIGHLIGHTINGTHEME}.css?{$VERSION|rawurlencode}" />{/if}{/if}
|
||||||
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<script type="text/javascript" src="js/rawinflate-0.3.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
<script type="text/javascript" src="js/rawinflate-0.3.js"></script>{if="$SYNTAXHIGHLIGHTING"}
|
||||||
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
<script type="text/javascript" src="js/prettify.js?{$VERSION|rawurlencode}"></script>{/if}{if="$MARKDOWN"}
|
||||||
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
<script type="text/javascript" src="js/showdown-1.4.1.js"></script>{/if}
|
||||||
<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}"></script>
|
<script type="text/javascript" src="js/privatebin.js?{$VERSION|rawurlencode}"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
@ -27,14 +27,14 @@
|
|||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div id="aboutbox">
|
<div id="aboutbox">
|
||||||
{function="t('ZeroBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/ZeroBin/wiki">project page</a>.')"}<br />{if="strlen($NOTICE)"}
|
{function="t('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/elrido/PrivateBin/wiki">project page</a>.')"}<br />{if="strlen($NOTICE)"}
|
||||||
<span class="blink">▶</span> {$NOTICE}{/if}
|
<span class="blink">▶</span> {$NOTICE}{/if}
|
||||||
</div>
|
</div>
|
||||||
<h1 class="title reloadlink">{function="t('ZeroBin')"}</h1><br />
|
<h1 class="title reloadlink">{function="t('PrivateBin')"}</h1><br />
|
||||||
<h2 class="title">{function="t('Because ignorance is bliss')"}</h2><br />
|
<h2 class="title">{function="t('Because ignorance is bliss')"}</h2><br />
|
||||||
<h3 class="title">{$VERSION}</h3>
|
<h3 class="title">{$VERSION}</h3>
|
||||||
<noscript><div id="noscript" class="nonworking">{function="t('Javascript is required for ZeroBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
<noscript><div id="noscript" class="nonworking">{function="t('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
|
||||||
<div id="oldienotice" class="nonworking">{function="t('ZeroBin requires a modern browser to work.')"}</div>
|
<div id="oldienotice" class="nonworking">{function="t('PrivateBin requires a modern browser to work.')"}</div>
|
||||||
<div id="ienotice">{function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
<div id="ienotice">{function="t('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:')"}
|
||||||
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
<a href="http://www.mozilla.org/firefox/">Firefox</a>,
|
||||||
<a href="http://www.opera.com/">Opera</a>,
|
<a href="http://www.opera.com/">Opera</a>,
|
||||||
|
@ -12,5 +12,5 @@ Example for Debian and Ubuntu:
|
|||||||
$ sudo aptitude install phpunit php5-gd php5-sqlite php5-xdebug
|
$ sudo aptitude install phpunit php5-gd php5-sqlite php5-xdebug
|
||||||
|
|
||||||
To run the tests, just change into this directory and run phpunit:
|
To run the tests, just change into this directory and run phpunit:
|
||||||
$ cd ZeroBin/tst
|
$ cd PrivateBin/tst
|
||||||
$ phpunit
|
$ phpunit
|
||||||
|
@ -91,7 +91,7 @@ class RainTPLTest extends PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
// testing version number in JS address, since other instances may not be present in different templates
|
// testing version number in JS address, since other instances may not be present in different templates
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<script[^>]+src="js/zerobin.js\\?' . rawurlencode(self::$version) . '"[^>]*>#',
|
'#<script[^>]+src="js/privatebin.js\\?' . rawurlencode(self::$version) . '"[^>]*>#',
|
||||||
$this->_content,
|
$this->_content,
|
||||||
'outputs version correctly'
|
'outputs version correctly'
|
||||||
);
|
);
|
||||||
|
@ -193,7 +193,7 @@ new configurationTestGenerator(array(
|
|||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'type' => 'text/css',
|
'type' => 'text/css',
|
||||||
'rel' => 'stylesheet',
|
'rel' => 'stylesheet',
|
||||||
'href' => 'regexp:#css/zerobin\.css#',
|
'href' => 'regexp:#css/privatebin\.css#',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'$content',
|
'$content',
|
||||||
@ -227,7 +227,7 @@ new configurationTestGenerator(array(
|
|||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'type' => 'text/css',
|
'type' => 'text/css',
|
||||||
'rel' => 'stylesheet',
|
'rel' => 'stylesheet',
|
||||||
'href' => 'regexp:#css/zerobin.css#',
|
'href' => 'regexp:#css/privatebin.css#',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'$content',
|
'$content',
|
||||||
@ -474,7 +474,7 @@ class configurationCombinationsTest extends PHPUnit_Framework_TestCase
|
|||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
helper::confBackup();
|
helper::confBackup();
|
||||||
|
|
||||||
$this->_model = zerobin_data::getInstance(array('dir' => PATH . 'data'));
|
$this->_model = privatebin_data::getInstance(array('dir' => PATH . 'data'));
|
||||||
serversalt::setPath(PATH . 'data');
|
serversalt::setPath(PATH . 'data');
|
||||||
$this->reset();
|
$this->reset();
|
||||||
}
|
}
|
||||||
@ -564,7 +564,7 @@ EOT;
|
|||||||
$code .= PHP_EOL . $preString;
|
$code .= PHP_EOL . $preString;
|
||||||
$code .= <<<'EOT'
|
$code .= <<<'EOT'
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
EOT;
|
EOT;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class configurationTest extends PHPUnit_Framework_TestCase
|
|||||||
'dir' => '../data',
|
'dir' => '../data',
|
||||||
),
|
),
|
||||||
'model' => array(
|
'model' => array(
|
||||||
'class' => 'zerobin_data',
|
'class' => 'privatebin_data',
|
||||||
),
|
),
|
||||||
'model_options' => array(
|
'model_options' => array(
|
||||||
'dir' => '../data',
|
'dir' => '../data',
|
||||||
|
@ -6,7 +6,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
$this->_model = zerobin_data::getInstance(array('dir' => PATH . 'data'));
|
$this->_model = privatebin_data::getInstance(array('dir' => PATH . 'data'));
|
||||||
serversalt::setPath(PATH . 'data');
|
serversalt::setPath(PATH . 'data');
|
||||||
$this->reset();
|
$this->reset();
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -76,7 +76,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'PUT';
|
$_SERVER['REQUEST_METHOD'] = 'PUT';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -109,7 +109,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'DELETE';
|
$_SERVER['REQUEST_METHOD'] = 'DELETE';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -133,7 +133,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -151,7 +151,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs success status');
|
$this->assertEquals(0, $response['status'], 'outputs success status');
|
||||||
@ -177,7 +177,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $paste);
|
$this->_model->create(helper::getPasteId(), $paste);
|
||||||
$_GET['jsonld'] = 'paste';
|
$_GET['jsonld'] = 'paste';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
@ -196,7 +196,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $paste);
|
$this->_model->create(helper::getPasteId(), $paste);
|
||||||
$_GET['jsonld'] = 'comment';
|
$_GET['jsonld'] = 'comment';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
@ -215,7 +215,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $paste);
|
$this->_model->create(helper::getPasteId(), $paste);
|
||||||
$_GET['jsonld'] = 'pastemeta';
|
$_GET['jsonld'] = 'pastemeta';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
@ -234,7 +234,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $paste);
|
$this->_model->create(helper::getPasteId(), $paste);
|
||||||
$_GET['jsonld'] = 'commentmeta';
|
$_GET['jsonld'] = 'commentmeta';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
@ -253,7 +253,7 @@ class jsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $paste);
|
$this->_model->create(helper::getPasteId(), $paste);
|
||||||
$_GET['jsonld'] = '../cfg/conf.ini';
|
$_GET['jsonld'] = '../cfg/conf.ini';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertEquals('{}', $content, 'does not output nasty data');
|
$this->assertEquals('{}', $content, 'does not output nasty data');
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ class modelTest extends PHPUnit_Framework_TestCase
|
|||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
$options = parse_ini_file(CONF, true);
|
$options = parse_ini_file(CONF, true);
|
||||||
$options['model'] = array(
|
$options['model'] = array(
|
||||||
'class' => 'zerobin_db',
|
'class' => 'privatebin_db',
|
||||||
);
|
);
|
||||||
$options['model_options'] = array(
|
$options['model_options'] = array(
|
||||||
'dsn' => 'sqlite::memory:',
|
'dsn' => 'sqlite::memory:',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<phpunit bootstrap="bootstrap.php" colors="true">
|
<phpunit bootstrap="bootstrap.php" colors="true">
|
||||||
<testsuite name="ZeroBin Test Suite">
|
<testsuite name="PrivateBin Test Suite">
|
||||||
<directory suffix=".php">./</directory>
|
<directory suffix=".php">./</directory>
|
||||||
<exclude>configGenerator.php</exclude>
|
<exclude>configGenerator.php</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory suffix=".php">../lib</directory>
|
<directory suffix=".php">../lib</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<file>../lib/zerobin/abstract.php</file>
|
<file>../lib/privatebin/abstract.php</file>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
class zerobinTest extends PHPUnit_Framework_TestCase
|
class privatebinTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected $_model;
|
protected $_model;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
$this->_model = zerobin_data::getInstance(array('dir' => PATH . 'data'));
|
$this->_model = privatebin_data::getInstance(array('dir' => PATH . 'data'));
|
||||||
serversalt::setPath(PATH . 'data');
|
serversalt::setPath(PATH . 'data');
|
||||||
$this->reset();
|
$this->reset();
|
||||||
}
|
}
|
||||||
@ -34,10 +34,10 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$this->reset();
|
$this->reset();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
'<title>ZeroBin</title>',
|
'<title>PrivateBin</title>',
|
||||||
$content,
|
$content,
|
||||||
'outputs title correctly'
|
'outputs title correctly'
|
||||||
);
|
);
|
||||||
@ -60,10 +60,10 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
helper::createIniFile(CONF, $options);
|
helper::createIniFile(CONF, $options);
|
||||||
$_COOKIE['lang'] = 'de';
|
$_COOKIE['lang'] = 'de';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
'<title>ZeroBin</title>',
|
'<title>PrivateBin</title>',
|
||||||
$content,
|
$content,
|
||||||
'outputs title correctly'
|
'outputs title correctly'
|
||||||
);
|
);
|
||||||
@ -82,10 +82,10 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
helper::createIniFile(CONF, $options);
|
helper::createIniFile(CONF, $options);
|
||||||
$_COOKIE['lang'] = 'de';
|
$_COOKIE['lang'] = 'de';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
'<title>ZeroBin</title>',
|
'<title>PrivateBin</title>',
|
||||||
$content,
|
$content,
|
||||||
'outputs title correctly'
|
'outputs title correctly'
|
||||||
);
|
);
|
||||||
@ -104,7 +104,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
helper::createIniFile(CONF, $options);
|
helper::createIniFile(CONF, $options);
|
||||||
$_COOKIE['lang'] = 'de';
|
$_COOKIE['lang'] = 'de';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#id="shortenbutton"[^>]*data-shortener="' . preg_quote($shortener) . '"#',
|
'#id="shortenbutton"[^>]*data-shortener="' . preg_quote($shortener) . '"#',
|
||||||
@ -125,7 +125,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
@unlink($file);
|
@unlink($file);
|
||||||
}
|
}
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
|
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
|
||||||
@ -146,7 +146,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
helper::confBackup();
|
helper::confBackup();
|
||||||
file_put_contents(CONF, '');
|
file_put_contents(CONF, '');
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -190,7 +190,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
trafficlimiter::canPass();
|
trafficlimiter::canPass();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -213,7 +213,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -237,7 +237,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -260,7 +260,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -285,7 +285,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$time = time();
|
$time = time();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -317,7 +317,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$time = time();
|
$time = time();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -348,7 +348,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -377,7 +377,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -400,7 +400,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -424,7 +424,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$this->assertFalse($this->_model->exists(helper::getPasteId()), 'paste does not exists before posting data');
|
$this->assertFalse($this->_model->exists(helper::getPasteId()), 'paste does not exists before posting data');
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -457,7 +457,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -489,7 +489,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -514,7 +514,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -539,7 +539,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -565,7 +565,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$paste = helper::getPaste(array('opendiscussion' => false));
|
$paste = helper::getPaste(array('opendiscussion' => false));
|
||||||
$this->_model->create(helper::getPasteId(), $paste);
|
$this->_model->create(helper::getPasteId(), $paste);
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -589,7 +589,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -616,7 +616,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -632,7 +632,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
$this->_model->create(helper::getPasteId(), helper::getPaste());
|
||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
'<div id="cipherdata" class="hidden">' .
|
'<div id="cipherdata" class="hidden">' .
|
||||||
@ -651,7 +651,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->reset();
|
$this->reset();
|
||||||
$_SERVER['QUERY_STRING'] = 'foo';
|
$_SERVER['QUERY_STRING'] = 'foo';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</div>#',
|
||||||
@ -668,7 +668,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->reset();
|
$this->reset();
|
||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
||||||
@ -687,7 +687,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $expiredPaste);
|
$this->_model->create(helper::getPasteId(), $expiredPaste);
|
||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
||||||
@ -706,7 +706,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $burnPaste);
|
$this->_model->create(helper::getPasteId(), $burnPaste);
|
||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
unset($burnPaste['meta']['salt']);
|
unset($burnPaste['meta']['salt']);
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
@ -729,7 +729,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs success status');
|
$this->assertEquals(0, $response['status'], 'outputs success status');
|
||||||
@ -752,7 +752,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs error status');
|
$this->assertEquals(1, $response['status'], 'outputs error status');
|
||||||
@ -774,7 +774,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $oldPaste);
|
$this->_model->create(helper::getPasteId(), $oldPaste);
|
||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$meta['formatter'] = 'syntaxhighlighting';
|
$meta['formatter'] = 'syntaxhighlighting';
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
@ -797,7 +797,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->_model->create(helper::getPasteId(), $oldPaste);
|
$this->_model->create(helper::getPasteId(), $oldPaste);
|
||||||
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = helper::getPasteId();
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$oldPaste['meta']['formatter'] = 'plaintext';
|
$oldPaste['meta']['formatter'] = 'plaintext';
|
||||||
unset($oldPaste['meta']['salt']);
|
unset($oldPaste['meta']['salt']);
|
||||||
@ -822,7 +822,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_GET['pasteid'] = helper::getPasteId();
|
$_GET['pasteid'] = helper::getPasteId();
|
||||||
$_GET['deletetoken'] = hash_hmac('sha256', helper::getPasteId(), $paste->meta->salt);
|
$_GET['deletetoken'] = hash_hmac('sha256', helper::getPasteId(), $paste->meta->salt);
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
|
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
|
||||||
@ -842,7 +842,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_GET['pasteid'] = 'foo';
|
$_GET['pasteid'] = 'foo';
|
||||||
$_GET['deletetoken'] = 'bar';
|
$_GET['deletetoken'] = 'bar';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</div>#',
|
||||||
@ -861,7 +861,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_GET['pasteid'] = helper::getPasteId();
|
$_GET['pasteid'] = helper::getPasteId();
|
||||||
$_GET['deletetoken'] = 'bar';
|
$_GET['deletetoken'] = 'bar';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
||||||
@ -880,7 +880,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_GET['pasteid'] = helper::getPasteId();
|
$_GET['pasteid'] = helper::getPasteId();
|
||||||
$_GET['deletetoken'] = 'bar';
|
$_GET['deletetoken'] = 'bar';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Wrong deletion token[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Wrong deletion token[^<]*</div>#',
|
||||||
@ -904,7 +904,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(0, $response['status'], 'outputs status');
|
$this->assertEquals(0, $response['status'], 'outputs status');
|
||||||
@ -924,7 +924,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$response = json_decode($content, true);
|
$response = json_decode($content, true);
|
||||||
$this->assertEquals(1, $response['status'], 'outputs status');
|
$this->assertEquals(1, $response['status'], 'outputs status');
|
||||||
@ -944,7 +944,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_GET['pasteid'] = helper::getPasteId();
|
$_GET['pasteid'] = helper::getPasteId();
|
||||||
$_GET['deletetoken'] = 'does not matter in this context, but has to be set';
|
$_GET['deletetoken'] = 'does not matter in this context, but has to be set';
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
||||||
@ -967,7 +967,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
|||||||
$_GET['pasteid'] = helper::getPasteId();
|
$_GET['pasteid'] = helper::getPasteId();
|
||||||
$_GET['deletetoken'] = hash_hmac('sha256', helper::getPasteId(), serversalt::get());
|
$_GET['deletetoken'] = hash_hmac('sha256', helper::getPasteId(), serversalt::get());
|
||||||
ob_start();
|
ob_start();
|
||||||
new zerobin;
|
new privatebin;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
|
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class zerobin_dataTest extends PHPUnit_Framework_TestCase
|
class privatebin_dataTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $_model;
|
private $_model;
|
||||||
|
|
||||||
@ -8,8 +8,8 @@ class zerobin_dataTest extends PHPUnit_Framework_TestCase
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
$this->_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'zerobin_data';
|
$this->_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data';
|
||||||
$this->_model = zerobin_data::getInstance(array('dir' => $this->_path));
|
$this->_model = privatebin_data::getInstance(array('dir' => $this->_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown()
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
class privatebin_dbTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $_model;
|
private $_model;
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
$this->_model = zerobin_db::getInstance($this->_options);
|
$this->_model = privatebin_db::getInstance($this->_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDatabaseBasedDataStoreWorks()
|
public function testDatabaseBasedDataStoreWorks()
|
||||||
@ -67,7 +67,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetIbmInstance()
|
public function testGetIbmInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'ibm:', 'usr' => null, 'pwd' => null,
|
'dsn' => 'ibm:', 'usr' => null, 'pwd' => null,
|
||||||
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
||||||
));
|
));
|
||||||
@ -78,7 +78,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetInformixInstance()
|
public function testGetInformixInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'informix:', 'usr' => null, 'pwd' => null,
|
'dsn' => 'informix:', 'usr' => null, 'pwd' => null,
|
||||||
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
||||||
));
|
));
|
||||||
@ -89,7 +89,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetMssqlInstance()
|
public function testGetMssqlInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'mssql:', 'usr' => null, 'pwd' => null,
|
'dsn' => 'mssql:', 'usr' => null, 'pwd' => null,
|
||||||
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
||||||
));
|
));
|
||||||
@ -100,7 +100,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetMysqlInstance()
|
public function testGetMysqlInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'mysql:', 'usr' => null, 'pwd' => null,
|
'dsn' => 'mysql:', 'usr' => null, 'pwd' => null,
|
||||||
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
||||||
));
|
));
|
||||||
@ -111,7 +111,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetOciInstance()
|
public function testGetOciInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'oci:', 'usr' => null, 'pwd' => null,
|
'dsn' => 'oci:', 'usr' => null, 'pwd' => null,
|
||||||
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
||||||
));
|
));
|
||||||
@ -122,7 +122,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetPgsqlInstance()
|
public function testGetPgsqlInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'pgsql:', 'usr' => null, 'pwd' => null,
|
'dsn' => 'pgsql:', 'usr' => null, 'pwd' => null,
|
||||||
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
'opt' => array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
|
||||||
));
|
));
|
||||||
@ -134,7 +134,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetFooInstance()
|
public function testGetFooInstance()
|
||||||
{
|
{
|
||||||
zerobin_db::getInstance(array(
|
privatebin_db::getInstance(array(
|
||||||
'dsn' => 'foo:', 'usr' => null, 'pwd' => null, 'opt' => null
|
'dsn' => 'foo:', 'usr' => null, 'pwd' => null, 'opt' => null
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ class zerobin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
'opendiscussion INT, ' .
|
'opendiscussion INT, ' .
|
||||||
'burnafterreading INT );'
|
'burnafterreading INT );'
|
||||||
);
|
);
|
||||||
zerobin_db::getInstance($this->_options);
|
privatebin_db::getInstance($this->_options);
|
||||||
@unlink($path);
|
@unlink($path);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'zerobin.php';
|
require_once 'privatebin.php';
|
||||||
|
|
||||||
class zerobinWithDbTest extends zerobinTest
|
class privatebinWithDbTest extends privatebinTest
|
||||||
{
|
{
|
||||||
private $_options = array(
|
private $_options = array(
|
||||||
'dsn' => 'sqlite:../data/tst.sq3',
|
'dsn' => 'sqlite:../data/tst.sq3',
|
||||||
@ -16,7 +16,7 @@ class zerobinWithDbTest extends zerobinTest
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
$this->_model = zerobin_db::getInstance($this->_options);
|
$this->_model = privatebin_db::getInstance($this->_options);
|
||||||
serversalt::setPath(PATH . 'data');
|
serversalt::setPath(PATH . 'data');
|
||||||
$this->reset();
|
$this->reset();
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ class zerobinWithDbTest extends zerobinTest
|
|||||||
// but then inject a db config
|
// but then inject a db config
|
||||||
$options = parse_ini_file(CONF, true);
|
$options = parse_ini_file(CONF, true);
|
||||||
$options['model'] = array(
|
$options['model'] = array(
|
||||||
'class' => 'zerobin_db',
|
'class' => 'privatebin_db',
|
||||||
);
|
);
|
||||||
$options['model_options'] = $this->_options;
|
$options['model_options'] = $this->_options;
|
||||||
helper::confBackup();
|
helper::confBackup();
|
@ -37,7 +37,7 @@ limit = 0
|
|||||||
dir = "../data"
|
dir = "../data"
|
||||||
|
|
||||||
[model]
|
[model]
|
||||||
class = "zerobin_db"
|
class = "privatebin_db"
|
||||||
|
|
||||||
[model_options]
|
[model_options]
|
||||||
dsn = "sqlite:../data/db.sq3"
|
dsn = "sqlite:../data/db.sq3"
|
||||||
|
Loading…
Reference in New Issue
Block a user