@@ -139,17 +139,17 @@ |
||
| 139 | 139 | */ |
| 140 | 140 | public function loadClass($className) |
| 141 | 141 | { |
| 142 | - if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace . $this->_namespaceSeparator))) { |
|
| 142 | + if (null === $this->_namespace || $this->_namespace.$this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace.$this->_namespaceSeparator))) { |
|
| 143 | 143 | $fileName = ''; |
| 144 | 144 | $namespace = ''; |
| 145 | 145 | if (false !== ($lastNsPos = mb_strrpos($className, $this->_namespaceSeparator))) { |
| 146 | 146 | $namespace = mb_substr($className, 0, $lastNsPos); |
| 147 | 147 | $className = mb_substr($className, $lastNsPos + 1); |
| 148 | - $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
| 148 | + $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR; |
|
| 149 | 149 | } |
| 150 | - $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; |
|
| 150 | + $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className).$this->_fileExtension; |
|
| 151 | 151 | |
| 152 | - require (null !== $this->_includePath ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; |
|
| 152 | + require (null !== $this->_includePath ? $this->_includePath.DIRECTORY_SEPARATOR : '').$fileName; |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | } |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | $form->addElement($fileInfolder, true); |
| 132 | 132 | |
| 133 | 133 | $form->addElement(new \XoopsFormHidden('op', 'save')); |
| 134 | - $form->addElement(new \XoopsFormButton(_REQUIRED . ' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 134 | + $form->addElement(new \XoopsFormButton(_REQUIRED.' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 135 | 135 | |
| 136 | 136 | return $form; |
| 137 | 137 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | $ele_name = $this->getName(); |
| 53 | 53 | //$ret = ($this->getTitle() ? '<div class=" center head ">' . $this->getTitle() . '</div>' : ''); |
| 54 | - $ret = NWLINE . '<form name="' . $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '>' . NWLINE; |
|
| 54 | + $ret = NWLINE.'<form name="'.$ele_name.'" id="'.$ele_name.'" action="'.$this->getAction().'" method="'.$this->getMethod().'" onsubmit="return xoopsFormValidate_'.$ele_name.'();"'.$this->getExtra().'>'.NWLINE; |
|
| 55 | 55 | $hidden = ''; |
| 56 | 56 | $class = 'even'; |
| 57 | 57 | foreach ($this->getElements() as $ele) { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | - $ret .= NWLINE . ' ' . $hidden . NWLINE . '</form>'; |
|
| 68 | + $ret .= NWLINE.' '.$hidden.NWLINE.'</form>'; |
|
| 69 | 69 | $ret .= $this->renderValidationJS(true); |
| 70 | 70 | |
| 71 | 71 | return $ret; |
@@ -189,14 +189,14 @@ |
||
| 189 | 189 | $donationform = [ |
| 190 | 190 | 0 => '<form name="donation" id="donation" action="http://www.txmodxoops.org/modules/xdonations/" method="post" onsubmit="return xoopsFormValidate_donation();">', |
| 191 | 191 | 1 => '<table class="outer" cellspacing="1" width="100%"><tbody><tr><th colspan="2">' |
| 192 | - . _AM_TDMCREATE_ABOUT_MAKE_DONATION |
|
| 193 | - . '</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">' |
|
| 194 | - . _AM_TDMCREATE_DONATION_AMOUNT |
|
| 195 | - . '</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 EUR</option><option value="10">10.00 EUR</option><option value="20">20.00 EUR</option><option value="40">40.00 EUR</option><option value="60">60.00 EUR</option><option value="80">80.00 EUR</option><option value="90">90.00 EUR</option><option value="100">100.00 EUR</option><option value="200">200.00 EUR</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="' |
|
| 196 | - . _SUBMIT |
|
| 197 | - . '" title="' |
|
| 198 | - . _SUBMIT |
|
| 199 | - . '" type="submit"></td></tr></tbody></table>', |
|
| 192 | + . _AM_TDMCREATE_ABOUT_MAKE_DONATION |
|
| 193 | + . '</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">' |
|
| 194 | + . _AM_TDMCREATE_DONATION_AMOUNT |
|
| 195 | + . '</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 EUR</option><option value="10">10.00 EUR</option><option value="20">20.00 EUR</option><option value="40">40.00 EUR</option><option value="60">60.00 EUR</option><option value="80">80.00 EUR</option><option value="90">90.00 EUR</option><option value="100">100.00 EUR</option><option value="200">200.00 EUR</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="' |
|
| 196 | + . _SUBMIT |
|
| 197 | + . '" title="' |
|
| 198 | + . _SUBMIT |
|
| 199 | + . '" type="submit"></td></tr></tbody></table>', |
|
| 200 | 200 | 2 => '<input name="op" id="op" value="createinvoice" type="hidden"><input name="plugin" id="plugin" value="donations" type="hidden"><input name="donation" id="donation" value="1" type="hidden"><input name="drawfor" id="drawfor" value="Chronolabs Co-Operative" type="hidden"><input name="drawto" id="drawto" value="%s" type="hidden"><input name="drawto_email" id="drawto_email" value="%s" type="hidden"><input name="key" id="key" value="%s" type="hidden"><input name="currency" id="currency" value="EUR" type="hidden"><input name="weight_unit" id="weight_unit" value="kgs" type="hidden"><input name="item[A][cat]" id="item[A][cat]" value="XDN%s" type="hidden"><input name="item[A][name]" id="item[A][name]" value="Donation for %s" type="hidden"><input name="item[A][quantity]" id="item[A][quantity]" value="1" type="hidden"><input name="item[A][shipping]" id="item[A][shipping]" value="0" type="hidden"><input name="item[A][handling]" id="item[A][handling]" value="0" type="hidden"><input name="item[A][weight]" id="item[A][weight]" value="0" type="hidden"><input name="item[A][tax]" id="item[A][tax]" value="0" type="hidden"><input name="return" id="return" value="http://www.txmodxoops.org/modules/xdonations/success.php" type="hidden"><input name="cancel" id="cancel" value="http://www.txmodxoops.org/modules/xdonations/success.php" type="hidden"></form>', |
| 201 | 201 | 'D' => '', |
| 202 | 202 | 3 => '', |
@@ -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 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | if ($considerHtml) { |
| 137 | 137 | // close all unclosed html-tags |
| 138 | 138 | foreach ($open_tags as $tag) { |
| 139 | - $truncate .= '</' . $tag . '>'; |
|
| 139 | + $truncate .= '</'.$tag.'>'; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | //--></script> |
| 210 | 210 | <!-- End Form Validation JavaScript //-->', |
| 211 | 211 | ]; |
| 212 | - $paypalform = [ |
|
| 212 | + $paypalform = [ |
|
| 213 | 213 | 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', |
| 214 | 214 | 1 => '<input name="cmd" value="_s-xclick" type="hidden">', |
| 215 | 215 | 2 => '<input name="hosted_button_id" value="%s" type="hidden">', |
@@ -222,11 +222,11 @@ discard block |
||
| 222 | 222 | case 2: |
| 223 | 223 | $donationform[$key] = sprintf( |
| 224 | 224 | $donationform[$key], |
| 225 | - $GLOBALS['xoopsConfig']['sitename'] . ' - ' . ('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name') . ' [' . $GLOBALS['xoopsUser']->getVar('uname') . ']' : $GLOBALS['xoopsUser']->getVar('uname')), |
|
| 225 | + $GLOBALS['xoopsConfig']['sitename'].' - '.('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), |
|
| 226 | 226 | $GLOBALS['xoopsUser']->getVar('email'), |
| 227 | 227 | XOOPS_LICENSE_KEY, |
| 228 | 228 | mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')), |
| 229 | - mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')) . ' ' . $GLOBALS['xoopsModule']->getVar('name') |
|
| 229 | + mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name') |
|
| 230 | 230 | ); |
| 231 | 231 | break; |
| 232 | 232 | } |
@@ -37,15 +37,15 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | function application_autoloader($class) |
| 39 | 39 | { |
| 40 | - $classFilename = $class . '.php'; |
|
| 41 | - $cachePath = XOOPS_VAR_PATH . '/caches/tdmcreate_cache'; |
|
| 40 | + $classFilename = $class.'.php'; |
|
| 41 | + $cachePath = XOOPS_VAR_PATH.'/caches/tdmcreate_cache'; |
|
| 42 | 42 | if (!is_dir($cachePath)) { |
| 43 | 43 | if (!mkdir($cachePath, 0777) && !is_dir($cachePath)) { |
| 44 | 44 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $cachePath)); |
| 45 | 45 | } |
| 46 | 46 | chmod($cachePath, 0777); |
| 47 | 47 | } |
| 48 | - $pathCache = file_exists($cacheFile = $cachePath . '/classpaths.cache') ? unserialize(file_get_contents($cacheFile)) : []; |
|
| 48 | + $pathCache = file_exists($cacheFile = $cachePath.'/classpaths.cache') ? unserialize(file_get_contents($cacheFile)) : []; |
|
| 49 | 49 | if (!is_array($pathCache)) { |
| 50 | 50 | $pathCache = []; |
| 51 | 51 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $filename = $this->getFileName(); |
| 78 | 78 | $moduleDirname = $module->getVar('mod_dirname'); |
| 79 | 79 | $content = $this->getHeaderFilesComments($module, $filename, '@charset "UTF-8";'); |
| 80 | - $content .= <<<'EOT' |
|
| 80 | + $content .= <<<'EOT' |
|
| 81 | 81 | img { |
| 82 | 82 | max-width: 200px; |
| 83 | 83 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $filename = $this->getFileName(); |
| 78 | 78 | $moduleDirname = $module->getVar('mod_dirname'); |
| 79 | 79 | $content = $this->getHeaderFilesComments($module, $filename, '@charset "UTF-8";'); |
| 80 | - $content .= <<<EOT |
|
| 80 | + $content .= <<<EOT |
|
| 81 | 81 | ul.menu { |
| 82 | 82 | list-style: none; |
| 83 | 83 | background-color: #f5f5f5; |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | $moduleDirname = $module->getVar('mod_dirname'); |
| 179 | 179 | $content = $this->getHeaderFilesComments($module, $filename); |
| 180 | 180 | $content = $this->getJavascriptJQueryButtons(); |
| 181 | - $content .= $this->getJavascriptJQueryPrint(); |
|
| 181 | + $content .= $this->getJavascriptJQueryPrint(); |
|
| 182 | 182 | |
| 183 | 183 | $this->create($moduleDirname, 'assets/js', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
| 184 | 184 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | $filename = $this->getFileName(); |
| 81 | 81 | $moduleDirname = $module->getVar('mod_dirname'); |
| 82 | 82 | $content = $this->getHeaderFilesComments($module, $filename, 0); |
| 83 | - $content .= <<<'EOT' |
|
| 83 | + $content .= <<<'EOT' |
|
| 84 | 84 | $(document).ready(function(){ |
| 85 | 85 | $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button(); |
| 86 | 86 | $( ".check" ).css("color","#fff").button(); |