@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $urlPath = $this->expandUriTemplate($urlPath, $parameters, $this->defaultParameters); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - $url = rtrim($baseUrl, '/') . '/' . ltrim($urlPath, '/'); |
|
| 257 | + $url = rtrim($baseUrl, '/').'/'.ltrim($urlPath, '/'); |
|
| 258 | 258 | |
| 259 | 259 | if ($content !== NULL && (\is_array($content) || \is_object($content))) {
|
| 260 | 260 | $headers['Content-Type'] = 'application/json; charset=utf-8'; |
@@ -394,13 +394,13 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | $parameter = $parameters[$m[2]]; |
| 396 | 396 | unset($parameters[$m[2]]); |
| 397 | - return $m[1] . rawurlencode($parameter); |
|
| 397 | + return $m[1].rawurlencode($parameter); |
|
| 398 | 398 | }, $url); |
| 399 | 399 | |
| 400 | 400 | $url = rtrim($url, '/'); |
| 401 | 401 | |
| 402 | 402 | if (\count($parameters)) {
|
| 403 | - $url .= '?' . http_build_query($parameters); |
|
| 403 | + $url .= '?'.http_build_query($parameters); |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | return $url; |
@@ -421,14 +421,14 @@ discard block |
||
| 421 | 421 | $parameters += $defaultParameters; |
| 422 | 422 | |
| 423 | 423 | static $operatorFlags = [ |
| 424 | - '' => ['prefix' => '', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 425 | - '+' => ['prefix' => '', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => TRUE], |
|
| 426 | - '#' => ['prefix' => '#', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => TRUE], |
|
| 427 | - '.' => ['prefix' => '.', 'separator' => '.', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 428 | - '/' => ['prefix' => '/', 'separator' => '/', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 429 | - ';' => ['prefix' => ';', 'separator' => ';', 'named' => TRUE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 430 | - '?' => ['prefix' => '?', 'separator' => '&', 'named' => TRUE, 'ifEmpty' => '=', 'reserved' => FALSE], |
|
| 431 | - '&' => ['prefix' => '&', 'separator' => '&', 'named' => TRUE, 'ifEmpty' => '=', 'reserved' => FALSE], |
|
| 424 | + '' => ['prefix' => '', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 425 | + '+' => ['prefix' => '', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => TRUE], |
|
| 426 | + '#' => ['prefix' => '#', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => TRUE], |
|
| 427 | + '.' => ['prefix' => '.', 'separator' => '.', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 428 | + '/' => ['prefix' => '/', 'separator' => '/', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 429 | + ';' => ['prefix' => ';', 'separator' => ';', 'named' => TRUE, 'ifEmpty' => '', 'reserved' => FALSE], |
|
| 430 | + '?' => ['prefix' => '?', 'separator' => '&', 'named' => TRUE, 'ifEmpty' => '=', 'reserved' => FALSE], |
|
| 431 | + '&' => ['prefix' => '&', 'separator' => '&', 'named' => TRUE, 'ifEmpty' => '=', 'reserved' => FALSE], |
|
| 432 | 432 | ]; |
| 433 | 433 | |
| 434 | 434 | return preg_replace_callback('~{([+#./;?&])?([^}]+?)}~', function($m) use ($url, & $parameters, $operatorFlags) {
|
@@ -463,17 +463,17 @@ discard block |
||
| 463 | 463 | if ($explode) {
|
| 464 | 464 | $parts = []; |
| 465 | 465 | if ($isAssoc) {
|
| 466 | - $this->walk($value, function ($v, $k) use (& $parts, $flags, $maxLength) {
|
|
| 466 | + $this->walk($value, function($v, $k) use (& $parts, $flags, $maxLength) {
|
|
| 467 | 467 | $parts[] = $this->prefix(['named' => TRUE] + $flags, $k, $this->escape($flags, $v, $maxLength)); |
| 468 | 468 | }); |
| 469 | 469 | |
| 470 | 470 | } elseif ($flags['named']) {
|
| 471 | - $this->walk($value, function ($v) use (& $parts, $flags, $name, $maxLength) {
|
|
| 471 | + $this->walk($value, function($v) use (& $parts, $flags, $name, $maxLength) {
|
|
| 472 | 472 | $parts[] = $this->prefix($flags, $name, $this->escape($flags, $v, $maxLength)); |
| 473 | 473 | }); |
| 474 | 474 | |
| 475 | 475 | } else {
|
| 476 | - $this->walk($value, function ($v) use (& $parts, $flags, $maxLength) {
|
|
| 476 | + $this->walk($value, function($v) use (& $parts, $flags, $maxLength) {
|
|
| 477 | 477 | $parts[] = $this->escape($flags, $v, $maxLength); |
| 478 | 478 | }); |
| 479 | 479 | } |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | if (isset($translated[0])) {
|
| 507 | - return $flags['prefix'] . \implode($flags['separator'], $translated); |
|
| 507 | + return $flags['prefix'].\implode($flags['separator'], $translated); |
|
| 508 | 508 | } |
| 509 | 509 | |
| 510 | 510 | return ''; |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | } |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | - return $prefix . $value; |
|
| 533 | + return $prefix.$value; |
|
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | $value = (string) $value; |
| 546 | 546 | |
| 547 | 547 | if ($maxLength !== NULL) {
|
| 548 | - if (\preg_match('~^(.{' . $maxLength . '}).~u', $value, $m)) {
|
|
| 548 | + if (\preg_match('~^(.{'.$maxLength.'}).~u', $value, $m)) {
|
|
| 549 | 549 | $value = $m[1]; |
| 550 | 550 | } elseif (\strlen($value) > $maxLength) { # when malformed UTF-8
|
| 551 | 551 | $value = \substr($value, 0, $maxLength); |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | |
| 559 | 559 | $escaped = ''; |
| 560 | 560 | for ($i = 0, $count = \count($parts); $i < $count; $i += 2) {
|
| 561 | - $escaped .= rawurlencode($parts[$i]) . $parts[$i + 1]; |
|
| 561 | + $escaped .= rawurlencode($parts[$i]).$parts[$i + 1]; |
|
| 562 | 562 | } |
| 563 | 563 | |
| 564 | 564 | return $escaped; |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | |
| 597 | 597 | if (isset($content->errors)) {
|
| 598 | 598 | $message .= \implode(', ', array_map(function($error) {
|
| 599 | - return '[' . \implode(':', (array) $error) . ']';
|
|
| 599 | + return '['.\implode(':', (array) $error).']';
|
|
| 600 | 600 | }, $content->errors)); |
| 601 | 601 | } |
| 602 | 602 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | throw new MissingDirectoryException("Directory '$tempDir' is missing.");
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - $dir = $tempDir . DIRECTORY_SEPARATOR . 'milo.github-api'; |
|
| 30 | + $dir = $tempDir.DIRECTORY_SEPARATOR.'milo.github-api'; |
|
| 31 | 31 | |
| 32 | 32 | if (!\is_dir($dir)) {
|
| 33 | 33 | set_error_handler(function($severity, $message, $file, $line) use ($dir, & $valid) {
|
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | private function filePath($key) |
| 93 | 93 | {
|
| 94 | - return $this->dir . DIRECTORY_SEPARATOR . sha1($key) . '.php'; |
|
| 94 | + return $this->dir.DIRECTORY_SEPARATOR.sha1($key).'.php'; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | public function getHandler($name) |
| 72 | 72 | {
|
| 73 | - $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler'; |
|
| 73 | + $class = __NAMESPACE__.'\\'.\ucfirst($name).'Handler'; |
|
| 74 | 74 | if (!\class_exists($class)) {
|
| 75 | 75 | throw new \RuntimeException("Class '$class' not found");
|
| 76 | 76 | } |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | {
|
| 57 | 57 | if ($considerHtml) {
|
| 58 | 58 | // if the plain text is shorter than the maximum length, return the whole text |
| 59 | - if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
|
|
| 59 | + if (mb_strlen(\preg_replace('/<.*?'.'>/', '', $text)) <= $length) {
|
|
| 60 | 60 | return $text; |
| 61 | 61 | } |
| 62 | 62 | // splits all html-tags to scanable lines |
| 63 | - \preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
|
|
| 63 | + \preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
|
|
| 64 | 64 | $total_length = mb_strlen($ending); |
| 65 | 65 | $open_tags = []; |
| 66 | 66 | $truncate = ''; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | unset($open_tags[$pos]); |
| 79 | 79 | } |
| 80 | 80 | // if tag is an opening tag |
| 81 | - } elseif (\preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) {
|
|
| 81 | + } elseif (\preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) {
|
|
| 82 | 82 | // add tag to the beginning of $open_tags list |
| 83 | 83 | \array_unshift($open_tags, \mb_strtolower($tag_matchings[1])); |
| 84 | 84 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if ($considerHtml) {
|
| 139 | 139 | // close all unclosed html-tags |
| 140 | 140 | foreach ($open_tags as $tag) {
|
| 141 | - $truncate .= '</' . $tag . '>'; |
|
| 141 | + $truncate .= '</'.$tag.'>'; |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | //--></script> |
| 212 | 212 | <!-- End Form Validation JavaScript //-->', |
| 213 | 213 | ]; |
| 214 | - $paypalform = [ |
|
| 214 | + $paypalform = [ |
|
| 215 | 215 | 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', |
| 216 | 216 | 1 => '<input name="cmd" value="_s-xclick" type="hidden">', |
| 217 | 217 | 2 => '<input name="hosted_button_id" value="%s" type="hidden">', |
@@ -224,11 +224,11 @@ discard block |
||
| 224 | 224 | case 2: |
| 225 | 225 | $donationform[$key] = \sprintf( |
| 226 | 226 | $donationform[$key], |
| 227 | - $GLOBALS['xoopsConfig']['sitename'] . ' - ' . ('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name') . ' [' . $GLOBALS['xoopsUser']->getVar('uname') . ']' : $GLOBALS['xoopsUser']->getVar('uname')),
|
|
| 227 | + $GLOBALS['xoopsConfig']['sitename'].' - '.('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')),
|
|
| 228 | 228 | $GLOBALS['xoopsUser']->getVar('email'),
|
| 229 | 229 | XOOPS_LICENSE_KEY, |
| 230 | 230 | \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')),
|
| 231 | - \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')) . ' ' . $GLOBALS['xoopsModule']->getVar('name')
|
|
| 231 | + \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name')
|
|
| 232 | 232 | ); |
| 233 | 233 | break; |
| 234 | 234 | } |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | $logsObj->setVar('log_type', $type);
|
| 143 | 143 | $logsObj->setVar('log_details', $detail);
|
| 144 | 144 | $logsObj->setVar('log_result', $result);
|
| 145 | - $logsObj->setVar('log_datecreated',\time());
|
|
| 145 | + $logsObj->setVar('log_datecreated', \time());
|
|
| 146 | 146 | $logsObj->setVar('log_submitter', $submitter);
|
| 147 | 147 | // Insert Data |
| 148 | 148 | if ($logsHandler->insert($logsObj)) {
|
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $readmesObj->setVar('rm_content', $readme['content']);
|
| 171 | 171 | $readmesObj->setVar('rm_encoding', $readme['encoding']);
|
| 172 | 172 | $readmesObj->setVar('rm_downloadurl', $readme['download_url']);
|
| 173 | - $readmesObj->setVar('rm_datecreated',\time());
|
|
| 173 | + $readmesObj->setVar('rm_datecreated', \time());
|
|
| 174 | 174 | $readmesObj->setVar('rm_submitter', $submitter);
|
| 175 | 175 | // Insert Data |
| 176 | 176 | if (!$readmesHandler->insert($readmesObj)) {
|
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $readmesObj->setVar('rm_downloadurl', $readme['download_url']);
|
| 233 | 233 | $baseurl = \substr($readme['html_url'], 0, \strrpos($readme['html_url'], '/') + 1); |
| 234 | 234 | $readmesObj->setVar('rm_baseurl', $baseurl);
|
| 235 | - $readmesObj->setVar('rm_datecreated',\time());
|
|
| 235 | + $readmesObj->setVar('rm_datecreated', \time());
|
|
| 236 | 236 | $readmesObj->setVar('rm_submitter', $submitter);
|
| 237 | 237 | // Insert Data |
| 238 | 238 | if (!$readmesHandler->insert($readmesObj)) {
|
@@ -266,10 +266,10 @@ discard block |
||
| 266 | 266 | public function updateRepoReadme() |
| 267 | 267 | {
|
| 268 | 268 | // update repo_readme |
| 269 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_readmes');
|
|
| 270 | - $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_readmes') . '.rm_repoid ';
|
|
| 271 | - $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_readme = 1 ';
|
|
| 272 | - $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_readmes') . '.rm_id)>0));';
|
|
| 269 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_readmes');
|
|
| 270 | + $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_readmes').'.rm_repoid ';
|
|
| 271 | + $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_readme = 1 ';
|
|
| 272 | + $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_readmes').'.rm_id)>0));';
|
|
| 273 | 273 | $GLOBALS['xoopsDB']->queryF($sql); |
| 274 | 274 | |
| 275 | 275 | return true; |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | $ret['options'] = \strip_tags($this->getVar('set_options', 'e'));
|
| 131 | 131 | $editorMaxchar = $helper->getConfig('editor_maxchar');
|
| 132 | 132 | $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar); |
| 133 | - $ret['primary'] = (int)$this->getVar('set_primary') > 0 ? _YES : _NO;
|
|
| 133 | + $ret['primary'] = (int) $this->getVar('set_primary') > 0 ? _YES : _NO;
|
|
| 134 | 134 | $ret['date'] = \formatTimestamp($this->getVar('set_date'), 's');
|
| 135 | 135 | $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('set_submitter'));
|
| 136 | 136 | return $ret; |
@@ -146,14 +146,14 @@ discard block |
||
| 146 | 146 | $max_height_resize = $this->maxHeight; |
| 147 | 147 | if ($original_w > $original_h) {
|
| 148 | 148 | $max_height_ratio = $this->maxHeight / $original_h; |
| 149 | - $max_width_resize = (int)\round($original_w * $max_height_ratio); |
|
| 149 | + $max_width_resize = (int) \round($original_w * $max_height_ratio); |
|
| 150 | 150 | } else {
|
| 151 | 151 | $max_width_ratio = $this->maxWidth / $original_w; |
| 152 | - $max_height_resize = (int)\round($original_h * $max_width_ratio); |
|
| 152 | + $max_height_resize = (int) \round($original_h * $max_width_ratio); |
|
| 153 | 153 | } |
| 154 | 154 | if ($max_width_resize < $this->maxWidth) {
|
| 155 | 155 | $max_height_ratio = $this->maxWidth / $max_width_resize; |
| 156 | - $max_height_resize = (int)\round($this->maxHeight * $max_height_ratio); |
|
| 156 | + $max_height_resize = (int) \round($this->maxHeight * $max_height_ratio); |
|
| 157 | 157 | $max_width_resize = $this->maxWidth; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | $max_width_offset = 0; |
| 169 | 169 | $max_height_offset = 0; |
| 170 | 170 | if ($this->maxWidth < $max_width_resize) {
|
| 171 | - $max_width_offset = (int)\round(($max_width_resize - $this->maxWidth) / 2); |
|
| 171 | + $max_width_offset = (int) \round(($max_width_resize - $this->maxWidth) / 2); |
|
| 172 | 172 | } else {
|
| 173 | - $max_height_offset = (int)\round(($max_height_resize - $this->maxHeight) / 2); |
|
| 173 | + $max_height_offset = (int) \round(($max_height_resize - $this->maxHeight) / 2); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | if (!imagecopy($final, $thumb, 0, 0, $max_width_offset, $max_height_offset, $max_width_resize, $max_height_resize)) {
|
@@ -189,10 +189,10 @@ discard block |
||
| 189 | 189 | $dest = \imagecreatefromjpeg($this->endFile); |
| 190 | 190 | $src = \imagecreatefromjpeg($this->sourceFile); |
| 191 | 191 | if (4 == $this->mergeType) {
|
| 192 | - $imgWidth = (int)\round($this->maxWidth / 2 - 1); |
|
| 193 | - $imgHeight = (int)\round($this->maxHeight / 2 - 1); |
|
| 194 | - $posCol2 = (int)\round($this->maxWidth / 2 + 1); |
|
| 195 | - $posRow2 = (int)\round($this->maxHeight / 2 + 1); |
|
| 192 | + $imgWidth = (int) \round($this->maxWidth / 2 - 1); |
|
| 193 | + $imgHeight = (int) \round($this->maxHeight / 2 - 1); |
|
| 194 | + $posCol2 = (int) \round($this->maxWidth / 2 + 1); |
|
| 195 | + $posRow2 = (int) \round($this->maxHeight / 2 + 1); |
|
| 196 | 196 | switch ($this->mergePos) {
|
| 197 | 197 | case 1: |
| 198 | 198 | imagecopy($dest, $src, 0, 0, 0, 0, $imgWidth, $imgHeight); //top left |
@@ -209,11 +209,11 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | } |
| 211 | 211 | if (6 == $this->mergeType) {
|
| 212 | - $imgWidth = (int)\round($this->maxWidth / 3 - 1); |
|
| 213 | - $imgHeight = (int)\round($this->maxHeight / 2 - 1); |
|
| 214 | - $posCol2 = (int)\round($this->maxWidth / 3 + 1); |
|
| 215 | - $posCol3 = $posCol2 + (int)\round($this->maxWidth / 3 + 1); |
|
| 216 | - $posRow2 = (int)\round($this->maxHeight / 2 + 1); |
|
| 212 | + $imgWidth = (int) \round($this->maxWidth / 3 - 1); |
|
| 213 | + $imgHeight = (int) \round($this->maxHeight / 2 - 1); |
|
| 214 | + $posCol2 = (int) \round($this->maxWidth / 3 + 1); |
|
| 215 | + $posCol3 = $posCol2 + (int) \round($this->maxWidth / 3 + 1); |
|
| 216 | + $posRow2 = (int) \round($this->maxHeight / 2 + 1); |
|
| 217 | 217 | |
| 218 | 218 | switch ($this->mergePos) {
|
| 219 | 219 | case 1: |
@@ -67,29 +67,29 @@ discard block |
||
| 67 | 67 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
| 68 | 68 | // Get Theme Form |
| 69 | 69 | \xoops_load('XoopsFormLoader');
|
| 70 | - $form = new \XoopsThemeForm(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true);
|
|
| 70 | + $form = new \XoopsThemeForm(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true);
|
|
| 71 | 71 | $form->setExtra('enctype="multipart/form-data"');
|
| 72 | 72 | |
| 73 | - $recipient = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail'));
|
|
| 73 | + $recipient = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail'));
|
|
| 74 | 74 | $recipient->setExtra('disabled="disabled"');
|
| 75 | 75 | $form->addElement($recipient); |
| 76 | - $your_name = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME'), 'your_name', 50, 255, $this->name);
|
|
| 77 | - $your_name->setExtra('placeholder="' . \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME_PLACEHOLER') . '"');
|
|
| 76 | + $your_name = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME'), 'your_name', 50, 255, $this->name);
|
|
| 77 | + $your_name->setExtra('placeholder="'.\constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME_PLACEHOLER').'"');
|
|
| 78 | 78 | $form->addElement($your_name); |
| 79 | - $your_site = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE'), 'your_site', 50, 255, $this->site);
|
|
| 80 | - $your_site->setExtra('placeholder="' . \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE_PLACEHOLER') . '"');
|
|
| 79 | + $your_site = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE'), 'your_site', 50, 255, $this->site);
|
|
| 80 | + $your_site->setExtra('placeholder="'.\constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE_PLACEHOLER').'"');
|
|
| 81 | 81 | $form->addElement($your_site); |
| 82 | - $your_mail = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL'), 'your_mail', 50, 255, $this->email);
|
|
| 83 | - $your_mail->setExtra('placeholder="' . \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL_PLACEHOLER') . '"');
|
|
| 82 | + $your_mail = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL'), 'your_mail', 50, 255, $this->email);
|
|
| 83 | + $your_mail->setExtra('placeholder="'.\constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL_PLACEHOLER').'"');
|
|
| 84 | 84 | $form->addElement($your_mail); |
| 85 | 85 | |
| 86 | - $fbtypeSelect = new \XoopsFormSelect(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE'), 'fb_type', $this->type);
|
|
| 86 | + $fbtypeSelect = new \XoopsFormSelect(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE'), 'fb_type', $this->type);
|
|
| 87 | 87 | $fbtypeSelect->addOption('', '');
|
| 88 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION'));
|
|
| 89 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS'));
|
|
| 90 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL'));
|
|
| 91 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES'));
|
|
| 92 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'));
|
|
| 88 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION'));
|
|
| 89 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS'));
|
|
| 90 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL'));
|
|
| 91 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES'));
|
|
| 92 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS'));
|
|
| 93 | 93 | $form->addElement($fbtypeSelect, true); |
| 94 | 94 | |
| 95 | 95 | $editorConfigs = []; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $configHandler = \xoops_getHandler('config');
|
| 105 | 105 | $config = &$configHandler->getConfigsByCat(0, $module->getVar('mid'));
|
| 106 | 106 | $editorConfigs['editor'] = $config['general_editor']; |
| 107 | - $editor = new \XoopsFormEditor(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs);
|
|
| 107 | + $editor = new \XoopsFormEditor(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs);
|
|
| 108 | 108 | $form->addElement($editor, true); |
| 109 | 109 | |
| 110 | 110 | $form->addElement(new \XoopsFormHidden('op', 'send'));
|