diff --git a/Upload/admin/inc/class_form.php b/Upload/admin/inc/class_form.php index c666a06..7bc7d35 100644 --- a/Upload/admin/inc/class_form.php +++ b/Upload/admin/inc/class_form.php @@ -596,7 +596,7 @@ function generate_group_select($name, $selected=array(), $options=array()) } } - $select .= ""; + $select .= ""; } $select .= ""; @@ -833,7 +833,7 @@ function generate_date_select($name, $day="",$month="",$year="") $built = $this->generate_select_box($name.'_day', $days, (int)$day, array('id' => $name.'_day'))."   "; $built .= $this->generate_select_box($name.'_month', $months, (int)$month, array('id' => $name.'_month'))."   "; - $built .= $this->generate_text_box($name.'_year', (int)$year, array('id' => $name.'_year', 'style' => 'width: 100px;')); + $built .= $this->generate_numeric_field($name.'_year', $year, array('id' => $name.'_year', 'style' => 'width: 100px;', 'min' => 0)); return $built; } @@ -894,7 +894,7 @@ class DefaultFormContainer /** * Initialise the new form container. * - * @param string The title of the forum container + * @param string The title of the form container * @param string An additional class to apply if we have one. */ function __construct($title='', $extra_class='') @@ -1050,5 +1050,4 @@ function end($return=false) echo $this->_container->output($this->_title, 1, "general form_container {$this->extra_class}", false); } } -} - +} \ No newline at end of file diff --git a/Upload/admin/inc/class_page.php b/Upload/admin/inc/class_page.php index 1b19fe7..0ab781c 100644 --- a/Upload/admin/inc/class_page.php +++ b/Upload/admin/inc/class_page.php @@ -97,7 +97,7 @@ function output_header($title="") echo " ".$title."\n"; echo " \n"; echo " \n"; - echo " style."/main.css\" type=\"text/css\" />\n"; + echo " style."/main.css?ver=1804\" type=\"text/css\" />\n"; echo " style."/modal.css\" type=\"text/css\" />\n"; // Load stylesheet for this module if it has one @@ -115,7 +115,7 @@ function output_header($title="") echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; // Stop JS elements showing while page is loading (JS supported browsers only) echo " \n"; @@ -505,6 +505,69 @@ function show_login($message="", $class="success") exit; } + function show_2fa() + { + global $lang, $cp_style, $mybb; + + $mybb2fa_page = << + + +{$lang->my2fa} + + + + + + + + + +
+ +
+

{$lang->my2fa}

+EOF; + // Make query string nice and pretty so that user can go to his/her preferred destination + $query_string = ''; + if($_SERVER['QUERY_STRING']) + { + $query_string = '?'.preg_replace('#adminsid=(.{32})#i', '', $_SERVER['QUERY_STRING']); + $query_string = preg_replace('#my_post_key=(.{32})#i', '', $query_string); + $query_string = str_replace('action=logout', '', $query_string); + $query_string = preg_replace('#&+#', '&', $query_string); + $query_string = str_replace('?&', '?', $query_string); + $query_string = htmlspecialchars_uni($query_string); + } + $mybb2fa_page .= <<{$lang->my2fa_code}

+
+
+
+
+
+

+ + +

+
+
+
+ + +EOF; + echo $mybb2fa_page; + exit; + } + /** * Generate the lockout page * @@ -867,6 +930,7 @@ function build_codebuttons_editor($bind, $editor_language, $smilies) { if($smilie['showclickable'] != 0) { + $smilie['image'] = str_replace("{theme}", "images", $smilie['image']); $smiliecache[$smilie['find']] = $smilie['image']; } } @@ -887,8 +951,8 @@ function build_codebuttons_editor($bind, $editor_language, $smilies) $finds_count = count($finds); // Only show the first text to replace in the box - $find = htmlspecialchars_uni($finds[0]); - $image = htmlspecialchars_uni($image); + $find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[0])); + $image = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($image)); if(substr($image, 0, 4) != "http") { $image = $mybb->settings['bburl']."/".$image; @@ -904,7 +968,7 @@ function build_codebuttons_editor($bind, $editor_language, $smilies) for($j = 1; $j < $finds_count; ++$j) { - $find = htmlspecialchars_uni($finds[$j]); + $find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[$j])); $hiddensmilies .= '"'.$find.'": "'.$image.'",'; } ++$i; @@ -975,7 +1039,7 @@ function build_codebuttons_editor($bind, $editor_language, $smilies) - - - - -
-

CSS mode

-
- - -

MIME types defined: text/css, text/x-scss (demo), text/x-less (demo).

- -

Parsing/Highlighting Tests: normal, verbose.

- -
+ + + + + +  + + \ No newline at end of file diff --git a/Upload/admin/jscripts/codemirror/mode/css/less.html b/Upload/admin/jscripts/codemirror/mode/css/less.html index 1030ca4..6ccb721 100644 --- a/Upload/admin/jscripts/codemirror/mode/css/less.html +++ b/Upload/admin/jscripts/codemirror/mode/css/less.html @@ -10,12 +10,12 @@