@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | class FieldElements extends \XoopsObject |
| 32 | 32 | { |
| 33 | 33 | /** |
| 34 | - * @public function constructor class |
|
| 35 | - * @param null |
|
| 36 | - */ |
|
| 34 | + * @public function constructor class |
|
| 35 | + * @param null |
|
| 36 | + */ |
|
| 37 | 37 | |
| 38 | 38 | public function __construct() |
| 39 | 39 | { |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * @static function getInstance |
|
| 62 | - * @param null |
|
| 61 | + * @static function getInstance |
|
| 62 | + * @param null |
|
| 63 | 63 | * @return FieldElements |
| 64 | 64 | */ |
| 65 | 65 | public static function getInstance() |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | class Fieldnull extends \XoopsObject |
| 31 | 31 | { |
| 32 | 32 | /** |
| 33 | - * @public function constructor class |
|
| 34 | - * @param null |
|
| 35 | - */ |
|
| 33 | + * @public function constructor class |
|
| 34 | + * @param null |
|
| 35 | + */ |
|
| 36 | 36 | |
| 37 | 37 | public function __construct() |
| 38 | 38 | { |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * @static function getInstance |
|
| 46 | - * @param null |
|
| 45 | + * @static function getInstance |
|
| 46 | + * @param null |
|
| 47 | 47 | * @return Fieldnull |
| 48 | 48 | */ |
| 49 | 49 | public static function getInstance() |
@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @version $Id: LogoGenerator.php 12258 2014-01-02 09:33:29Z timgno $ |
| 25 | 25 | */ |
| 26 | -include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
| 26 | +include_once dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
| 27 | 27 | //include_once XOOPS_ROOT_PATH . '/modules/TDMCreate/include/common.php'; |
| 28 | 28 | |
| 29 | 29 | if (function_exists($_GET['f'])) { // get function name and parameter $_GET['f']($_GET["p"]); |
| 30 | - include_once __DIR__ . '/LogoGenerator.php'; |
|
| 30 | + include_once __DIR__.'/LogoGenerator.php'; |
|
| 31 | 31 | $ret = LogoGenerator::createLogo($_GET['iconName'], $_GET['caption']); |
| 32 | 32 | phpFunction($ret); |
| 33 | 33 | } else { |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $dirname = 'tdmcreate'; |
| 69 | - $iconFileName = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32/' . basename($logoIcon); |
|
| 69 | + $iconFileName = XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32/'.basename($logoIcon); |
|
| 70 | 70 | |
| 71 | 71 | //$dirFonts = TDMC_PATH . "/assets/fonts"; |
| 72 | 72 | //$dirLogos = TDMC_PATH . "/assets/images/logos"; |
| 73 | - $dirFonts = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/fonts'; |
|
| 74 | - $dirLogos = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/images/logos'; |
|
| 73 | + $dirFonts = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/fonts'; |
|
| 74 | + $dirLogos = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/images/logos'; |
|
| 75 | 75 | |
| 76 | - if (!file_exists($imageBase = $dirLogos . '/empty.png') || |
|
| 77 | - !file_exists($font = $dirFonts . '/VeraBd.ttf') || |
|
| 76 | + if (!file_exists($imageBase = $dirLogos.'/empty.png') || |
|
| 77 | + !file_exists($font = $dirFonts.'/VeraBd.ttf') || |
|
| 78 | 78 | !file_exists($iconFile = $iconFileName)) { |
| 79 | 79 | return false; |
| 80 | 80 | } |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); |
| 91 | 91 | |
| 92 | 92 | //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleName . "_logo.png"; |
| 93 | - $targetImage = '/uploads/' . $dirname . '/images/modules/' . $moduleName . '_logo.png'; |
|
| 93 | + $targetImage = '/uploads/'.$dirname.'/images/modules/'.$moduleName.'_logo.png'; |
|
| 94 | 94 | |
| 95 | - imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage); |
|
| 95 | + imagepng($imageModule, XOOPS_ROOT_PATH.$targetImage); |
|
| 96 | 96 | |
| 97 | 97 | imagedestroy($imageModule); |
| 98 | 98 | imagedestroy($imageIcon); |
| 99 | 99 | |
| 100 | - return XOOPS_URL . $targetImage; |
|
| 100 | + return XOOPS_URL.$targetImage; |
|
| 101 | 101 | } |
| 102 | 102 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | class FieldElementsHandler extends \XoopsPersistableObjectHandler |
| 32 | 32 | { |
| 33 | 33 | /** |
| 34 | - * @public function constructor class |
|
| 34 | + * @public function constructor class |
|
| 35 | 35 | * @param null|\XoopsDatabase|\XoopsMySQLDatabase $db |
| 36 | 36 | */ |
| 37 | 37 | public function __construct(\XoopsDatabase $db) |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $form->addElement($mod_select, true); |
| 71 | 71 | |
| 72 | 72 | $form->addElement(new \XoopsFormHidden('op', 'build')); |
| 73 | - $form->addElement(new \XoopsFormButton(_REQUIRED . ' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 73 | + $form->addElement(new \XoopsFormButton(_REQUIRED.' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 74 | 74 | |
| 75 | 75 | return $form; |
| 76 | 76 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | public function clearDir($dir, $pattern = '*') |
| 83 | 83 | { |
| 84 | 84 | // Find all files and folders matching pattern |
| 85 | - $files = glob($dir . "/$pattern"); |
|
| 85 | + $files = glob($dir."/$pattern"); |
|
| 86 | 86 | // Interate thorugh the files and folders |
| 87 | 87 | foreach ($files as $file) { |
| 88 | 88 | // if it's a directory then re-call clearDir function to delete files inside this directory |
@@ -109,12 +109,12 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | while (false !== ($file = readdir($dir))) { |
| 111 | 111 | if (('.' !== $file) && ('..' !== $file)) { |
| 112 | - if (is_dir($src . '/' . $file)) { |
|
| 112 | + if (is_dir($src.'/'.$file)) { |
|
| 113 | 113 | // Copy the directory itself |
| 114 | - $this->copyDir($src . '/' . $file, $dst . '/' . $file); |
|
| 114 | + $this->copyDir($src.'/'.$file, $dst.'/'.$file); |
|
| 115 | 115 | } else { |
| 116 | 116 | // Make sure you copy the current script |
| 117 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 117 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -181,18 +181,18 @@ discard block |
||
| 181 | 181 | $tableImage = $getTableImage ?: 'blank.gif'; |
| 182 | 182 | $icons32Directory = '/Frameworks/moduleclasses/icons/32'; |
| 183 | 183 | $uploadsDirectory = '/uploads/tdmcreate/images/tables'; |
| 184 | - $iconsDirectory = is_dir(XOOPS_ROOT_PATH . $icons32Directory) ? $icons32Directory : $uploadsDirectory; |
|
| 184 | + $iconsDirectory = is_dir(XOOPS_ROOT_PATH.$icons32Directory) ? $icons32Directory : $uploadsDirectory; |
|
| 185 | 185 | |
| 186 | 186 | $imgtray1 = new \XoopsFormElementTray(_AM_TDMCREATE_TABLE_IMAGE, '<br>'); |
| 187 | 187 | $imgpath1 = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsDirectory}/"); |
| 188 | 188 | $imageSelect1 = new \XoopsFormSelect($imgpath1, 'table_image', $tableImage, 10); |
| 189 | - $imageArray1 = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $iconsDirectory); |
|
| 189 | + $imageArray1 = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$iconsDirectory); |
|
| 190 | 190 | foreach ($imageArray1 as $image1) { |
| 191 | 191 | $imageSelect1->addOption($image1, $image1); |
| 192 | 192 | } |
| 193 | - $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"" . $iconsDirectory . '", "", "' . XOOPS_URL . "\")'"); |
|
| 193 | + $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"".$iconsDirectory.'", "", "'.XOOPS_URL."\")'"); |
|
| 194 | 194 | $imgtray1->addElement($imageSelect1, false); |
| 195 | - $imgtray1->addElement(new \XoopsFormLabel('', "<br><img src='" . XOOPS_URL . '/' . $iconsDirectory . '/' . $tableImage . "' name='image1' id='image1' alt='' />")); |
|
| 195 | + $imgtray1->addElement(new \XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$iconsDirectory.'/'.$tableImage."' name='image1' id='image1' alt='' />")); |
|
| 196 | 196 | $fileseltray1 = new \XoopsFormElementTray('', '<br>'); |
| 197 | 197 | $fileseltray1->addElement(new \XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $helper->getConfig('maxsize'))); |
| 198 | 198 | $fileseltray1->addElement(new \XoopsFormLabel('')); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $checkbox = new \XoopsFormCheckbox(' ', 'table_option', $this->getOptionsTables(), '<br>'); |
| 217 | 217 | $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC); |
| 218 | 218 | foreach ($this->options as $option) { |
| 219 | - $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_' . mb_strtoupper($option))); |
|
| 219 | + $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_'.mb_strtoupper($option))); |
|
| 220 | 220 | } |
| 221 | 221 | $optionsTray->addElement($checkbox); |
| 222 | 222 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | $form->addElement($optionsTray); |
| 226 | 226 | |
| 227 | - $buttonTray = new \XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', ''); |
|
| 227 | + $buttonTray = new \XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', ''); |
|
| 228 | 228 | $buttonTray->addElement(new \XoopsFormHidden('op', 'save')); |
| 229 | 229 | $buttonTray->addElement(new \XoopsFormHidden('table_id', ($isNew ? 0 : $this->getVar('table_id')))); |
| 230 | 230 | $buttonTray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | { |
| 274 | 274 | $retTable = []; |
| 275 | 275 | foreach ($this->options as $option) { |
| 276 | - if (1 == $this->getVar('table_' . $option)) { |
|
| 276 | + if (1 == $this->getVar('table_'.$option)) { |
|
| 277 | 277 | $retTable[] = $option; |
| 278 | 278 | } |
| 279 | 279 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @version $Id: 1.91 fieldattributes.php 13027 2015-02-14 12:18:10Z timgno $ |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | - /** |
|
| 27 | + /** |
|
| 28 | 28 | * @Class Fieldattributes |
| 29 | 29 | * @extends \XoopsObject |
| 30 | 30 | */ |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | class Fieldattributes extends \XoopsObject |
| 36 | 36 | { |
| 37 | 37 | /** |
| 38 | - * @public function constructor class |
|
| 39 | - * @param null |
|
| 40 | - */ |
|
| 38 | + * @public function constructor class |
|
| 39 | + * @param null |
|
| 40 | + */ |
|
| 41 | 41 | |
| 42 | 42 | public function __construct() |
| 43 | 43 | { |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * @static function getInstance |
|
| 51 | - * @param null |
|
| 50 | + * @static function getInstance |
|
| 51 | + * @param null |
|
| 52 | 52 | * @return Fieldattributes |
| 53 | 53 | */ |
| 54 | 54 | public static function getInstance() |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | class Fieldtype extends \XoopsObject |
| 32 | 32 | { |
| 33 | 33 | /** |
| 34 | - * @public function constructor class |
|
| 35 | - * @param null |
|
| 36 | - */ |
|
| 34 | + * @public function constructor class |
|
| 35 | + * @param null |
|
| 36 | + */ |
|
| 37 | 37 | |
| 38 | 38 | public function __construct() |
| 39 | 39 | { |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @static function getInstance |
|
| 47 | - * @param null |
|
| 46 | + * @static function getInstance |
|
| 47 | + * @param null |
|
| 48 | 48 | * @return Fieldtype |
| 49 | 49 | */ |
| 50 | 50 | public static function getInstance() |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | $ret = false; |
| 74 | 74 | |
| 75 | - $class = '\\XoopsModules\\' . ucfirst(mb_strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler'; |
|
| 75 | + $class = '\\XoopsModules\\'.ucfirst(mb_strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler'; |
|
| 76 | 76 | if (!class_exists($class)) { |
| 77 | 77 | throw new \RuntimeException("Class '$class' not found"); |
| 78 | 78 | } |