refactoring to improve code quality

pull/44/head
El RIDO 8 years ago
parent 79509ad48a
commit 3b3b5277eb

@ -1,4 +1,14 @@
{ {
"name": "privatebin/privatebin",
"description": "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bit AES in Galois Counter mode.",
"version": "0.22",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/PrivateBin/PrivateBin"
}
],
"license":"zlib-acknowledgement",
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.8.*", "phpunit/phpunit": "4.8.*",
"codacy/coverage": "dev-master", "codacy/coverage": "dev-master",

@ -507,7 +507,7 @@ $(function() {
/** /**
* Get the pastes unique identifier from the URL * Get the pastes unique identifier from the URL
* eg. http://server.com/zero/?c05354954c49a487#xxx --> c05354954c49a487 * eg. http://server.com/zero/?c05354954c49a487#c05354954c49a487 returns c05354954c49a487
* *
* @return string unique identifier * @return string unique identifier
*/ */
@ -589,7 +589,7 @@ $(function() {
this.prettyPrint.html( this.prettyPrint.html(
prettyPrintOne(text, null, true) prettyPrintOne(text, null, true)
); );
}; }
default: default:
// Convert URLs to clickable links. // Convert URLs to clickable links.
helper.urls2links(this.clearText); helper.urls2links(this.clearText);

@ -321,7 +321,7 @@ class RainTPL{
// file doesn't exsist, or the template was updated, Rain will compile the template // file doesn't exsist, or the template was updated, Rain will compile the template
if( !file_exists( $this->tpl['compiled_filename'] ) || ( self::$check_template_update && filemtime($this->tpl['compiled_filename']) < filemtime( $this->tpl['tpl_filename'] ) ) ){ if( !file_exists( $this->tpl['compiled_filename'] ) || ( self::$check_template_update && filemtime($this->tpl['compiled_filename']) < filemtime( $this->tpl['tpl_filename'] ) ) ){
$this->compileFile( $tpl_basename, $tpl_basedir, $this->tpl['tpl_filename'], PATH . self::$cache_dir, $this->tpl['compiled_filename'] ); $this->compileFile( $tpl_basedir, $this->tpl['tpl_filename'], PATH . self::$cache_dir, $this->tpl['compiled_filename'] );
return true; return true;
} }
$this->tpl['checked'] = true; $this->tpl['checked'] = true;
@ -347,7 +347,6 @@ class RainTPL{
* Compile and write the compiled template file * Compile and write the compiled template file
* *
* @access protected * @access protected
* @param string $tpl_basename
* @param string $tpl_basedir * @param string $tpl_basedir
* @param string $tpl_filename * @param string $tpl_filename
* @param string $cache_dir * @param string $cache_dir
@ -355,7 +354,7 @@ class RainTPL{
* @throws RainTpl_Exception * @throws RainTpl_Exception
* @return void * @return void
*/ */
protected function compileFile( $tpl_basename, $tpl_basedir, $tpl_filename, $cache_dir, $compiled_filename ){ protected function compileFile( $tpl_basedir, $tpl_filename, $cache_dir, $compiled_filename ){
//read template file //read template file
$this->tpl['source'] = $template_code = file_get_contents( $tpl_filename ); $this->tpl['source'] = $template_code = file_get_contents( $tpl_filename );
@ -1036,13 +1035,13 @@ class RainTPL{
$e->getTemplateFile() $e->getTemplateFile()
); );
if ($e instanceof RainTpl_SyntaxException) { if ($e instanceof RainTpl_SyntaxException) {
if (null != $e->getTemplateLine()) { if (null !== $e->getTemplateLine()) {
$output .= '<p>line: ' . $e->getTemplateLine() . '</p>'; $output .= '<p>line: ' . $e->getTemplateLine() . '</p>';
} }
if (null != $e->getTag()) { if (null !== $e->getTag()) {
$output .= '<p>in tag: ' . htmlspecialchars($e->getTag()) . '</p>'; $output .= '<p>in tag: ' . htmlspecialchars($e->getTag()) . '</p>';
} }
if (null != $e->getTemplateLine() && null != $e->getTag()) { if (null !== $e->getTemplateLine() && null !== $e->getTag()) {
$rows=explode("\n", htmlspecialchars($this->tpl['source'])); $rows=explode("\n", htmlspecialchars($this->tpl['source']));
$rows[$e->getTemplateLine()] = '<font color=red>' . $rows[$e->getTemplateLine()] . '</font>'; $rows[$e->getTemplateLine()] = '<font color=red>' . $rows[$e->getTemplateLine()] . '</font>';
$output .= '<h3>template code</h3>' . implode('<br />', $rows) . '</pre>'; $output .= '<h3>template code</h3>' . implode('<br />', $rows) . '</pre>';
@ -1162,18 +1161,4 @@ class RainTpl_SyntaxException extends RainTpl_Exception{
} }
} }
/**
* shorthand translate function for use in templates
*
* alias for i18n::translate()
*
* @access public
* @param string $messageId
* @param mixed $args one or multiple parameters injected into placeholders
* @return string
*/
function t() {
return call_user_func_array(array('i18n', 'translate'), func_get_args());
}
// -- end // -- end

@ -29,7 +29,7 @@ class configuration
* *
* @var array * @var array
*/ */
private $_defaults = array( private static $_defaults = array(
'main' => array( 'main' => array(
'discussion' => true, 'discussion' => true,
'opendiscussion' => false, 'opendiscussion' => false,
@ -97,7 +97,7 @@ class configuration
} }
} }
$opts = '_options'; $opts = '_options';
foreach ($this->_defaults as $section => $values) foreach (self::getDefaults() as $section => $values)
{ {
// fill missing sections with default values // fill missing sections with default values
if (!array_key_exists($section, $config) || count($config[$section]) == 0) if (!array_key_exists($section, $config) || count($config[$section]) == 0)
@ -197,6 +197,15 @@ class configuration
return $this->_configuration; return $this->_configuration;
} }
/**
* get default configuration as array
*
* return array
*/
public static function getDefaults()
{
return self::$_defaults;
}
/** /**
* get a key from the configuration, typically the main section or all keys * get a key from the configuration, typically the main section or all keys
@ -216,7 +225,6 @@ class configuration
return $this->_configuration[$section][$key]; return $this->_configuration[$section][$key];
} }
/** /**
* get a section from the configuration, must exist * get a section from the configuration, must exist
* *

@ -102,14 +102,14 @@ class privatebin_db extends privatebin_abstract
$tables = self::$_db->query($tableQuery)->fetchAll(PDO::FETCH_COLUMN, 0); $tables = self::$_db->query($tableQuery)->fetchAll(PDO::FETCH_COLUMN, 0);
// create paste table if necessary // create paste table if necessary
if (!in_array(self::$_prefix . 'paste', $tables)) if (!in_array(self::_sanitizeIdentifier('paste'), $tables))
{ {
self::_createPasteTable(); self::_createPasteTable();
$db_tables_exist = false; $db_tables_exist = false;
} }
// create comment table if necessary // create comment table if necessary
if (!in_array(self::$_prefix . 'comment', $tables)) if (!in_array(self::_sanitizeIdentifier('comment'), $tables))
{ {
self::_createCommentTable(); self::_createCommentTable();
$db_tables_exist = false; $db_tables_exist = false;
@ -117,7 +117,7 @@ class privatebin_db extends privatebin_abstract
// create config table if necessary // create config table if necessary
$db_version = privatebin::VERSION; $db_version = privatebin::VERSION;
if (!in_array(self::$_prefix . 'config', $tables)) if (!in_array(self::_sanitizeIdentifier('config'), $tables))
{ {
self::_createConfigTable(); self::_createConfigTable();
// if we only needed to create the config table, the DB is older then 0.22 // if we only needed to create the config table, the DB is older then 0.22
@ -190,7 +190,8 @@ class privatebin_db extends privatebin_abstract
unset($meta['attachmentname']); unset($meta['attachmentname']);
} }
return self::_exec( return self::_exec(
'INSERT INTO ' . self::$_prefix . 'paste VALUES(?,?,?,?,?,?,?,?,?)', 'INSERT INTO ' . self::_sanitizeIdentifier('paste') .
' VALUES(?,?,?,?,?,?,?,?,?)',
array( array(
$pasteid, $pasteid,
$paste['data'], $paste['data'],
@ -219,8 +220,8 @@ class privatebin_db extends privatebin_abstract
) { ) {
self::$_cache[$pasteid] = false; self::$_cache[$pasteid] = false;
$paste = self::_select( $paste = self::_select(
'SELECT * FROM ' . self::$_prefix . 'paste WHERE dataid = ?', 'SELECT * FROM ' . self::_sanitizeIdentifier('paste') .
array($pasteid), true ' WHERE dataid = ?', array($pasteid), true
); );
if(false !== $paste) { if(false !== $paste) {
@ -279,12 +280,12 @@ class privatebin_db extends privatebin_abstract
public function delete($pasteid) public function delete($pasteid)
{ {
self::_exec( self::_exec(
'DELETE FROM ' . self::$_prefix . 'paste WHERE dataid = ?', 'DELETE FROM ' . self::_sanitizeIdentifier('paste') .
array($pasteid) ' WHERE dataid = ?', array($pasteid)
); );
self::_exec( self::_exec(
'DELETE FROM ' . self::$_prefix . 'comment WHERE pasteid = ?', 'DELETE FROM ' . self::_sanitizeIdentifier('comment') .
array($pasteid) ' WHERE pasteid = ?', array($pasteid)
); );
if ( if (
array_key_exists($pasteid, self::$_cache) array_key_exists($pasteid, self::$_cache)
@ -319,7 +320,8 @@ class privatebin_db extends privatebin_abstract
public function createComment($pasteid, $parentid, $commentid, $comment) public function createComment($pasteid, $parentid, $commentid, $comment)
{ {
return self::_exec( return self::_exec(
'INSERT INTO ' . self::$_prefix . 'comment VALUES(?,?,?,?,?,?,?)', 'INSERT INTO ' . self::_sanitizeIdentifier('comment') .
' VALUES(?,?,?,?,?,?,?)',
array( array(
$commentid, $commentid,
$pasteid, $pasteid,
@ -342,8 +344,8 @@ class privatebin_db extends privatebin_abstract
public function readComments($pasteid) public function readComments($pasteid)
{ {
$rows = self::_select( $rows = self::_select(
'SELECT * FROM ' . self::$_prefix . 'comment WHERE pasteid = ?', 'SELECT * FROM ' . self::_sanitizeIdentifier('comment') .
array($pasteid) ' WHERE pasteid = ?', array($pasteid)
); );
// create comment list // create comment list
@ -381,8 +383,8 @@ class privatebin_db extends privatebin_abstract
public function existsComment($pasteid, $parentid, $commentid) public function existsComment($pasteid, $parentid, $commentid)
{ {
return (bool) self::_select( return (bool) self::_select(
'SELECT dataid FROM ' . self::$_prefix . 'comment ' . 'SELECT dataid FROM ' . self::_sanitizeIdentifier('comment') .
'WHERE pasteid = ? AND parentid = ? AND dataid = ?', ' WHERE pasteid = ? AND parentid = ? AND dataid = ?',
array($pasteid, $parentid, $commentid), true array($pasteid, $parentid, $commentid), true
); );
} }
@ -495,8 +497,8 @@ class privatebin_db extends privatebin_abstract
private static function _getConfig($key) private static function _getConfig($key)
{ {
$row = self::_select( $row = self::_select(
'SELECT value FROM ' . self::$_prefix . 'config WHERE id = ?', 'SELECT value FROM ' . self::_sanitizeIdentifier('config') .
array($key), true ' WHERE id = ?', array($key), true
); );
return $row['value']; return $row['value'];
} }
@ -534,7 +536,7 @@ class privatebin_db extends privatebin_abstract
{ {
list($main_key, $after_key) = self::_getPrimaryKeyClauses(); list($main_key, $after_key) = self::_getPrimaryKeyClauses();
self::$_db->exec( self::$_db->exec(
'CREATE TABLE ' . self::$_prefix . 'paste ( ' . 'CREATE TABLE ' . self::_sanitizeIdentifier('paste') . ' ( ' .
"dataid CHAR(16) NOT NULL$main_key, " . "dataid CHAR(16) NOT NULL$main_key, " .
'data BLOB, ' . 'data BLOB, ' .
'postdate INT, ' . 'postdate INT, ' .
@ -558,7 +560,7 @@ class privatebin_db extends privatebin_abstract
{ {
list($main_key, $after_key) = self::_getPrimaryKeyClauses(); list($main_key, $after_key) = self::_getPrimaryKeyClauses();
self::$_db->exec( self::$_db->exec(
'CREATE TABLE ' . self::$_prefix . 'comment ( ' . 'CREATE TABLE ' . self::_sanitizeIdentifier('comment') . ' ( ' .
"dataid CHAR(16) NOT NULL$main_key, " . "dataid CHAR(16) NOT NULL$main_key, " .
'pasteid CHAR(16), ' . 'pasteid CHAR(16), ' .
'parentid CHAR(16), ' . 'parentid CHAR(16), ' .
@ -568,7 +570,8 @@ class privatebin_db extends privatebin_abstract
"postdate INT$after_key );" "postdate INT$after_key );"
); );
self::$_db->exec( self::$_db->exec(
'CREATE INDEX parent ON ' . self::$_prefix . 'comment(pasteid);' 'CREATE INDEX parent ON ' . self::_sanitizeIdentifier('comment') .
'(pasteid);'
); );
} }
@ -583,15 +586,29 @@ class privatebin_db extends privatebin_abstract
{ {
list($main_key, $after_key) = self::_getPrimaryKeyClauses('id'); list($main_key, $after_key) = self::_getPrimaryKeyClauses('id');
self::$_db->exec( self::$_db->exec(
'CREATE TABLE ' . self::$_prefix . 'config ( ' . 'CREATE TABLE ' . self::_sanitizeIdentifier('config') .
"id CHAR(16) NOT NULL$main_key, value TEXT$after_key );" " ( id CHAR(16) NOT NULL$main_key, value TEXT$after_key );"
); );
self::_exec( self::_exec(
'INSERT INTO ' . self::$_prefix . 'config VALUES(?,?)', 'INSERT INTO ' . self::_sanitizeIdentifier('config') .
' VALUES(?,?)',
array('VERSION', privatebin::VERSION) array('VERSION', privatebin::VERSION)
); );
} }
/**
* sanitizes identifiers
*
* @access private
* @static
* @param string $identifier
* @return string
*/
private static function _sanitizeIdentifier($identifier)
{
return self::$_prefix . preg_replace('/[^A-Za-z0-9_]+/', '', $identifier);
}
/** /**
* upgrade the database schema from an old version * upgrade the database schema from an old version
* *

@ -257,4 +257,4 @@ class request
} }
return false; return false;
} }
} }

@ -91,10 +91,11 @@ class vizhash16x16
// We hash the input string. // We hash the input string.
$hash=hash('sha1',$text.$this->salt).hash('md5',$text.$this->salt); $hash=hash('sha1',$text.$this->salt).hash('md5',$text.$this->salt);
$hash=$hash.strrev($hash); # more data to make graphics $hash=$hash.strrev($hash); # more data to make graphics
$hashlen=strlen($hash);
// We convert the hash into an array of integers. // We convert the hash into an array of integers.
$this->VALUES=array(); $this->VALUES=array();
for($i=0; $i<strlen($hash); $i=$i+2){ array_push($this->VALUES,hexdec(substr($hash,$i,2))); } for($i=0; $i<$hashlen; $i=$i+2){ array_push($this->VALUES,hexdec(substr($hash,$i,2))); }
$this->VALUES_INDEX=0; // to walk the array. $this->VALUES_INDEX=0; // to walk the array.
// Then use these integers to drive the creation of an image. // Then use these integers to drive the creation of an image.

@ -5,7 +5,7 @@
<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('PrivateBin')"}</title> <title>{function="i18n::_('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/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"} <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
@ -34,24 +34,24 @@
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{function="t('Toggle navigation')"}</span> <span class="sr-only">{function="i18n::_('Toggle navigation')"}</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<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('PrivateBin')"}</a> <a class="reloadlink navbar-brand" href="/">{function="i18n::_('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">
<li> <li>
<button id="sendbutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="sendbutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="t('Send')"} <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="i18n::_('Send')"}
</button>{if="$EXPIRECLONE"} </button>{if="$EXPIRECLONE"}
<button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="t('Clone')"} <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="i18n::_('Clone')"}
</button>{/if} </button>{/if}
<button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="t('Raw text')"} <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="i18n::_('Raw text')"}
</button> </button>
</li> </li>
<li class="dropdown"> <li class="dropdown">
@ -59,7 +59,7 @@
{loop="EXPIRE"} {loop="EXPIRE"}
<option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a> <a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="EXPIRE"} {loop="EXPIRE"}
<li> <li>
@ -70,24 +70,24 @@
</ul> </ul>
</li> </li>
<li id="formatter" class="dropdown"> <li id="formatter" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Options')"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Options')"} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="burnafterreadingoption" class="checkbox hidden"> <li id="burnafterreadingoption" class="checkbox hidden">
<label> <label>
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
{function="t('Burn after reading')"} {function="i18n::_('Burn after reading')"}
</label> </label>
</li>{if="$DISCUSSION"} </li>{if="$DISCUSSION"}
<li id="opendisc" class="checkbox hidden"> <li id="opendisc" class="checkbox hidden">
<label> <label>
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} />
{function="t('Open discussion')"} {function="i18n::_('Open discussion')"}
</label> </label>
</li>{/if} </li>{/if}
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li> <li>
<div> <div>
{function="t('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span> {function="i18n::_('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span>
</div> </div>
</li> </li>
{loop="FORMATTER"} {loop="FORMATTER"}
@ -104,11 +104,11 @@
</li>{if="$PASSWORD"} </li>{if="$PASSWORD"}
<li> <li>
<div id="password" class="navbar-form hidden"> <div id="password" class="navbar-form hidden">
<input type="password" id="passwordinput" placeholder="{function="t('Password (recommended)')"}" class="form-control" size="19"/> <input type="password" id="passwordinput" placeholder="{function="i18n::_('Password (recommended)')"}" class="form-control" size="19"/>
</div> </div>
</li>{/if}{if="$FILEUPLOAD"} </li>{/if}{if="$FILEUPLOAD"}
<li id="attach" class="hidden dropdown"> <li id="attach" class="hidden dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Attach a file')"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Attach a file')"} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="filewrap"> <li id="filewrap">
<div> <div>
@ -117,7 +117,7 @@
</li> </li>
<li> <li>
<a id="fileremovebutton" href="#"> <a id="fileremovebutton" href="#">
{function="t('Remove attachment')"} {function="i18n::_('Remove attachment')"}
</a> </a>
</li> </li>
</ul> </ul>
@ -137,7 +137,7 @@
</li>{/if} </li>{/if}
<li> <li>
<button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn"> <button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="t('New')"} <span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="i18n::_('New')"}
</button> </button>
</li> </li>
</ul> </ul>
@ -152,15 +152,15 @@
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</div>{if="$FILEUPLOAD"} </div>{if="$FILEUPLOAD"}
<div id="attachment" role="alert" class="hidden alert alert-info"> <div id="attachment" role="alert" class="hidden alert alert-info">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="t('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="t('Cloned file attached.')"}</span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="i18n::_('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="i18n::_('Cloned file attached.')"}</span>
</div>{/if}{if="strlen($STATUS)"} </div>{/if}{if="strlen($STATUS)"}
<div id="status" role="alert" class="alert alert-success"> <div id="status" role="alert" class="alert alert-success">
<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 PrivateBin 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="i18n::_('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('PrivateBin 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="i18n::_('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="i18n::_('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>,
<a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.google.com/chrome">Chrome</a>,
@ -171,13 +171,13 @@
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink">{if="strlen($URLSHORTENER)"} <div id="pastelink">{if="strlen($URLSHORTENER)"}
<button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-primary"> <button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-primary">
<span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="t('Shorten URL')"} <span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="i18n::_('Shorten URL')"}
</button> </button>
{/if}</div> {/if}</div>
</div> </div>
<ul id="preview" class="nav nav-tabs hidden"> <ul id="preview" class="nav nav-tabs hidden">
<li role="presentation" class="active"><a id="messageedit" href="#">{function="t('Editor')"}</a></li> <li role="presentation" class="active"><a id="messageedit" href="#">{function="i18n::_('Editor')"}</a></li>
<li role="presentation"><a id="messagepreview" href="#">{function="t('Preview')"}</a></li> <li role="presentation"><a id="messagepreview" href="#">{function="i18n::_('Preview')"}</a></li>
</ul> </ul>
</header> </header>
<section class="container"> <section class="container">
@ -192,16 +192,16 @@
</section> </section>
<section class="container"> <section class="container">
<div id="discussion" class="hidden"> <div id="discussion" class="hidden">
<h4>{function="t('Discussion')"}</h4> <h4>{function="i18n::_('Discussion')"}</h4>
<div id="comments"></div> <div id="comments"></div>
</div> </div>
</section> </section>
<footer class="container"> <footer class="container">
<div class="row"> <div class="row">
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4> <h4 class="col-md-5 col-xs-8">{function="i18n::_('PrivateBin')"} <small>- {function="i18n::_('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('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>.')"} {function="i18n::_('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,7 +5,7 @@
<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('PrivateBin')"}</title> <title>{function="i18n::_('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/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"} <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
@ -33,24 +33,24 @@
<nav class="navbar navbar-inverse navbar-static-top"> <nav class="navbar navbar-inverse navbar-static-top">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{function="t('Toggle navigation')"}</span> <span class="sr-only">{function="i18n::_('Toggle navigation')"}</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<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('PrivateBin')"}</a> <a class="reloadlink navbar-brand" href="/">{function="i18n::_('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">
<li> <li>
<button id="sendbutton" type="button" class="hidden btn btn-warning navbar-btn"> <button id="sendbutton" type="button" class="hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="t('Send')"} <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="i18n::_('Send')"}
</button>{if="$EXPIRECLONE"} </button>{if="$EXPIRECLONE"}
<button id="clonebutton" type="button" class="hidden btn btn-warning navbar-btn"> <button id="clonebutton" type="button" class="hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="t('Clone')"} <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="i18n::_('Clone')"}
</button>{/if} </button>{/if}
<button id="rawtextbutton" type="button" class="hidden btn btn-warning navbar-btn"> <button id="rawtextbutton" type="button" class="hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="t('Raw text')"} <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="i18n::_('Raw text')"}
</button> </button>
</li> </li>
<li class="dropdown"> <li class="dropdown">
@ -58,7 +58,7 @@
{loop="EXPIRE"} {loop="EXPIRE"}
<option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a> <a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="EXPIRE"} {loop="EXPIRE"}
<li> <li>
@ -72,7 +72,7 @@
<div id="burnafterreadingoption" class="navbar-text checkbox hidden"> <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
{function="t('Burn after reading')"} {function="i18n::_('Burn after reading')"}
</label> </label>
</div> </div>
</li>{if="$DISCUSSION"} </li>{if="$DISCUSSION"}
@ -80,17 +80,17 @@
<div id="opendisc" class="navbar-text checkbox hidden"> <div id="opendisc" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} />
{function="t('Open discussion')"} {function="i18n::_('Open discussion')"}
</label> </label>
</div> </div>
</li>{/if}{if="$PASSWORD"} </li>{/if}{if="$PASSWORD"}
<li> <li>
<div id="password" class="navbar-form hidden"> <div id="password" class="navbar-form hidden">
<input type="password" id="passwordinput" placeholder="{function="t('Password (recommended)')"}" class="form-control" size="19"/> <input type="password" id="passwordinput" placeholder="{function="i18n::_('Password (recommended)')"}" class="form-control" size="19"/>
</div> </div>
</li>{/if}{if="$FILEUPLOAD"} </li>{/if}{if="$FILEUPLOAD"}
<li id="attach" class="hidden dropdown"> <li id="attach" class="hidden dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Attach a file')"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Attach a file')"} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="filewrap"> <li id="filewrap">
<div> <div>
@ -99,7 +99,7 @@
</li> </li>
<li> <li>
<a id="fileremovebutton" href="#"> <a id="fileremovebutton" href="#">
{function="t('Remove attachment')"} {function="i18n::_('Remove attachment')"}
</a> </a>
</li> </li>
</ul> </ul>
@ -109,7 +109,7 @@
{loop="FORMATTER"} {loop="FORMATTER"}
<option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a> <a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="FORMATTER"} {loop="FORMATTER"}
<li> <li>
@ -134,7 +134,7 @@
</li>{/if} </li>{/if}
<li> <li>
<button id="newbutton" type="button" class="reloadlink hidden btn btn-warning navbar-btn"> <button id="newbutton" type="button" class="reloadlink hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="t('New')"} <span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="i18n::_('New')"}
</button> </button>
</li> </li>
</ul> </ul>
@ -148,15 +148,15 @@
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</div>{if="$FILEUPLOAD"} </div>{if="$FILEUPLOAD"}
<div id="attachment" role="alert" class="hidden alert alert-info"> <div id="attachment" role="alert" class="hidden alert alert-info">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="t('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="t('Cloned file attached.')"}</span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="i18n::_('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="i18n::_('Cloned file attached.')"}</span>
</div>{/if}{if="strlen($STATUS)"} </div>{/if}{if="strlen($STATUS)"}
<div id="status" role="alert" class="alert alert-success"> <div id="status" role="alert" class="alert alert-success">
<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 PrivateBin 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="i18n::_('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('PrivateBin 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="i18n::_('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="i18n::_('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>,
<a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.google.com/chrome">Chrome</a>,
@ -167,13 +167,13 @@
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink">{if="strlen($URLSHORTENER)"} <div id="pastelink">{if="strlen($URLSHORTENER)"}
<button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-warning"> <button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-warning">
<span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="t('Shorten URL')"} <span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="i18n::_('Shorten URL')"}
</button> </button>
{/if}</div> {/if}</div>
</div> </div>
<ul id="preview" class="nav nav-tabs hidden"> <ul id="preview" class="nav nav-tabs hidden">
<li role="presentation" class="active"><a id="messageedit" href="#">{function="t('Editor')"}</a></li> <li role="presentation" class="active"><a id="messageedit" href="#">{function="i18n::_('Editor')"}</a></li>
<li role="presentation"><a id="messagepreview" href="#">{function="t('Preview')"}</a></li> <li role="presentation"><a id="messagepreview" href="#">{function="i18n::_('Preview')"}</a></li>
</ul> </ul>
</header> </header>
<section class="container"> <section class="container">
@ -188,16 +188,16 @@
</section> </section>
<section class="container"> <section class="container">
<div id="discussion" class="hidden"> <div id="discussion" class="hidden">
<h4>{function="t('Discussion')"}</h4> <h4>{function="i18n::_('Discussion')"}</h4>
<div id="comments"></div> <div id="comments"></div>
</div> </div>
</section> </section>
<footer class="container"> <footer class="container">
<div class="row"> <div class="row">
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4> <h4 class="col-md-5 col-xs-8">{function="i18n::_('PrivateBin')"} <small>- {function="i18n::_('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('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>.')"} {function="i18n::_('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,7 +5,7 @@
<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('PrivateBin')"}</title> <title>{function="i18n::_('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/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"} <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
@ -33,24 +33,24 @@
<nav class="navbar navbar-inverse navbar-static-top"> <nav class="navbar navbar-inverse navbar-static-top">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{function="t('Toggle navigation')"}</span> <span class="sr-only">{function="i18n::_('Toggle navigation')"}</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<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('PrivateBin')"}</a> <a class="reloadlink navbar-brand" href="/">{function="i18n::_('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">
<li> <li>
<button id="newbutton" type="button" class="reloadlink hidden btn btn-warning navbar-btn"> <button id="newbutton" type="button" class="reloadlink hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="t('New')"} <span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="i18n::_('New')"}
</button>{if="$EXPIRECLONE"} </button>{if="$EXPIRECLONE"}
<button id="clonebutton" type="button" class="hidden btn btn-warning navbar-btn"> <button id="clonebutton" type="button" class="hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="t('Clone')"} <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="i18n::_('Clone')"}
</button>{/if} </button>{/if}
<button id="rawtextbutton" type="button" class="hidden btn btn-warning navbar-btn"> <button id="rawtextbutton" type="button" class="hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="t('Raw text')"} <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="i18n::_('Raw text')"}
</button> </button>
</li> </li>
<li class="dropdown"> <li class="dropdown">
@ -58,7 +58,7 @@
{loop="EXPIRE"} {loop="EXPIRE"}
<option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a> <a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="EXPIRE"} {loop="EXPIRE"}
<li> <li>
@ -72,7 +72,7 @@
<div id="burnafterreadingoption" class="navbar-text checkbox hidden"> <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
{function="t('Burn after reading')"} {function="i18n::_('Burn after reading')"}
</label> </label>
</div> </div>
</li>{if="$DISCUSSION"} </li>{if="$DISCUSSION"}
@ -80,17 +80,17 @@
<div id="opendisc" class="navbar-text checkbox hidden"> <div id="opendisc" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} />
{function="t('Open discussion')"} {function="i18n::_('Open discussion')"}
</label> </label>
</div> </div>
</li>{/if}{if="$PASSWORD"} </li>{/if}{if="$PASSWORD"}
<li> <li>
<div id="password" class="navbar-form hidden"> <div id="password" class="navbar-form hidden">
<input type="password" id="passwordinput" placeholder="{function="t('Password (recommended)')"}" class="form-control" size="19"/> <input type="password" id="passwordinput" placeholder="{function="i18n::_('Password (recommended)')"}" class="form-control" size="19"/>
</div> </div>
</li>{/if}{if="$FILEUPLOAD"} </li>{/if}{if="$FILEUPLOAD"}
<li id="attach" class="hidden dropdown"> <li id="attach" class="hidden dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Attach a file')"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Attach a file')"} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="filewrap"> <li id="filewrap">
<div> <div>
@ -99,7 +99,7 @@
</li> </li>
<li> <li>
<a id="fileremovebutton" href="#"> <a id="fileremovebutton" href="#">
{function="t('Remove attachment')"} {function="i18n::_('Remove attachment')"}
</a> </a>
</li> </li>
</ul> </ul>
@ -109,7 +109,7 @@
{loop="FORMATTER"} {loop="FORMATTER"}
<option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a> <a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="FORMATTER"} {loop="FORMATTER"}
<li> <li>
@ -134,7 +134,7 @@
</li>{/if} </li>{/if}
<li> <li>
<button id="sendbutton" type="button" class="hidden btn btn-warning navbar-btn"> <button id="sendbutton" type="button" class="hidden btn btn-warning navbar-btn">
<span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="t('Send')"} <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="i18n::_('Send')"}
</button> </button>
</li> </li>
</ul> </ul>
@ -148,15 +148,15 @@
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</div>{if="$FILEUPLOAD"} </div>{if="$FILEUPLOAD"}
<div id="attachment" role="alert" class="hidden alert alert-info"> <div id="attachment" role="alert" class="hidden alert alert-info">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="t('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="t('Cloned file attached.')"}</span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="i18n::_('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="i18n::_('Cloned file attached.')"}</span>
</div>{/if}{if="strlen($STATUS)"} </div>{/if}{if="strlen($STATUS)"}
<div id="status" role="alert" class="alert alert-success"> <div id="status" role="alert" class="alert alert-success">
<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 PrivateBin 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="i18n::_('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('PrivateBin 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="i18n::_('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="i18n::_('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>,
<a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.google.com/chrome">Chrome</a>,
@ -167,13 +167,13 @@
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink">{if="strlen($URLSHORTENER)"} <div id="pastelink">{if="strlen($URLSHORTENER)"}
<button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-warning"> <button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-warning">
<span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="t('Shorten URL')"} <span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="i18n::_('Shorten URL')"}
</button> </button>
{/if}</div> {/if}</div>
</div> </div>
<ul id="preview" class="nav nav-tabs hidden"> <ul id="preview" class="nav nav-tabs hidden">
<li role="presentation" class="active"><a id="messageedit" href="#">{function="t('Editor')"}</a></li> <li role="presentation" class="active"><a id="messageedit" href="#">{function="i18n::_('Editor')"}</a></li>
<li role="presentation"><a id="messagepreview" href="#">{function="t('Preview')"}</a></li> <li role="presentation"><a id="messagepreview" href="#">{function="i18n::_('Preview')"}</a></li>
</ul> </ul>
</header> </header>
<section class="container"> <section class="container">
@ -188,16 +188,16 @@
</section> </section>
<section class="container"> <section class="container">
<div id="discussion" class="hidden"> <div id="discussion" class="hidden">
<h4>{function="t('Discussion')"}</h4> <h4>{function="i18n::_('Discussion')"}</h4>
<div id="comments"></div> <div id="comments"></div>
</div> </div>
</section> </section>
<footer class="container"> <footer class="container">
<div class="row"> <div class="row">
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4> <h4 class="col-md-5 col-xs-8">{function="i18n::_('PrivateBin')"} <small>- {function="i18n::_('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('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>.')"} {function="i18n::_('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,7 +5,7 @@
<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('PrivateBin')"}</title> <title>{function="i18n::_('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/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"} <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
@ -33,24 +33,24 @@
<nav class="navbar navbar-default navbar-static-top"> <nav class="navbar navbar-default navbar-static-top">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{function="t('Toggle navigation')"}</span> <span class="sr-only">{function="i18n::_('Toggle navigation')"}</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<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('PrivateBin')"}</a> <a class="reloadlink navbar-brand" href="/">{function="i18n::_('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">
<li> <li>
<button id="sendbutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="sendbutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="t('Send')"} <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="i18n::_('Send')"}
</button>{if="$EXPIRECLONE"} </button>{if="$EXPIRECLONE"}
<button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="t('Clone')"} <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="i18n::_('Clone')"}
</button>{/if} </button>{/if}
<button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="t('Raw text')"} <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="i18n::_('Raw text')"}
</button> </button>
</li> </li>
<li class="dropdown"> <li class="dropdown">
@ -58,7 +58,7 @@
{loop="EXPIRE"} {loop="EXPIRE"}
<option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a> <a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="EXPIRE"} {loop="EXPIRE"}
<li> <li>
@ -72,7 +72,7 @@
<div id="burnafterreadingoption" class="navbar-text checkbox hidden"> <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
{function="t('Burn after reading')"} {function="i18n::_('Burn after reading')"}
</label> </label>
</div> </div>
</li>{if="$DISCUSSION"} </li>{if="$DISCUSSION"}
@ -80,17 +80,17 @@
<div id="opendisc" class="navbar-text checkbox hidden"> <div id="opendisc" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} />
{function="t('Open discussion')"} {function="i18n::_('Open discussion')"}
</label> </label>
</div> </div>
</li>{/if}{if="$PASSWORD"} </li>{/if}{if="$PASSWORD"}
<li> <li>
<div id="password" class="navbar-form hidden"> <div id="password" class="navbar-form hidden">
<input type="password" id="passwordinput" placeholder="{function="t('Password (recommended)')"}" class="form-control" size="19"/> <input type="password" id="passwordinput" placeholder="{function="i18n::_('Password (recommended)')"}" class="form-control" size="19"/>
</div> </div>
</li>{/if}{if="$FILEUPLOAD"} </li>{/if}{if="$FILEUPLOAD"}
<li id="attach" class="hidden dropdown"> <li id="attach" class="hidden dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Attach a file')"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Attach a file')"} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="filewrap"> <li id="filewrap">
<div> <div>
@ -99,7 +99,7 @@
</li> </li>
<li> <li>
<a id="fileremovebutton" href="#"> <a id="fileremovebutton" href="#">
{function="t('Remove attachment')"} {function="i18n::_('Remove attachment')"}
</a> </a>
</li> </li>
</ul> </ul>
@ -109,7 +109,7 @@
{loop="FORMATTER"} {loop="FORMATTER"}
<option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a> <a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="FORMATTER"} {loop="FORMATTER"}
<li> <li>
@ -134,7 +134,7 @@
</li>{/if} </li>{/if}
<li> <li>
<button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn"> <button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="t('New')"} <span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="i18n::_('New')"}
</button> </button>
</li> </li>
</ul> </ul>
@ -148,15 +148,15 @@
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</div>{if="$FILEUPLOAD"} </div>{if="$FILEUPLOAD"}
<div id="attachment" role="alert" class="hidden alert alert-info"> <div id="attachment" role="alert" class="hidden alert alert-info">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="t('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="t('Cloned file attached.')"}</span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="i18n::_('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="i18n::_('Cloned file attached.')"}</span>
</div>{/if}{if="strlen($STATUS)"} </div>{/if}{if="strlen($STATUS)"}
<div id="status" role="alert" class="alert alert-success"> <div id="status" role="alert" class="alert alert-success">
<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 PrivateBin 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="i18n::_('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('PrivateBin 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="i18n::_('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="i18n::_('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>,
<a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.google.com/chrome">Chrome</a>,
@ -167,13 +167,13 @@
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink">{if="strlen($URLSHORTENER)"} <div id="pastelink">{if="strlen($URLSHORTENER)"}
<button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-primary"> <button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-primary">
<span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="t('Shorten URL')"} <span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="i18n::_('Shorten URL')"}
</button> </button>
{/if}</div> {/if}</div>
</div> </div>
<ul id="preview" class="nav nav-tabs hidden"> <ul id="preview" class="nav nav-tabs hidden">
<li role="presentation" class="active"><a id="messageedit" href="#">{function="t('Editor')"}</a></li> <li role="presentation" class="active"><a id="messageedit" href="#">{function="i18n::_('Editor')"}</a></li>
<li role="presentation"><a id="messagepreview" href="#">{function="t('Preview')"}</a></li> <li role="presentation"><a id="messagepreview" href="#">{function="i18n::_('Preview')"}</a></li>
</ul> </ul>
</header> </header>
<section class="container"> <section class="container">
@ -188,16 +188,16 @@
</section> </section>
<section class="container"> <section class="container">
<div id="discussion" class="hidden"> <div id="discussion" class="hidden">
<h4>{function="t('Discussion')"}</h4> <h4>{function="i18n::_('Discussion')"}</h4>
<div id="comments"></div> <div id="comments"></div>
</div> </div>
</section> </section>
<footer class="container"> <footer class="container">
<div class="row"> <div class="row">
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4> <h4 class="col-md-5 col-xs-8">{function="i18n::_('PrivateBin')"} <small>- {function="i18n::_('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('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>.')"} {function="i18n::_('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,7 +5,7 @@
<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('PrivateBin')"}</title> <title>{function="i18n::_('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/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"} <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?{$VERSION|rawurlencode}" />{if="$SYNTAXHIGHLIGHTING"}
@ -33,24 +33,24 @@
<nav class="navbar navbar-default navbar-static-top"> <nav class="navbar navbar-default navbar-static-top">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{function="t('Toggle navigation')"}</span> <span class="sr-only">{function="i18n::_('Toggle navigation')"}</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<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('PrivateBin')"}</a> <a class="reloadlink navbar-brand" href="/">{function="i18n::_('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">
<li> <li>
<button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn"> <button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="t('New')"} <span class="glyphicon glyphicon-file" aria-hidden="true"></span> {function="i18n::_('New')"}
</button>{if="$EXPIRECLONE"} </button>{if="$EXPIRECLONE"}
<button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="t('Clone')"} <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> {function="i18n::_('Clone')"}
</button>{/if} </button>{/if}
<button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn"> <button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn">
<span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="t('Raw text')"} <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> {function="i18n::_('Raw text')"}
</button> </button>
</li> </li>
<li class="dropdown"> <li class="dropdown">
@ -58,7 +58,7 @@
{loop="EXPIRE"} {loop="EXPIRE"}
<option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a> <a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Expires')"}: <span id="pasteExpirationDisplay">{$EXPIRE[$EXPIREDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="EXPIRE"} {loop="EXPIRE"}
<li> <li>
@ -72,7 +72,7 @@
<div id="burnafterreadingoption" class="navbar-text checkbox hidden"> <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
{function="t('Burn after reading')"} {function="i18n::_('Burn after reading')"}
</label> </label>
</div> </div>
</li>{if="$DISCUSSION"} </li>{if="$DISCUSSION"}
@ -80,17 +80,17 @@
<div id="opendisc" class="navbar-text checkbox hidden"> <div id="opendisc" class="navbar-text checkbox hidden">
<label> <label>
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} />
{function="t('Open discussion')"} {function="i18n::_('Open discussion')"}
</label> </label>
</div> </div>
</li>{/if}{if="$PASSWORD"} </li>{/if}{if="$PASSWORD"}
<li> <li>
<div id="password" class="navbar-form hidden"> <div id="password" class="navbar-form hidden">
<input type="password" id="passwordinput" placeholder="{function="t('Password (recommended)')"}" class="form-control" size="19"/> <input type="password" id="passwordinput" placeholder="{function="i18n::_('Password (recommended)')"}" class="form-control" size="19"/>
</div> </div>
</li>{/if}{if="$FILEUPLOAD"} </li>{/if}{if="$FILEUPLOAD"}
<li id="attach" class="hidden dropdown"> <li id="attach" class="hidden dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Attach a file')"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Attach a file')"} <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="filewrap"> <li id="filewrap">
<div> <div>
@ -99,7 +99,7 @@
</li> </li>
<li> <li>
<a id="fileremovebutton" href="#"> <a id="fileremovebutton" href="#">
{function="t('Remove attachment')"} {function="i18n::_('Remove attachment')"}
</a> </a>
</li> </li>
</ul> </ul>
@ -109,7 +109,7 @@
{loop="FORMATTER"} {loop="FORMATTER"}
<option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
</select> </select>
<a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="t('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a> <a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{function="i18n::_('Format')"}: <span id="pasteFormatterDisplay">{$FORMATTER[$FORMATTERDEFAULT]}</span> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{loop="FORMATTER"} {loop="FORMATTER"}
<li> <li>
@ -134,7 +134,7 @@
</li>{/if} </li>{/if}
<li> <li>
<button id="sendbutton" type="button" class="hidden btn btn-primary navbar-btn"> <button id="sendbutton" type="button" class="hidden btn btn-primary navbar-btn">
<span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="t('Send')"} <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> {function="i18n::_('Send')"}
</button> </button>
</li> </li>
</ul> </ul>
@ -148,15 +148,15 @@
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</div>{if="$FILEUPLOAD"} </div>{if="$FILEUPLOAD"}
<div id="attachment" role="alert" class="hidden alert alert-info"> <div id="attachment" role="alert" class="hidden alert alert-info">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="t('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="t('Cloned file attached.')"}</span> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a>{function="i18n::_('Download attachment')"}</a> <span id="clonedfile" class="hidden">{function="i18n::_('Cloned file attached.')"}</span>
</div>{/if}{if="strlen($STATUS)"} </div>{/if}{if="strlen($STATUS)"}
<div id="status" role="alert" class="alert alert-success"> <div id="status" role="alert" class="alert alert-success">
<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 PrivateBin 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="i18n::_('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('PrivateBin 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="i18n::_('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="i18n::_('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>,
<a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.google.com/chrome">Chrome</a>,
@ -167,13 +167,13 @@
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink">{if="strlen($URLSHORTENER)"} <div id="pastelink">{if="strlen($URLSHORTENER)"}
<button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-primary"> <button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}" type="button" class="btn btn-primary">
<span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="t('Shorten URL')"} <span class="glyphicon glyphicon-send" aria-hidden="true"></span> {function="i18n::_('Shorten URL')"}
</button> </button>
{/if}</div> {/if}</div>
</div> </div>
<ul id="preview" class="nav nav-tabs hidden"> <ul id="preview" class="nav nav-tabs hidden">
<li role="presentation" class="active"><a id="messageedit" href="#">{function="t('Editor')"}</a></li> <li role="presentation" class="active"><a id="messageedit" href="#">{function="i18n::_('Editor')"}</a></li>
<li role="presentation"><a id="messagepreview" href="#">{function="t('Preview')"}</a></li> <li role="presentation"><a id="messagepreview" href="#">{function="i18n::_('Preview')"}</a></li>
</ul> </ul>
</header> </header>
<section class="container"> <section class="container">
@ -188,16 +188,16 @@
</section> </section>
<section class="container"> <section class="container">
<div id="discussion" class="hidden"> <div id="discussion" class="hidden">
<h4>{function="t('Discussion')"}</h4> <h4>{function="i18n::_('Discussion')"}</h4>
<div id="comments"></div> <div id="comments"></div>
</div> </div>
</section> </section>
<footer class="container"> <footer class="container">
<div class="row"> <div class="row">
<h4 class="col-md-5 col-xs-8">{function="t('PrivateBin')"} <small>- {function="t('Because ignorance is bliss')"}</small></h4> <h4 class="col-md-5 col-xs-8">{function="i18n::_('PrivateBin')"} <small>- {function="i18n::_('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('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>.')"} {function="i18n::_('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,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
<title>{function="t('PrivateBin')"}</title> <title>{function="i18n::_('PrivateBin')"}</title>
<link type="text/css" rel="stylesheet" href="css/privatebin.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}
@ -27,15 +27,15 @@
<body> <body>
<header> <header>
<div id="aboutbox"> <div id="aboutbox">
{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)"} {function="i18n::_('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('PrivateBin')"}</h1><br /> <h1 class="title reloadlink">{function="i18n::_('PrivateBin')"}</h1><br />
<h2 class="title">{function="t('Because ignorance is bliss')"}</h2><br /> <h2 class="title">{function="i18n::_('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 PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript> <noscript><div id="noscript" class="nonworking">{function="i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.')"}</div></noscript>
<div id="oldienotice" class="nonworking">{function="t('PrivateBin requires a modern browser to work.')"}</div> <div id="oldienotice" class="nonworking">{function="i18n::_('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="i18n::_('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>,
<a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.google.com/chrome">Chrome</a>,
@ -47,11 +47,11 @@
<div id="status">{$STATUS|htmlspecialchars}</div> <div id="status">{$STATUS|htmlspecialchars}</div>
<div id="errormessage" class="hidden">{$ERROR|htmlspecialchars}</div> <div id="errormessage" class="hidden">{$ERROR|htmlspecialchars}</div>
<div id="toolbar"> <div id="toolbar">
<button id="newbutton" class="reloadlink hidden"><img src="img/icon_new.png" width="11" height="15" alt="" />{function="t('New')"}</button> <button id="newbutton" class="reloadlink hidden"><img src="img/icon_new.png" width="11" height="15" alt="" />{function="i18n::_('New')"}</button>
<button id="sendbutton" class="hidden"><img src="img/icon_send.png" width="18" height="15" alt="" />{function="t('Send')"}</button>{if="$EXPIRECLONE"} <button id="sendbutton" class="hidden"><img src="img/icon_send.png" width="18" height="15" alt="" />{function="i18n::_('Send')"}</button>{if="$EXPIRECLONE"}
<button id="clonebutton" class="hidden"><img src="img/icon_clone.png" width="15" height="17" alt="" />{function="t('Clone')"}</button>{/if} <button id="clonebutton" class="hidden"><img src="img/icon_clone.png" width="15" height="17" alt="" />{function="i18n::_('Clone')"}</button>{/if}
<button id="rawtextbutton" class="hidden"><img src="img/icon_raw.png" width="15" height="15" alt="" />{function="t('Raw text')"}</button> <button id="rawtextbutton" class="hidden"><img src="img/icon_raw.png" width="15" height="15" alt="" />{function="i18n::_('Raw text')"}</button>
<div id="expiration" class="hidden button">{function="t('Expires')"}: <div id="expiration" class="hidden button">{function="i18n::_('Expires')"}:
<select id="pasteExpiration" name="pasteExpiration"> <select id="pasteExpiration" name="pasteExpiration">
{loop="EXPIRE"} {loop="EXPIRE"}
<option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $EXPIREDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
@ -60,16 +60,16 @@
<div id="remainingtime" class="hidden"></div> <div id="remainingtime" class="hidden"></div>
<div id="burnafterreadingoption" class="button hidden"> <div id="burnafterreadingoption" class="button hidden">
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
<label for="burnafterreading">{function="t('Burn after reading')"}</label> <label for="burnafterreading">{function="i18n::_('Burn after reading')"}</label>
</div>{if="$DISCUSSION"} </div>{if="$DISCUSSION"}
<div id="opendisc" class="button hidden"> <div id="opendisc" class="button hidden">
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="$OPENDISCUSSION"} checked="checked"{/if} />
<label for="opendiscussion" {if="!$OPENDISCUSSION"} style="color: #BBBBBB;"{/if}>{function="t('Open discussion')"}</label> <label for="opendiscussion" {if="!$OPENDISCUSSION"} style="color: #BBBBBB;"{/if}>{function="i18n::_('Open discussion')"}</label>
</div>{/if}{if="$PASSWORD"} </div>{/if}{if="$PASSWORD"}
<div id="password" class="hidden"> <div id="password" class="hidden">
<input type="password" id="passwordinput" placeholder="{function="t('Password (recommended)')"}" size="32" /> <input type="password" id="passwordinput" placeholder="{function="i18n::_('Password (recommended)')"}" size="32" />
</div>{/if} </div>{/if}
<div id="formatter" class="button hidden">{function="t('Format')"}: <div id="formatter" class="button hidden">{function="i18n::_('Format')"}:
<select id="pasteFormatter" name="pasteFormatter"> <select id="pasteFormatter" name="pasteFormatter">
{loop="FORMATTER"} {loop="FORMATTER"}
<option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop} <option value="{$key}"{if="$key == $FORMATTERDEFAULT"} selected="selected"{/if}>{$value}</option>{/loop}
@ -85,18 +85,18 @@
<div id="pasteresult" class="hidden"> <div id="pasteresult" class="hidden">
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink">{if="strlen($URLSHORTENER)"} <div id="pastelink">{if="strlen($URLSHORTENER)"}
<button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}"><img src="img/icon_shorten.png" width="13" height="15" />{function="t('Shorten URL')"}</button> <button id="shortenbutton" data-shortener="{$URLSHORTENER|htmlspecialchars}"><img src="img/icon_shorten.png" width="13" height="15" />{function="i18n::_('Shorten URL')"}</button>
{/if}</div> {/if}</div>
</div>{if="$FILEUPLOAD"} </div>{if="$FILEUPLOAD"}
<div id="attachment" class="hidden"><a>{function="t('Download attachment')"}</a></div> <div id="attachment" class="hidden"><a>{function="i18n::_('Download attachment')"}</a></div>
<div id="attach" class="hidden"> <div id="attach" class="hidden">
<span id="clonedfile" class="hidden">{function="t('Cloned file attached.')"}</span> <span id="clonedfile" class="hidden">{function="i18n::_('Cloned file attached.')"}</span>
<span id="filewrap">{function="t('Attach a file')"}: <input type="file" id="file" name="file" /></span> <span id="filewrap">{function="i18n::_('Attach a file')"}: <input type="file" id="file" name="file" /></span>
<button id="fileremovebutton">{function="t('Remove attachment')"}</button> <button id="fileremovebutton">{function="i18n::_('Remove attachment')"}</button>
</div>{/if} </div>{/if}
<div id="preview" class="hidden"> <div id="preview" class="hidden">
<button id="messageedit">{function="t('Editor')"}</button> <button id="messageedit">{function="i18n::_('Editor')"}</button>
<button id="messagepreview">{function="t('Preview')"}</button> <button id="messagepreview">{function="i18n::_('Preview')"}</button>
</div> </div>
<div id="image" class="hidden"></div> <div id="image" class="hidden"></div>
<div id="prettymessage" class="hidden"> <div id="prettymessage" class="hidden">
@ -108,7 +108,7 @@
</section> </section>
<section> <section>
<div id="discussion" class="hidden"> <div id="discussion" class="hidden">
<h4 class="title">{function="t('Discussion')"}</h4> <h4 class="title">{function="i18n::_('Discussion')"}</h4>
<div id="comments"></div> <div id="comments"></div>
</div> </div>
</section> </section>

@ -1,59 +1,15 @@
<?php <?php
class configurationTest extends PHPUnit_Framework_TestCase class configurationTest extends PHPUnit_Framework_TestCase
{ {
private $_options = array( private $_options;
'main' => array(
'discussion' => true,
'opendiscussion' => false,
'password' => true,
'fileupload' => false,
'burnafterreadingselected' => false,
'defaultformatter' => 'plaintext',
'syntaxhighlightingtheme' => null,
'sizelimit' => 2097152,
'template' => 'bootstrap',
'notice' => '',
'languageselection' => false,
'languagedefault' => '',
'urlshortener' => '',
'zerobincompatibility' => false,
),
'expire' => array(
'default' => '1week',
'clone' => true,
),
'expire_options' => array(
'5min' => 300,
'10min' => 600,
'1hour' => 3600,
'1day' => 86400,
'1week' => 604800,
'1month' => 2592000,
'1year' => 31536000,
'never' => 0,
),
'formatter_options' => array(
'plaintext' => 'Plain Text',
'syntaxhighlighting' => 'Source Code',
'markdown' => 'Markdown',
),
'traffic' => array(
'limit' => 10,
'header' => null,
'dir' => '../data',
),
'model' => array(
'class' => 'privatebin_data',
),
'model_options' => array(
'dir' => '../data',
),
);
public function setUp() public function setUp()
{ {
/* Setup Routine */ /* Setup Routine */
helper::confBackup(); helper::confBackup();
$this->_options = configuration::getDefaults();
$this->_options['model_options']['dir'] = PATH . $this->_options['model_options']['dir'];
$this->_options['traffic']['dir'] = PATH . $this->_options['traffic']['dir'];
} }
public function tearDown() public function tearDown()

@ -208,4 +208,4 @@ class modelTest extends PHPUnit_Framework_TestCase
$paste->store(); $paste->store();
$paste->getComment(helper::getPasteId())->delete(); $paste->getComment(helper::getPasteId())->delete();
} }
} }

@ -40,4 +40,4 @@ class privatebinWithDbTest extends privatebinTest
helper::confBackup(); helper::confBackup();
helper::createIniFile(CONF, $options); helper::createIniFile(CONF, $options);
} }
} }

@ -150,4 +150,4 @@ class requestTest extends PHPUnit_Framework_TestCase
$this->assertEquals('foo', $request->getParam('pasteid')); $this->assertEquals('foo', $request->getParam('pasteid'));
$this->assertEquals('read', $request->getOperation()); $this->assertEquals('read', $request->getOperation());
} }
} }

Loading…
Cancel
Save