mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 09:49:14 +02:00
avoid undefined variable warning
This commit is contained in:
parent
f495aa2cfc
commit
99265e5464
1 changed files with 17 additions and 17 deletions
|
@ -292,27 +292,27 @@ EOT, PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('adata', $paste)) {
|
if (array_key_exists('adata', $paste)) {
|
||||||
$format = $paste['adata'][Paste::ADATA_FORMATTER];
|
switch ($paste['adata'][Paste::ADATA_FORMATTER]) {
|
||||||
$discussion = $paste['adata'][Paste::ADATA_OPEN_DISCUSSION];
|
case 'plaintext':
|
||||||
$burn = $paste['adata'][Paste::ADATA_BURN_AFTER_READING];
|
++$counters['plain'];
|
||||||
|
break;
|
||||||
|
case 'syntaxhighlighting':
|
||||||
|
++$counters['syntax'];
|
||||||
|
break;
|
||||||
|
case 'markdown':
|
||||||
|
++$counters['md'];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
++$counters['unknown'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$counters['discussion'] += (int) $paste['adata'][Paste::ADATA_OPEN_DISCUSSION];
|
||||||
|
$counters['burn'] += (int) $paste['adata'][Paste::ADATA_BURN_AFTER_READING];
|
||||||
} else {
|
} else {
|
||||||
echo "Unsupported v1 document ", $pasteid, PHP_EOL;
|
echo "Unsupported v1 paste ", $pasteid, PHP_EOL;
|
||||||
++$counters['legacy'];
|
++$counters['legacy'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($format === 'plaintext') {
|
|
||||||
++$counters['plain'];
|
|
||||||
} elseif ($format === 'syntaxhighlighting') {
|
|
||||||
++$counters['syntax'];
|
|
||||||
} elseif ($format === 'markdown') {
|
|
||||||
++$counters['md'];
|
|
||||||
} else {
|
|
||||||
++$counters['unknown'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$counters['discussion'] += (int) $discussion;
|
|
||||||
$counters['burn'] += (int) $burn;
|
|
||||||
|
|
||||||
// display progress
|
// display progress
|
||||||
if ($counters['progress'] % $dots === 0) {
|
if ($counters['progress'] % $dots === 0) {
|
||||||
echo '.';
|
echo '.';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue