@@ -87,12 +87,12 @@ |
||
| 87 | 87 | |
| 88 | 88 | //add data to smarty template |
| 89 | 89 | $GLOBALS['xoopsTpl']->assign([ |
| 90 | - 'sselect' => strtr(_MA_PEDIGREE_SELECT, ['[animalType]' => $moduleConfig['animalType']]), |
|
| 91 | - 'explain' => _MA_PEDIGREE_EXPLAIN, |
|
| 92 | - 'sname' => _MA_PEDIGREE_SEARCHNAME, |
|
| 93 | - 'snameex' => strtr(_MA_PEDIGREE_SEARCHNAME_EX, ['[animalTypes]' => $moduleConfig['animalTypes']]), |
|
| 94 | - 'usersearch' => isset($usersearch) ? $usersearch : '' |
|
| 95 | - ]); |
|
| 90 | + 'sselect' => strtr(_MA_PEDIGREE_SELECT, ['[animalType]' => $moduleConfig['animalType']]), |
|
| 91 | + 'explain' => _MA_PEDIGREE_EXPLAIN, |
|
| 92 | + 'sname' => _MA_PEDIGREE_SEARCHNAME, |
|
| 93 | + 'snameex' => strtr(_MA_PEDIGREE_SEARCHNAME_EX, ['[animalTypes]' => $moduleConfig['animalTypes']]), |
|
| 94 | + 'usersearch' => isset($usersearch) ? $usersearch : '' |
|
| 95 | + ]); |
|
| 96 | 96 | $GLOBALS['xoopsTpl']->assign('showwelcome', $moduleConfig['showwelcome']); |
| 97 | 97 | //$GLOBALS['xoopsTpl']->assign('welcome', $GLOBALS['myts']->displayTarea($moduleConfig['welcome'])); |
| 98 | 98 | //$word = $myts->displayTarea(strtr($helper->getConfig('welcome'), array('[numanimals]' => $numdogs, '[animalType]' => $helper->getConfig('animalType'), '[animalTypes]' => $helper->getConfig('animalTypes')))); |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $phpThumb->ErrorImage('ERROR: "' . $SourceFilename . '" cannot be read'); |
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | - if (\Xmf\Request::hasVar('HTTP_REFERER', 'SERVER')) { |
|
| 266 | + if (\Xmf\Request::hasVar('HTTP_REFERER', 'SERVER')) { |
|
| 267 | 267 | $phpThumb->ErrorImage('&md5s=' . $md5s); |
| 268 | 268 | } else { |
| 269 | 269 | die('&md5s=' . $md5s); |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | $phpThumb->ErrorImage('Headers already sent (' . basename(__FILE__) . ' line ' . __LINE__ . ')'); |
| 585 | 585 | exit; |
| 586 | 586 | } |
| 587 | - if (\Xmf\Request::hasVar('phpThumbDebug', 'GET')) { |
|
| 587 | + if (\Xmf\Request::hasVar('phpThumbDebug', 'GET')) { |
|
| 588 | 588 | $phpThumb->DebugTimingMessage('skipped direct $SourceFilename passthru', __FILE__, __LINE__); |
| 589 | 589 | $phpThumb->DebugMessage('Would have passed "' . $SourceFilename . '" through directly, but skipping due to phpThumbDebug', __FILE__, __LINE__); |
| 590 | 590 | break; |
@@ -1588,10 +1588,10 @@ discard block |
||
| 1588 | 1588 | $this->DebugMessage('using ImageMagick path from $this->config_imagemagick_path (' . $this->config_imagemagick_path . ')', __FILE__, __LINE__); |
| 1589 | 1589 | if ($this->iswindows) { |
| 1590 | 1590 | $commandline = substr($this->config_imagemagick_path, 0, 2) |
| 1591 | - . ' && cd ' |
|
| 1592 | - . phpthumb_functions::escapeshellarg_replacement(str_replace('/', DIRECTORY_SEPARATOR, substr(dirname($this->config_imagemagick_path), 2))) |
|
| 1593 | - . ' && ' |
|
| 1594 | - . phpthumb_functions::escapeshellarg_replacement(basename($this->config_imagemagick_path)); |
|
| 1591 | + . ' && cd ' |
|
| 1592 | + . phpthumb_functions::escapeshellarg_replacement(str_replace('/', DIRECTORY_SEPARATOR, substr(dirname($this->config_imagemagick_path), 2))) |
|
| 1593 | + . ' && ' |
|
| 1594 | + . phpthumb_functions::escapeshellarg_replacement(basename($this->config_imagemagick_path)); |
|
| 1595 | 1595 | } else { |
| 1596 | 1596 | $commandline = phpthumb_functions::escapeshellarg_replacement($this->config_imagemagick_path); |
| 1597 | 1597 | } |
@@ -2204,9 +2204,9 @@ discard block |
||
| 2204 | 2204 | |
| 2205 | 2205 | if (($method > 1) |
| 2206 | 2206 | && !$this->ImageMagickSwitchAvailable([ |
| 2207 | - 'channel', |
|
| 2208 | - 'contrast-stretch' |
|
| 2209 | - ])) { |
|
| 2207 | + 'channel', |
|
| 2208 | + 'contrast-stretch' |
|
| 2209 | + ])) { |
|
| 2210 | 2210 | // Because ImageMagick processing happens before PHP-GD filters, and because some |
| 2211 | 2211 | // clipping is involved in the "lvl" filter, if "lvl" happens before "wb" then the |
| 2212 | 2212 | // "wb" filter will have (almost) no effect. Therefore, if "wb" is enabled then |
@@ -2311,11 +2311,11 @@ discard block |
||
| 2311 | 2311 | |
| 2312 | 2312 | case 'bord': |
| 2313 | 2313 | if ($this->ImageMagickSwitchAvailable([ |
| 2314 | - 'border', |
|
| 2315 | - 'bordercolor', |
|
| 2316 | - 'thumbnail', |
|
| 2317 | - 'crop' |
|
| 2318 | - ])) { |
|
| 2314 | + 'border', |
|
| 2315 | + 'bordercolor', |
|
| 2316 | + 'thumbnail', |
|
| 2317 | + 'crop' |
|
| 2318 | + ])) { |
|
| 2319 | 2319 | if (!$this->zc) { |
| 2320 | 2320 | @list($width, $rX, $rY, $color) = explode('|', $parameter); |
| 2321 | 2321 | $width = (int)$width; |
@@ -2335,7 +2335,7 @@ discard block |
||
| 2335 | 2335 | $commandline = str_replace( |
| 2336 | 2336 | ' -' . $IMresizeParameter . ' "' . $matches[1] . 'x' . $matches[2] . '" ', |
| 2337 | 2337 | ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement(($matches[1] - (2 * $width)) . 'x' . ($matches[2] - (2 * $width))) . ' ', |
| 2338 | - $commandline |
|
| 2338 | + $commandline |
|
| 2339 | 2339 | ); |
| 2340 | 2340 | } |
| 2341 | 2341 | $successfullyProcessedFilters[] = $filterkey; |
@@ -3976,16 +3976,16 @@ discard block |
||
| 3976 | 3976 | $memory_get_usage = (function_exists('memory_get_usage') ? memory_get_usage() : 0); |
| 3977 | 3977 | |
| 3978 | 3978 | return $this->ErrorImage('Source image is too large (' |
| 3979 | - . $this->source_width |
|
| 3980 | - . 'x' |
|
| 3981 | - . $this->source_height |
|
| 3982 | - . ' = ' |
|
| 3983 | - . number_format($this->source_width * $this->source_height / 1000000, 1) |
|
| 3984 | - . 'Mpx, max=' |
|
| 3985 | - . number_format($this->config_max_source_pixels / 1000000, 1) |
|
| 3986 | - . 'Mpx) for GD creation (either install ImageMagick or increase PHP memory_limit to at least ' |
|
| 3987 | - . ceil(($memory_get_usage + (5 * $this->source_width * $this->source_height)) / 1048576) |
|
| 3988 | - . 'M).'); |
|
| 3979 | + . $this->source_width |
|
| 3980 | + . 'x' |
|
| 3981 | + . $this->source_height |
|
| 3982 | + . ' = ' |
|
| 3983 | + . number_format($this->source_width * $this->source_height / 1000000, 1) |
|
| 3984 | + . 'Mpx, max=' |
|
| 3985 | + . number_format($this->config_max_source_pixels / 1000000, 1) |
|
| 3986 | + . 'Mpx) for GD creation (either install ImageMagick or increase PHP memory_limit to at least ' |
|
| 3987 | + . ceil(($memory_get_usage + (5 * $this->source_width * $this->source_height)) / 1048576) |
|
| 3988 | + . 'M).'); |
|
| 3989 | 3989 | } |
| 3990 | 3990 | if ($this->md5s && ($this->md5s != md5($this->rawImageData))) { |
| 3991 | 3991 | return $this->ErrorImage('$this->md5s != md5($this->rawImageData)' . "\n" . '"' . $this->md5s . '" != ' . "\n" . '"' . md5($this->rawImageData) . '"'); |
@@ -4135,8 +4135,8 @@ discard block |
||
| 4135 | 4135 | $this->ErrorImage(implode("\n", $errormessages)); |
| 4136 | 4136 | } else { |
| 4137 | 4137 | $this->DebugMessage('All attempts to create GD image source failed (' . (ini_get('safe_mode') ? 'Safe Mode enabled, ImageMagick unavailable and source image probably too large for GD' : ($GDreadSupport ? 'source image probably corrupt' : 'GD does not have read support for "' |
| 4138 | - . $imageHeader |
|
| 4139 | - . '"')) . '), cannot generate thumbnail'); |
|
| 4138 | + . $imageHeader |
|
| 4139 | + . '"')) . '), cannot generate thumbnail'); |
|
| 4140 | 4140 | //$this->DebugMessage('All attempts to create GD image source failed ('.($GDreadSupport ? 'source image probably corrupt' : 'GD does not have read support for "'.$imageHeader.'"').'), outputing raw image', __FILE__, __LINE__); |
| 4141 | 4141 | //if (!$this->phpThumbDebug) { |
| 4142 | 4142 | // header($imageHeader); |
@@ -4545,12 +4545,12 @@ discard block |
||
| 4545 | 4545 | $height = ($height ?: $this->config_error_image_height); |
| 4546 | 4546 | |
| 4547 | 4547 | $text = 'phpThumb() v' . $this->phpthumb_version . "\n" . 'http://phpthumb.sourceforge.net' . "\n\n" . ($this->config_disable_debug ? 'Error messages disabled.' |
| 4548 | - . "\n\n" |
|
| 4549 | - . 'edit phpThumb.config.php and (temporarily) set' |
|
| 4550 | - . "\n" |
|
| 4551 | - . '$PHPTHUMB_CONFIG[\'disable_debug\'] = false;' |
|
| 4552 | - . "\n" |
|
| 4553 | - . 'to view the details of this error' : $text); |
|
| 4548 | + . "\n\n" |
|
| 4549 | + . 'edit phpThumb.config.php and (temporarily) set' |
|
| 4550 | + . "\n" |
|
| 4551 | + . '$PHPTHUMB_CONFIG[\'disable_debug\'] = false;' |
|
| 4552 | + . "\n" |
|
| 4553 | + . 'to view the details of this error' : $text); |
|
| 4554 | 4554 | |
| 4555 | 4555 | $this->FatalError($text); |
| 4556 | 4556 | $this->DebugMessage($text, __FILE__, __LINE__); |
@@ -60,17 +60,17 @@ |
||
| 60 | 60 | |
| 61 | 61 | //query |
| 62 | 62 | $queryString = 'SELECT d.id AS d_id, d.naam AS d_naam, d.roft AS d_roft, d.mother AS d_mother, d.father AS d_father, d.foto AS d_foto, d.user AS d_user, f.id AS f_id, f.naam AS f_naam, m.id AS m_id, m.naam AS m_naam, u.uname AS u_uname FROM ' |
| 63 | - . $GLOBALS['xoopsDB']->prefix('pedigree_tree') |
|
| 64 | - . ' d LEFT JOIN ' |
|
| 65 | - . $GLOBALS['xoopsDB']->prefix('pedigree_tree') |
|
| 66 | - . ' f ON d.father = f.id LEFT JOIN ' |
|
| 67 | - . $GLOBALS['xoopsDB']->prefix('pedigree_tree') |
|
| 68 | - . ' m ON d.mother = m.id LEFT JOIN ' |
|
| 69 | - . $GLOBALS['xoopsDB']->prefix('users') |
|
| 70 | - . ' u ON d.user = u.uid ORDER BY d.id DESC LIMIT ' |
|
| 71 | - . $st |
|
| 72 | - . ', ' |
|
| 73 | - . $perPage; |
|
| 63 | + . $GLOBALS['xoopsDB']->prefix('pedigree_tree') |
|
| 64 | + . ' d LEFT JOIN ' |
|
| 65 | + . $GLOBALS['xoopsDB']->prefix('pedigree_tree') |
|
| 66 | + . ' f ON d.father = f.id LEFT JOIN ' |
|
| 67 | + . $GLOBALS['xoopsDB']->prefix('pedigree_tree') |
|
| 68 | + . ' m ON d.mother = m.id LEFT JOIN ' |
|
| 69 | + . $GLOBALS['xoopsDB']->prefix('users') |
|
| 70 | + . ' u ON d.user = u.uid ORDER BY d.id DESC LIMIT ' |
|
| 71 | + . $st |
|
| 72 | + . ', ' |
|
| 73 | + . $perPage; |
|
| 74 | 74 | $result = $GLOBALS['xoopsDB']->query($queryString); |
| 75 | 75 | $pathIcon16 = \Xmf\Module\Admin::iconUrl('', 16); |
| 76 | 76 | |
@@ -272,15 +272,15 @@ discard block |
||
| 272 | 272 | global $nl, $detail, $depth, $IDs; |
| 273 | 273 | // print_r ($IDs) ; |
| 274 | 274 | echo $nl |
| 275 | - . '<br>' |
|
| 276 | - . $nl |
|
| 277 | - . '<table border="3" cellpadding="4" width="85%"" cellpadding="0" cellspacing="0">' |
|
| 278 | - . $nl |
|
| 279 | - . '<tr><th colspan="10" align="center">SKETCH PEDIGREE OF COMMON PROGENY</th></tr>' |
|
| 280 | - . $nl |
|
| 281 | - . '<tr align="center" valign="middle"><th>Progeny</th><th>' |
|
| 282 | - . _('Sire / Dam') |
|
| 283 | - . '</th>'; |
|
| 275 | + . '<br>' |
|
| 276 | + . $nl |
|
| 277 | + . '<table border="3" cellpadding="4" width="85%"" cellpadding="0" cellspacing="0">' |
|
| 278 | + . $nl |
|
| 279 | + . '<tr><th colspan="10" align="center">SKETCH PEDIGREE OF COMMON PROGENY</th></tr>' |
|
| 280 | + . $nl |
|
| 281 | + . '<tr align="center" valign="middle"><th>Progeny</th><th>' |
|
| 282 | + . _('Sire / Dam') |
|
| 283 | + . '</th>'; |
|
| 284 | 284 | if ($depth >= 2) { |
| 285 | 285 | echo '<th>' . _('Grandparents') . '</th>' . $nl; |
| 286 | 286 | } |
@@ -950,14 +950,14 @@ discard block |
||
| 950 | 950 | } |
| 951 | 951 | |
| 952 | 952 | $title = strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']]) |
| 953 | - . ' (' |
|
| 954 | - . stripslashes(Pedigree\Utility::showParent($codec2)) |
|
| 955 | - . ')' |
|
| 956 | - . _MA_PEDIGREE_COI_AND |
|
| 957 | - . strtr(_MA_PEDIGREE_FLD_MOTH, ['[mother]' => $moduleConfig['mother']]) |
|
| 958 | - . ' (' |
|
| 959 | - . stripslashes(Pedigree\Utility::showParent($codec1)) |
|
| 960 | - . ')'; |
|
| 953 | + . ' (' |
|
| 954 | + . stripslashes(Pedigree\Utility::showParent($codec2)) |
|
| 955 | + . ')' |
|
| 956 | + . _MA_PEDIGREE_COI_AND |
|
| 957 | + . strtr(_MA_PEDIGREE_FLD_MOTH, ['[mother]' => $moduleConfig['mother']]) |
|
| 958 | + . ' (' |
|
| 959 | + . stripslashes(Pedigree\Utility::showParent($codec1)) |
|
| 960 | + . ')'; |
|
| 961 | 961 | $content = stripslashes(one_animal($codec2)); |
| 962 | 962 | $content .= stripslashes(one_animal($codec1)); |
| 963 | 963 | $val = ''; |
@@ -162,18 +162,18 @@ |
||
| 162 | 162 | |
| 163 | 163 | //add data to smarty template |
| 164 | 164 | $GLOBALS['xoopsTpl']->assign([ |
| 165 | - 'page_title' => stripslashes($row['d_naam']), |
|
| 166 | - 'd' => $d, //assign dog |
|
| 167 | - //assign config options |
|
| 168 | - 'male' => "<img src='assets/images/male.gif'>", |
|
| 169 | - 'female' => "<img src='assets/images/female.gif'>", |
|
| 170 | - //assign extra display options |
|
| 171 | - 'unknown' => 'Unknown', |
|
| 172 | - 'SD' => _MA_PEDIGREE_SD, |
|
| 173 | - 'PA' => _MA_PEDIGREE_PA, |
|
| 174 | - 'GP' => _MA_PEDIGREE_GP, |
|
| 175 | - 'GGP' => _MA_PEDIGREE_GGP |
|
| 176 | - ]); |
|
| 165 | + 'page_title' => stripslashes($row['d_naam']), |
|
| 166 | + 'd' => $d, //assign dog |
|
| 167 | + //assign config options |
|
| 168 | + 'male' => "<img src='assets/images/male.gif'>", |
|
| 169 | + 'female' => "<img src='assets/images/female.gif'>", |
|
| 170 | + //assign extra display options |
|
| 171 | + 'unknown' => 'Unknown', |
|
| 172 | + 'SD' => _MA_PEDIGREE_SD, |
|
| 173 | + 'PA' => _MA_PEDIGREE_PA, |
|
| 174 | + 'GP' => _MA_PEDIGREE_GP, |
|
| 175 | + 'GGP' => _MA_PEDIGREE_GGP |
|
| 176 | + ]); |
|
| 177 | 177 | |
| 178 | 178 | // include __DIR__ . '/footer.php'; |
| 179 | 179 | } |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | protected function __construct($debug) |
| 39 | 39 | { |
| 40 | 40 | $this->debug = $debug; |
| 41 | - $moduleDirName = basename(dirname(__DIR__)); |
|
| 42 | - parent::__construct($moduleDirName); |
|
| 41 | + $moduleDirName = basename(dirname(__DIR__)); |
|
| 42 | + parent::__construct($moduleDirName); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -823,9 +823,9 @@ |
||
| 823 | 823 | { |
| 824 | 824 | $helper = Pedigree\Helper::getInstance(); |
| 825 | 825 | |
| 826 | - $pedigree_isAdmin = $helper->isUserAdmin(); |
|
| 826 | + $pedigree_isAdmin = $helper->isUserAdmin(); |
|
| 827 | 827 | |
| 828 | - return $pedigree_isAdmin; |
|
| 828 | + return $pedigree_isAdmin; |
|
| 829 | 829 | } |
| 830 | 830 | |
| 831 | 831 | public static function getXoopsCpHeader() |
@@ -96,9 +96,9 @@ |
||
| 96 | 96 | $currentType = $this->getVar('litter') ? 'litter' : 'generallitter'; |
| 97 | 97 | $litterRadio = new \XoopsFormRadio(_AM_PEDIGREE_PEDIGREE_CONFIG_LITTER_TYPE, 'litterType', $currentType); |
| 98 | 98 | $litterRadio->addOptionArray([ |
| 99 | - 'litter' => _AM_PEDIGREE_PEDIGREE_CONFIG_LITTER, |
|
| 100 | - 'generallitter' => _AM_PEDIGREE_PEDIGREE_CONFIG_GENERALLITTER |
|
| 101 | - ]); |
|
| 99 | + 'litter' => _AM_PEDIGREE_PEDIGREE_CONFIG_LITTER, |
|
| 100 | + 'generallitter' => _AM_PEDIGREE_PEDIGREE_CONFIG_GENERALLITTER |
|
| 101 | + ]); |
|
| 102 | 102 | $form->addElement($litterRadio, false); |
| 103 | 103 | // $form->addElement(new \XoopsFormRadioYN(_AM_PEDIGREE_PEDIGREE_CONFIG_LITTER, "Litter", $this->getVar("Litter")), false); |
| 104 | 104 | // $form->addElement(new \XoopsFormRadioYN(_AM_PEDIGREE_PEDIGREE_CONFIG_GENERALLITTER, "Generallitter", $this->getVar("Generallitter")), false); |