fixing documentation inconsitencies found by Scrutinizer CI
This commit is contained in:
parent
151005e6b8
commit
5f09264625
|
@ -75,23 +75,23 @@ $(function() {
|
||||||
*
|
*
|
||||||
* @name helper.hashToParameterString
|
* @name helper.hashToParameterString
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} associative_array - Object to be serialized
|
* @param {Object} hashMap - Object to be serialized
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
hashToParameterString: function(associativeArray)
|
hashToParameterString: function(hashMap)
|
||||||
{
|
{
|
||||||
var parameterString = '';
|
var parameterString = '';
|
||||||
for (var key in associativeArray)
|
for (var key in hashMap)
|
||||||
{
|
{
|
||||||
if(parameterString === '')
|
if(parameterString === '')
|
||||||
{
|
{
|
||||||
parameterString = encodeURIComponent(key);
|
parameterString = encodeURIComponent(key);
|
||||||
parameterString += '=' + encodeURIComponent(associativeArray[key]);
|
parameterString += '=' + encodeURIComponent(hashMap[key]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parameterString += '&' + encodeURIComponent(key);
|
parameterString += '&' + encodeURIComponent(key);
|
||||||
parameterString += '=' + encodeURIComponent(associativeArray[key]);
|
parameterString += '=' + encodeURIComponent(hashMap[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// padding for URL shorteners
|
// padding for URL shorteners
|
||||||
|
@ -105,8 +105,8 @@ $(function() {
|
||||||
*
|
*
|
||||||
* @name helper.parameterStringToHash
|
* @name helper.parameterStringToHash
|
||||||
* @function
|
* @function
|
||||||
* @param {string} parameter_string - String containing parameters
|
* @param {string} parameterString - String containing parameters
|
||||||
* @return {Object}
|
* @return {Object} hash map
|
||||||
*/
|
*/
|
||||||
parameterStringToHash: function(parameterString)
|
parameterStringToHash: function(parameterString)
|
||||||
{
|
{
|
||||||
|
@ -267,9 +267,9 @@ $(function() {
|
||||||
{
|
{
|
||||||
args = arguments[0];
|
args = arguments[0];
|
||||||
}
|
}
|
||||||
var string = args[0],
|
var format = args[0],
|
||||||
i = 1;
|
i = 1;
|
||||||
return string.replace(/%((%)|s|d)/g, function (m) {
|
return format.replace(/%((%)|s|d)/g, function (m) {
|
||||||
// m is the matched format, e.g. %s, %d
|
// m is the matched format, e.g. %s, %d
|
||||||
var val;
|
var val;
|
||||||
if (m[2]) {
|
if (m[2]) {
|
||||||
|
@ -538,7 +538,7 @@ $(function() {
|
||||||
*
|
*
|
||||||
* @name filter.decompress
|
* @name filter.decompress
|
||||||
* @function
|
* @function
|
||||||
* @param {string} base64 data
|
* @param {string} data - base64 data
|
||||||
* @return {string} message
|
* @return {string} message
|
||||||
*/
|
*/
|
||||||
decompress: function(data)
|
decompress: function(data)
|
||||||
|
@ -554,7 +554,7 @@ $(function() {
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {string} password
|
* @param {string} password
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
* @return {string} JSON with encrypted data
|
* @return {string} data - JSON with encrypted data
|
||||||
*/
|
*/
|
||||||
cipher: function(key, password, message)
|
cipher: function(key, password, message)
|
||||||
{
|
{
|
||||||
|
@ -574,7 +574,7 @@ $(function() {
|
||||||
* @function
|
* @function
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {string} password
|
* @param {string} password
|
||||||
* @param {string} JSON with encrypted data
|
* @param {string} data - JSON with encrypted data
|
||||||
* @return {string} decrypted message
|
* @return {string} decrypted message
|
||||||
*/
|
*/
|
||||||
decipher: function(key, password, data)
|
decipher: function(key, password, data)
|
||||||
|
@ -1569,17 +1569,6 @@ $(function() {
|
||||||
this.fileWrap.removeClass('hidden');
|
this.fileWrap.removeClass('hidden');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* focus on the modal password dialog
|
|
||||||
*
|
|
||||||
* @name privatebin.focusPasswordModal
|
|
||||||
* @function
|
|
||||||
*/
|
|
||||||
focusPasswordModal: function()
|
|
||||||
{
|
|
||||||
this.passwordDecrypt.focus();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* decrypt using the password from the modal dialog
|
* decrypt using the password from the modal dialog
|
||||||
*
|
*
|
||||||
|
@ -1701,7 +1690,7 @@ $(function() {
|
||||||
$('#language select option').click($.proxy(this.setLanguage, this));
|
$('#language select option').click($.proxy(this.setLanguage, this));
|
||||||
|
|
||||||
// handle modal password request on decryption
|
// handle modal password request on decryption
|
||||||
this.passwordModal.on('shown.bs.modal', $.proxy(this.focusPasswordModal, this));
|
this.passwordModal.on('shown.bs.modal', $.proxy(this.passwordDecrypt.focus, this));
|
||||||
this.passwordModal.on('hidden.bs.modal', $.proxy(this.decryptPasswordModal, this));
|
this.passwordModal.on('hidden.bs.modal', $.proxy(this.decryptPasswordModal, this));
|
||||||
this.passwordForm.submit($.proxy(this.submitPasswordModal, this));
|
this.passwordForm.submit($.proxy(this.submitPasswordModal, this));
|
||||||
},
|
},
|
||||||
|
|
|
@ -69,7 +69,7 @@ if ($MARKDOWN):
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-1zupZE5lWp4uoOxMgRfUbLFcTyLl63q8sQAZFEhxWfFmMB0XMgJwbmAhPBOt+haGvNX3ZnzFNUVF6fNB2m+NPw==" crossorigin="anonymous"></script>
|
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-n74tkij+nVUsfoO68TgNUptNTTGxVeeuMPD59XjP2yKnAnpWKQJ2GM5qZVGbtiOCc02F1IH49tJRgAyZGHETlA==" crossorigin="anonymous"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
|
@ -47,7 +47,7 @@ if ($MARKDOWN):
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-1zupZE5lWp4uoOxMgRfUbLFcTyLl63q8sQAZFEhxWfFmMB0XMgJwbmAhPBOt+haGvNX3ZnzFNUVF6fNB2m+NPw==" crossorigin="anonymous"></script>
|
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-n74tkij+nVUsfoO68TgNUptNTTGxVeeuMPD59XjP2yKnAnpWKQJ2GM5qZVGbtiOCc02F1IH49tJRgAyZGHETlA==" crossorigin="anonymous"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
Loading…
Reference in New Issue