aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index 37d185ce6..2bcbdd1c0 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2174,6 +2174,9 @@ function layout_select($channel_id, $current = '') {
intval(ITEM_TYPE_PDL)
);
+ $selected = '';
+ $options = '';
+
if($r) {
$empty_selected = (($current === false) ? ' selected="selected" ' : '');
$options .= '<option value="" ' . $empty_selected . '>' . t('default') . '</option>';
@@ -2206,6 +2209,9 @@ function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null,
$x['application/x-php'] = t('PHP');
}
+ $selected = '';
+ $options = '';
+
foreach($x as $y => $z) {
$selected = (($y == $current) ? ' selected="selected" ' : '');
$options .= '<option value="' . $y . '"' . $selected . '>' . $z . '</option>';
@@ -3977,7 +3983,7 @@ function new_token($minlen = 36, $maxlen = 48) {
$len = (($minlen === $maxlen) ? $minlen : mt_rand($minlen, $maxlen));
for ($a = 0; $a < $len; $a++) {
- $str .= $chars[mt_rand(0, 62)];
+ $str .= $chars[mt_rand(0, 61)];
}
return $str;