@@ -199,6 +199,7 @@ |
||
| 199 | 199 | * Parses a string containing multiple HTTP header lines into an array |
| 200 | 200 | * of key => values. |
| 201 | 201 | * Inspired by HTTP::Daemon (CPAN). |
| 202 | + * @param string $header_str |
|
| 202 | 203 | */ |
| 203 | 204 | function http_parse_headers($header_str) { |
| 204 | 205 | $headers = array(); |
@@ -88,7 +88,6 @@ discard block |
||
| 88 | 88 | /** |
| 89 | 89 | * Get initial content |
| 90 | 90 | * |
| 91 | - * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat |
|
| 92 | 91 | * @return string |
| 93 | 92 | */ |
| 94 | 93 | function getValue() { |
@@ -115,7 +114,7 @@ discard block |
||
| 115 | 114 | /** |
| 116 | 115 | * prepare HTML for output |
| 117 | 116 | * |
| 118 | - * @return sting HTML |
|
| 117 | + * @return string HTML |
|
| 119 | 118 | */ |
| 120 | 119 | function render() |
| 121 | 120 | { |
@@ -111,7 +111,6 @@ discard block |
||
| 111 | 111 | /** |
| 112 | 112 | * Get initial content |
| 113 | 113 | * |
| 114 | - * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat |
|
| 115 | 114 | * @return string |
| 116 | 115 | */ |
| 117 | 116 | function getValue() { |
@@ -123,7 +122,7 @@ discard block |
||
| 123 | 122 | * prepare HTML for output |
| 124 | 123 | * |
| 125 | 124 | * @param bool decode content? |
| 126 | - * @return sting HTML |
|
| 125 | + * @return string HTML |
|
| 127 | 126 | */ |
| 128 | 127 | function render($decode = true) |
| 129 | 128 | { |
@@ -111,7 +111,6 @@ discard block |
||
| 111 | 111 | /** |
| 112 | 112 | * Get initial content |
| 113 | 113 | * |
| 114 | - * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat |
|
| 115 | 114 | * @return string |
| 116 | 115 | */ |
| 117 | 116 | function getValue() { |
@@ -122,7 +121,6 @@ discard block |
||
| 122 | 121 | /** |
| 123 | 122 | * Get initial content |
| 124 | 123 | * |
| 125 | - * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat |
|
| 126 | 124 | * @return string |
| 127 | 125 | */ |
| 128 | 126 | function renderGetValueJS() { |
@@ -133,7 +131,7 @@ discard block |
||
| 133 | 131 | * prepare HTML for output |
| 134 | 132 | * |
| 135 | 133 | * @param bool decode content? |
| 136 | - * @return sting HTML |
|
| 134 | + * @return string HTML |
|
| 137 | 135 | */ |
| 138 | 136 | function render($decode = true) |
| 139 | 137 | { |
@@ -142,7 +142,6 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * Get initial content |
| 144 | 144 | * |
| 145 | - * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat |
|
| 146 | 145 | * @return string |
| 147 | 146 | */ |
| 148 | 147 | function getValue() { |
@@ -154,7 +153,7 @@ discard block |
||
| 154 | 153 | * prepare HTML for output |
| 155 | 154 | * |
| 156 | 155 | * @param bool decode content? |
| 157 | - * @return sting HTML |
|
| 156 | + * @return string HTML |
|
| 158 | 157 | */ |
| 159 | 158 | function render($decode = true) { |
| 160 | 159 | static $isCodemirror3JsLoaded; |
@@ -177,6 +176,11 @@ discard block |
||
| 177 | 176 | $css.= ".cm-tab {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=); background-position: right; background-repeat: no-repeat;}\n"; // Visible tabs |
| 178 | 177 | $css.= ".CodeMirror-foldmarker {color: blue; text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; font-family: arial;}\n"; |
| 179 | 178 | // Get available codemirror themes |
| 179 | + |
|
| 180 | + /** |
|
| 181 | + * @param string $d |
|
| 182 | + * @param string $x |
|
| 183 | + */ |
|
| 180 | 184 | function codemirror_filesList($d, $x){ |
| 181 | 185 | foreach(array_diff(scandir($d), array('.', '..')) as $f) if (is_file($d . '/' . $f) && (($x) ? preg_match('/' . $x . '$/' , $f) : 1)) $l[] = $f; |
| 182 | 186 | return $l; |
@@ -29,18 +29,29 @@ |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | # make declarations for the text input index |
| 32 | +/** |
|
| 33 | + * @param integer $text_input_idx |
|
| 34 | + */ |
|
| 32 | 35 | function print_textindex_decl( $text_input_idx ) { |
| 33 | 36 | echo "words[$text_input_idx] = [];\n"; |
| 34 | 37 | echo "suggs[$text_input_idx] = [];\n"; |
| 35 | 38 | } |
| 36 | 39 | |
| 37 | 40 | # set an element of the JavaScript 'words' array to a misspelled word |
| 41 | +/** |
|
| 42 | + * @param integer $index |
|
| 43 | + * @param integer $text_input_idx |
|
| 44 | + */ |
|
| 38 | 45 | function print_words_elem( $word, $index, $text_input_idx ) { |
| 39 | 46 | echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n"; |
| 40 | 47 | } |
| 41 | 48 | |
| 42 | 49 | |
| 43 | 50 | # set an element of the JavaScript 'suggs' array to a list of suggestions |
| 51 | +/** |
|
| 52 | + * @param integer $index |
|
| 53 | + * @param integer $text_input_idx |
|
| 54 | + */ |
|
| 44 | 55 | function print_suggs_elem( $suggs, $index, $text_input_idx ) { |
| 45 | 56 | echo "suggs[$text_input_idx][$index] = ["; |
| 46 | 57 | foreach( $suggs as $key=>$val ) { |
@@ -63,6 +63,9 @@ |
||
| 63 | 63 | echo '</Connector>' ; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | +/** |
|
| 67 | + * @param integer $number |
|
| 68 | + */ |
|
| 66 | 69 | function SendError( $number, $text ) |
| 67 | 70 | { |
| 68 | 71 | if ( $_GET['Command'] == 'FileUpload' ) |
@@ -28,6 +28,9 @@ |
||
| 28 | 28 | require('./commands.php') ; |
| 29 | 29 | require('./phpcompat.php') ; |
| 30 | 30 | |
| 31 | +/** |
|
| 32 | + * @param integer $number |
|
| 33 | + */ |
|
| 31 | 34 | function SendError( $number, $text ) |
| 32 | 35 | { |
| 33 | 36 | SendUploadResults( $number, '', '', $text ) ; |
@@ -22,12 +22,18 @@ discard block |
||
| 22 | 22 | * Utility functions for the File Manager Connector for PHP. |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | +/** |
|
| 26 | + * @param string $charToRemove |
|
| 27 | + */ |
|
| 25 | 28 | function RemoveFromStart( $sourceString, $charToRemove ) |
| 26 | 29 | { |
| 27 | 30 | $sPattern = '|^' . $charToRemove . '+|' ; |
| 28 | 31 | return preg_replace( $sPattern, '', $sourceString ) ; |
| 29 | 32 | } |
| 30 | 33 | |
| 34 | +/** |
|
| 35 | + * @param string $charToRemove |
|
| 36 | + */ |
|
| 31 | 37 | function RemoveFromEnd( $sourceString, $charToRemove ) |
| 32 | 38 | { |
| 33 | 39 | $sPattern = '|' . $charToRemove . '+$|' ; |
@@ -175,7 +181,6 @@ discard block |
||
| 175 | 181 | * |
| 176 | 182 | * @param string $filePath absolute path to file |
| 177 | 183 | * @param string $extension file extension |
| 178 | - * @param integer $detectionLevel 0 = none, 1 = use getimagesize for images, 2 = use DetectHtml for images |
|
| 179 | 184 | * @return boolean |
| 180 | 185 | */ |
| 181 | 186 | function IsImageValid( $filePath, $extension ) |