@@ -24,5 +24,5 @@ |
||
| 24 | 24 | // URL: https://xoops.org // |
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | -include __DIR__ . '/../../mainfile.php'; |
|
| 28 | -include XOOPS_ROOT_PATH . '/include/comment_edit.php'; |
|
| 27 | +include __DIR__.'/../../mainfile.php'; |
|
| 28 | +include XOOPS_ROOT_PATH.'/include/comment_edit.php'; |
|
@@ -24,5 +24,5 @@ |
||
| 24 | 24 | // URL: https://xoops.org // |
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | -include __DIR__ . '/../../mainfile.php'; |
|
| 28 | -include XOOPS_ROOT_PATH . '/include/comment_delete.php'; |
|
| 27 | +include __DIR__.'/../../mainfile.php'; |
|
| 28 | +include XOOPS_ROOT_PATH.'/include/comment_delete.php'; |
|
@@ -24,5 +24,5 @@ |
||
| 24 | 24 | // URL: https://xoops.org // |
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | -include __DIR__ . '/../../mainfile.php'; |
|
| 28 | -include XOOPS_ROOT_PATH . '/include/comment_post.php'; |
|
| 27 | +include __DIR__.'/../../mainfile.php'; |
|
| 28 | +include XOOPS_ROOT_PATH.'/include/comment_post.php'; |
|
@@ -14,43 +14,43 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | use Xmf\Request; |
| 16 | 16 | |
| 17 | -include __DIR__ . '/header.php'; |
|
| 17 | +include __DIR__.'/header.php'; |
|
| 18 | 18 | |
| 19 | 19 | if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
| 20 | 20 | $args['article'] = @$args_num[0]; |
| 21 | 21 | $args['op'] = @$args_str[0]; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -$article_id = Request::getInt('article', Request::getInt('article', @$args['article'], 'POST'), 'GET');//(int)(empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']); |
|
| 24 | +$article_id = Request::getInt('article', Request::getInt('article', @$args['article'], 'POST'), 'GET'); //(int)(empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']); |
|
| 25 | 25 | |
| 26 | -$op = Request::getString('op', Request::getString('op', @$args['op'], 'POST'), 'GET');//empty($_GET['op']) ? (empty($_POST['op']) ? @$args['op'] : $_POST['op']) : $_GET['op']; |
|
| 26 | +$op = Request::getString('op', Request::getString('op', @$args['op'], 'POST'), 'GET'); //empty($_GET['op']) ? (empty($_POST['op']) ? @$args['op'] : $_POST['op']) : $_GET['op']; |
|
| 27 | 27 | $op = strtolower(trim($op)); |
| 28 | 28 | |
| 29 | 29 | if (empty($article_id)) { |
| 30 | 30 | if (empty(Request::getUrl('HTTP_REFERER', '', 'SERVER'))) { |
| 31 | 31 | //$_SERVER['HTTP_REFERER'])) |
| 32 | 32 | |
| 33 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 33 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 34 | 34 | xoops_error(_NOPERM); |
| 35 | 35 | $xoopsOption['output_type'] = 'plain'; |
| 36 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 36 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 37 | 37 | exit(); |
| 38 | - } else { |
|
| 38 | + }else { |
|
| 39 | 39 | $ref_parser = parse_url(Request::getUrl('HTTP_REFERER', '', 'SERVER')); //$_SERVER['HTTP_REFERER']); |
| 40 | - $uri_parser = parse_url(Request::getUrl('REQUEST_URI', '', 'SERVER'));// $_SERVER['REQUEST_URI']); |
|
| 40 | + $uri_parser = parse_url(Request::getUrl('REQUEST_URI', '', 'SERVER')); // $_SERVER['REQUEST_URI']); |
|
| 41 | 41 | if ((!empty($ref_parser['host']) && !empty($uri_parser['host']) && $uri_parser['host'] != $ref_parser['host']) |
| 42 | 42 | || ($ref_parser['path'] != $uri_parser['path'])) { |
| 43 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 44 | - include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 43 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 44 | + include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 45 | 45 | xoops_confirm([], 'javascript: window.close();', sprintf(planet_constant('MD_TRANSFER_DONE'), ''), _CLOSE, Request::getUrl('HTTP_REFERER', '', 'SERVER')); |
| 46 | 46 | $xoopsOption['output_type'] = 'plain'; |
| 47 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 47 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 48 | 48 | exit(); |
| 49 | - } else { |
|
| 50 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 49 | + }else { |
|
| 50 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 51 | 51 | xoops_error(_NOPERM); |
| 52 | 52 | $xoopsOption['output_type'] = 'plain'; |
| 53 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 53 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 54 | 54 | exit(); |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -62,16 +62,16 @@ discard block |
||
| 62 | 62 | // Display option form |
| 63 | 63 | if (empty($op)) { |
| 64 | 64 | $module_variables .= "<input type=\"hidden\" name=\"article\" id=\"article\" value=\"{$article_id}\">"; |
| 65 | - include XOOPS_ROOT_PATH . '/Frameworks/transfer/option.transfer.php'; |
|
| 65 | + include XOOPS_ROOT_PATH.'/Frameworks/transfer/option.transfer.php'; |
|
| 66 | 66 | exit(); |
| 67 | -} else { |
|
| 67 | +}else { |
|
| 68 | 68 | $data = []; |
| 69 | 69 | $data['id'] = $article_id; |
| 70 | 70 | $data['title'] = $article_obj->getVar('art_title'); |
| 71 | 71 | $data['time'] = $article_obj->getTime('l'); |
| 72 | 72 | $data['image'] = ''; |
| 73 | 73 | $data['source'] = $article_obj->getVar('art_link'); |
| 74 | - $data['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
| 74 | + $data['url'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id'); |
|
| 75 | 75 | $data['author'] = $article_obj->getVar('art_author'); |
| 76 | 76 | |
| 77 | 77 | switch ($op) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | case 'print': |
| 84 | 84 | case 'pdf': |
| 85 | - ${"{$op}_data"} =& $data; |
|
| 85 | + ${"{$op}_data"} = & $data; |
|
| 86 | 86 | ${"{$op}_data"}['date'] = $pdf_data['time']; |
| 87 | 87 | ${"{$op}_data"}['content'] = $article_obj->getVar('art_content'); |
| 88 | 88 | break; |
@@ -92,6 +92,6 @@ discard block |
||
| 92 | 92 | $data['content'] = $article_obj->getSummary(); |
| 93 | 93 | break; |
| 94 | 94 | } |
| 95 | - include XOOPS_ROOT_PATH . '/Frameworks/transfer/action.transfer.php'; |
|
| 95 | + include XOOPS_ROOT_PATH.'/Frameworks/transfer/action.transfer.php'; |
|
| 96 | 96 | exit(); |
| 97 | 97 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | if (isset($GLOBALS['xoopsModuleConfig'])) { |
| 81 | 81 | $moduleConfig = $GLOBALS['xoopsModuleConfig']; |
| 82 | 82 | } |
| 83 | - } else { |
|
| 83 | + }else { |
|
| 84 | 84 | /** @var XoopsModuleHandler $moduleHandler */ |
| 85 | 85 | $moduleHandler = xoops_getHandler('module'); |
| 86 | 86 | $module = $moduleHandler->getByDirname($GLOBALS['moddirname']); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | unset($configs); |
| 95 | 95 | } |
| 96 | - if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') { |
|
| 96 | + if ($customConfig = @include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/plugin.php') { |
|
| 97 | 97 | $moduleConfig = array_merge($moduleConfig, $customConfig); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -106,11 +106,11 @@ discard block |
||
| 106 | 106 | if (!in_array(URL_DELIMITER, ['?', '/'])) { |
| 107 | 107 | die('Exit on security'); |
| 108 | 108 | } |
| 109 | - } else { |
|
| 109 | + }else { |
|
| 110 | 110 | $moduleConfig = planet_load_config(); |
| 111 | 111 | if (empty($moduleConfig['do_urw'])) { |
| 112 | 112 | define('URL_DELIMITER', '?'); |
| 113 | - } else { |
|
| 113 | + }else { |
|
| 114 | 114 | define('URL_DELIMITER', '/'); |
| 115 | 115 | } |
| 116 | 116 | } |
@@ -35,16 +35,16 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | public $parser; |
| 37 | 37 | |
| 38 | - public $current_item = []; // item currently being parsed |
|
| 39 | - public $items = []; // collection of parsed items |
|
| 40 | - public $channel = []; // hash of channel fields |
|
| 38 | + public $current_item = []; // item currently being parsed |
|
| 39 | + public $items = []; // collection of parsed items |
|
| 40 | + public $channel = []; // hash of channel fields |
|
| 41 | 41 | public $textinput = []; |
| 42 | 42 | public $image = []; |
| 43 | 43 | public $feed_type; |
| 44 | 44 | public $feed_version; |
| 45 | - public $encoding = ''; // output encoding of parsed rss |
|
| 45 | + public $encoding = ''; // output encoding of parsed rss |
|
| 46 | 46 | |
| 47 | - public $_source_encoding = ''; // only set if we have to parse xml prolog |
|
| 47 | + public $_source_encoding = ''; // only set if we have to parse xml prolog |
|
| 48 | 48 | |
| 49 | 49 | public $ERROR = ''; |
| 50 | 50 | public $WARNING = ''; |
@@ -101,13 +101,13 @@ discard block |
||
| 101 | 101 | # if PHP xml isn't compiled in, die |
| 102 | 102 | # |
| 103 | 103 | if (!function_exists('xml_parser_create')) { |
| 104 | - $this->error("Failed to load PHP's XML Extension. " . 'http://www.php.net/manual/en/ref.xml.php', E_USER_ERROR); |
|
| 104 | + $this->error("Failed to load PHP's XML Extension. ".'http://www.php.net/manual/en/ref.xml.php', E_USER_ERROR); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | list($parser, $source) = $this->create_parser($source, $output_encoding, $input_encoding, $detect_encoding); |
| 108 | 108 | |
| 109 | 109 | if (!is_resource($parser)) { |
| 110 | - $this->error("Failed to create an instance of PHP's XML parser. " . 'http://www.php.net/manual/en/ref.xml.php', E_USER_ERROR); |
|
| 110 | + $this->error("Failed to create an instance of PHP's XML parser. ".'http://www.php.net/manual/en/ref.xml.php', E_USER_ERROR); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | $this->parser = $parser; |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | elseif (ATOM == $this->feed_type && 'link' === $el) { |
| 218 | 218 | if (isset($attrs['rel']) && 'alternate' === $attrs['rel']) { |
| 219 | 219 | $link_el = 'link'; |
| 220 | - } else { |
|
| 221 | - $link_el = 'link_' . $attrs['rel']; |
|
| 220 | + }else { |
|
| 221 | + $link_el = 'link_'.$attrs['rel']; |
|
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | $this->append($link_el, $attrs['href']); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | { |
| 237 | 237 | if (ATOM == $this->feed_type && $this->incontent) { |
| 238 | 238 | $this->append_content($text); |
| 239 | - } else { |
|
| 239 | + }else { |
|
| 240 | 240 | $current_el = implode('_', array_reverse($this->stack)); |
| 241 | 241 | $this->append($current_el, $text); |
| 242 | 242 | } |
@@ -267,12 +267,12 @@ discard block |
||
| 267 | 267 | // note: i don't think this is actually neccessary |
| 268 | 268 | if ($this->stack[0] == $el) { |
| 269 | 269 | $this->append_content("</$el>"); |
| 270 | - } else { |
|
| 270 | + }else { |
|
| 271 | 271 | $this->append_content("<$el>"); |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | array_shift($this->stack); |
| 275 | - } else { |
|
| 275 | + }else { |
|
| 276 | 276 | array_shift($this->stack); |
| 277 | 277 | } |
| 278 | 278 | |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | } elseif ($this->inimage) { |
| 325 | 325 | $this->concat($this->image[$this->current_namespace][$el], $text); |
| 326 | 326 | } |
| 327 | - } else { |
|
| 327 | + }else { |
|
| 328 | 328 | if ($this->initem) { |
| 329 | 329 | $this->concat($this->current_item[$el], $text); |
| 330 | 330 | } elseif ($this->intextinput) { |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | // if atom populate rss fields |
| 343 | 343 | if ($this->is_atom()) { |
| 344 | 344 | $this->channel['description'] = $this->channel['tagline']; |
| 345 | - for ($i = 0, $iMax = count($this->items); $i < $iMax; ++$i) { |
|
| 345 | + for ($i = 0, $iMax = count($this->items); $i<$iMax; ++$i) { |
|
| 346 | 346 | $item = $this->items[$i]; |
| 347 | 347 | if (isset($item['summary'])) { |
| 348 | 348 | $item['description'] = $item['summary']; |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | $atom_date = isset($item['issued']) ? $item['issued'] : @$item['modified']; |
| 355 | 355 | if ($atom_date) { |
| 356 | 356 | $epoch = @parse_w3cdtf($atom_date); |
| 357 | - if ($epoch && $epoch > 0) { |
|
| 357 | + if ($epoch && $epoch>0) { |
|
| 358 | 358 | $item['date_timestamp'] = $epoch; |
| 359 | 359 | } |
| 360 | 360 | } |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | } |
| 364 | 364 | } elseif ($this->is_rss()) { |
| 365 | 365 | $this->channel['tagline'] = $this->channel['description']; |
| 366 | - for ($i = 0, $iMax = count($this->items); $i < $iMax; ++$i) { |
|
| 366 | + for ($i = 0, $iMax = count($this->items); $i<$iMax; ++$i) { |
|
| 367 | 367 | $item = $this->items[$i]; |
| 368 | 368 | if (isset($item['description'])) { |
| 369 | 369 | $item['summary'] = $item['description']; |
@@ -374,12 +374,12 @@ discard block |
||
| 374 | 374 | |
| 375 | 375 | if ('1.0' === $this->is_rss() && isset($item['dc']['date'])) { |
| 376 | 376 | $epoch = @parse_w3cdtf($item['dc']['date']); |
| 377 | - if ($epoch && $epoch > 0) { |
|
| 377 | + if ($epoch && $epoch>0) { |
|
| 378 | 378 | $item['date_timestamp'] = $epoch; |
| 379 | 379 | } |
| 380 | 380 | } elseif (isset($item['pubdate'])) { |
| 381 | 381 | $epoch = @strtotime($item['pubdate']); |
| 382 | - if ($epoch > 0) { |
|
| 382 | + if ($epoch>0) { |
|
| 383 | 383 | $item['date_timestamp'] = $epoch; |
| 384 | 384 | } |
| 385 | 385 | } |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | { |
| 397 | 397 | if (RSS == $this->feed_type) { |
| 398 | 398 | return $this->feed_version; |
| 399 | - } else { |
|
| 399 | + }else { |
|
| 400 | 400 | return false; |
| 401 | 401 | } |
| 402 | 402 | } |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | { |
| 409 | 409 | if (ATOM == $this->feed_type) { |
| 410 | 410 | return $this->feed_version; |
| 411 | - } else { |
|
| 411 | + }else { |
|
| 412 | 412 | return false; |
| 413 | 413 | } |
| 414 | 414 | } |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | { |
| 426 | 426 | if (5 == substr(PHP_VERSION, 0, 1)) { |
| 427 | 427 | $parser = $this->php5_create_parser($in_enc, $detect); |
| 428 | - } else { |
|
| 428 | + }else { |
|
| 429 | 429 | list($parser, $source) = $this->php4_create_parser($source, $in_enc, $detect); |
| 430 | 430 | } |
| 431 | 431 | if ($out_enc) { |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | // by default php5 does a fine job of detecting input encodings |
| 453 | 453 | if (!$detect && $in_enc) { |
| 454 | 454 | return xml_parser_create($in_enc); |
| 455 | - } else { |
|
| 455 | + }else { |
|
| 456 | 456 | return xml_parser_create(''); |
| 457 | 457 | } |
| 458 | 458 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | if (preg_match('/<?xml.*encoding=[\'"](.*?)[\'"].*?>/m', $source, $m)) { |
| 486 | 486 | $in_enc = strtoupper($m[1]); |
| 487 | 487 | $this->source_encoding = $in_enc; |
| 488 | - } else { |
|
| 488 | + }else { |
|
| 489 | 489 | $in_enc = 'UTF-8'; |
| 490 | 490 | } |
| 491 | 491 | } |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | $enc = strtoupper($enc); |
| 536 | 536 | if (in_array($enc, $this->_KNOWN_ENCODINGS)) { |
| 537 | 537 | return $enc; |
| 538 | - } else { |
|
| 538 | + }else { |
|
| 539 | 539 | return false; |
| 540 | 540 | } |
| 541 | 541 | } |
@@ -552,14 +552,14 @@ discard block |
||
| 552 | 552 | } |
| 553 | 553 | if (MAGPIE_DEBUG) { |
| 554 | 554 | trigger_error($errormsg, $lvl); |
| 555 | - } else { |
|
| 555 | + }else { |
|
| 556 | 556 | error_log($errormsg, 0); |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | $notices = E_USER_NOTICE | E_NOTICE; |
| 560 | 560 | if ($lvl & $notices) { |
| 561 | 561 | $this->WARNING = $errormsg; |
| 562 | - } else { |
|
| 562 | + }else { |
|
| 563 | 563 | $this->ERROR = $errormsg; |
| 564 | 564 | } |
| 565 | 565 | } |
@@ -595,12 +595,12 @@ discard block |
||
| 595 | 595 | ]; |
| 596 | 596 | |
| 597 | 597 | # calc epoch for current date assuming GMT |
| 598 | - $epoch = gmmktime((int)$hours, (int)$minutes, (int)$seconds, (int)$month, (int)$day, (int)$year); |
|
| 598 | + $epoch = gmmktime((int) $hours, (int) $minutes, (int) $seconds, (int) $month, (int) $day, (int) $year); |
|
| 599 | 599 | |
| 600 | 600 | $offset = 0; |
| 601 | 601 | if ('Z' === $match[10]) { |
| 602 | 602 | # zulu time, aka GMT |
| 603 | - } else { |
|
| 603 | + }else { |
|
| 604 | 604 | list($tz_mod, $tz_hour, $tz_min) = [$match[8], $match[9], $match[10]]; |
| 605 | 605 | |
| 606 | 606 | # zero out the variables |
@@ -611,20 +611,20 @@ discard block |
||
| 611 | 611 | $tz_min = 0; |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | - $offset_secs = (($tz_hour * 60) + $tz_min) * 60; |
|
| 614 | + $offset_secs = (($tz_hour*60)+$tz_min)*60; |
|
| 615 | 615 | |
| 616 | 616 | # is timezone ahead of GMT? then subtract offset |
| 617 | 617 | # |
| 618 | 618 | if ('+' == $tz_mod) { |
| 619 | - $offset_secs = $offset_secs * -1; |
|
| 619 | + $offset_secs = $offset_secs*-1; |
|
| 620 | 620 | } |
| 621 | 621 | |
| 622 | 622 | $offset = $offset_secs; |
| 623 | 623 | } |
| 624 | - $epoch = $epoch + $offset; |
|
| 624 | + $epoch = $epoch+$offset; |
|
| 625 | 625 | |
| 626 | 626 | return $epoch; |
| 627 | - } else { |
|
| 627 | + }else { |
|
| 628 | 628 | return -1; |
| 629 | 629 | } |
| 630 | 630 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | global $msg; |
| 32 | 32 | |
| 33 | -require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/class/magpie.inc.php'; |
|
| 33 | +require_once XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/class/magpie.inc.php'; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * XmlParser |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $this->feed_version = empty($this->feed_version) ? '0.3' : $this->feed_version; |
| 93 | 93 | |
| 94 | 94 | return $this->feed_version; |
| 95 | - } else { |
|
| 95 | + }else { |
|
| 96 | 96 | return false; |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $this->channel['tagline'] = @$this->channel['subtitle']; |
| 106 | 106 | unset($this->channel['subtitle']); |
| 107 | 107 | } |
| 108 | - for ($i = 0, $iMax = count($this->items); $i < $iMax; ++$i) { |
|
| 108 | + for ($i = 0, $iMax = count($this->items); $i<$iMax; ++$i) { |
|
| 109 | 109 | // ATOM time |
| 110 | 110 | if ($date = @$this->items[$i]['modified']) { |
| 111 | 111 | continue; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | $this->items[$i]['modified'] = $date; |
| 126 | 126 | } elseif ('1.0' !== $this->is_rss()): |
| 127 | - for ($i = 0, $iMax = count($this->items); $i < $iMax; ++$i) { |
|
| 127 | + for ($i = 0, $iMax = count($this->items); $i<$iMax; ++$i) { |
|
| 128 | 128 | if ($date = @$this->items[$i]['pubdate']) { |
| 129 | 129 | continue; |
| 130 | 130 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | unset($this->channel['tagline']); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - for ($i = 0, $iMax = count($this->items); $i < $iMax; ++$i) { |
|
| 153 | + for ($i = 0, $iMax = count($this->items); $i<$iMax; ++$i) { |
|
| 154 | 154 | if ($date_timestamp = @$this->items[$i]['date_timestamp']) { |
| 155 | 155 | continue; |
| 156 | 156 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $this->items[$i]['date_timestamp'] = $date_timestamp; |
| 159 | 159 | } elseif ($date_timestamp = @$this->items[$i]['dc']['date']) { |
| 160 | 160 | $this->items[$i]['date_timestamp'] = $date_timestamp; |
| 161 | - } else { |
|
| 161 | + }else { |
|
| 162 | 162 | $this->items[$i]['date_timestamp'] = time(); |
| 163 | 163 | } |
| 164 | 164 | if (!is_numeric($this->items[$i]['date_timestamp'])) { |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | foreach (array_keys($val) as $key) { |
| 205 | 205 | $val[$key] = $this->_encoding($val[$key]); |
| 206 | 206 | } |
| 207 | - } else { |
|
| 207 | + }else { |
|
| 208 | 208 | $val = XoopsLocal::convert_encoding($val, $this->charset_out, $this->charset_in); |
| 209 | 209 | } |
| 210 | 210 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** @var Planet\Helper $helper */ |
| 30 | 30 | $helper = Planet\Helper::getInstance(); |
| 31 | 31 | |
| 32 | -include __DIR__ . '/header.php'; |
|
| 32 | +include __DIR__.'/header.php'; |
|
| 33 | 33 | |
| 34 | 34 | if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
| 35 | 35 | $args['year'] = @$args_num[0]; |
@@ -48,26 +48,26 @@ discard block |
||
| 48 | 48 | $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
| 49 | 49 | $blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']); |
| 50 | 50 | |
| 51 | -$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_ACHIVE'); |
|
| 51 | +$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_ACHIVE'); |
|
| 52 | 52 | $xoopsOption['template_main'] = PlanetUtility::planetGetTemplate('archive'); |
| 53 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
| 54 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 53 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
| 54 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 55 | 55 | |
| 56 | 56 | $year = empty($year) ? date('Y') : $year; |
| 57 | -if ($month < 1) { |
|
| 57 | +if ($month<1) { |
|
| 58 | 58 | $month = $day = 0; |
| 59 | 59 | $page['time'] = sprintf(planet_constant('MD_TIME_Y'), $year); |
| 60 | -} elseif ($day < 1) { |
|
| 60 | +} elseif ($day<1) { |
|
| 61 | 61 | $day = 0; |
| 62 | 62 | $page['time'] = sprintf(planet_constant('MD_TIME_YM'), $year, $month); |
| 63 | -} else { |
|
| 63 | +}else { |
|
| 64 | 64 | $page['time'] = sprintf(planet_constant('MD_TIME_YMD'), $year, $month, $day); |
| 65 | 65 | } |
| 66 | 66 | $time = ['year' => $year, 'month' => $month, 'day' => $day]; |
| 67 | 67 | if ($xoopsUser) { |
| 68 | - $timeoffset = ($xoopsUser->getVar('timezone_offset') - $xoopsConfig['server_TZ']) * 3600; |
|
| 69 | -} else { |
|
| 70 | - $timeoffset = ($xoopsConfig['default_TZ'] - $xoopsConfig['server_TZ']) * 3600; |
|
| 68 | + $timeoffset = ($xoopsUser->getVar('timezone_offset')-$xoopsConfig['server_TZ'])*3600; |
|
| 69 | +}else { |
|
| 70 | + $timeoffset = ($xoopsConfig['default_TZ']-$xoopsConfig['server_TZ'])*3600; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $criteria = new \CriteriaCompo(); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $articles = []; |
| 91 | 91 | $blogs_id = []; |
| 92 | 92 | foreach ($articles_obj as $id => $article) { |
| 93 | - $articles[] = [ |
|
| 93 | + $articles[] = [ |
|
| 94 | 94 | 'id' => $id, |
| 95 | 95 | 'blog' => ['id' => $article->getVar('blog_id'), 'title' => ''], |
| 96 | 96 | 'title' => $article->getVar('art_title'), |
@@ -101,20 +101,20 @@ discard block |
||
| 101 | 101 | $blogs_id[$article->getVar('blog_id')] = 1; |
| 102 | 102 | unset($_article); |
| 103 | 103 | } |
| 104 | -$criteria_blog = new \Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN'); |
|
| 104 | +$criteria_blog = new \Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN'); |
|
| 105 | 105 | $blogs = $blogHandler->getList($criteria_blog); |
| 106 | 106 | foreach (array_keys($articles) as $key) { |
| 107 | 107 | $articles[$key]['blog']['title'] = $blogs[$articles[$key]['blog']['id']]; |
| 108 | 108 | } |
| 109 | -if ($blog_id > 0) { |
|
| 109 | +if ($blog_id>0) { |
|
| 110 | 110 | $page['blog'] = $blogs[$blog_id]; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | -if ($articles_count > $helper->getConfig('articles_perpage')) { |
|
| 114 | - include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 115 | - $nav = new \XoopsPageNav($articles_count, $helper->getConfig('articles_perpage'), $start, 'start', 'month=' . $month . '&day=' . $day . '&year=' . $year . '&blog=' . $blog_id); |
|
| 113 | +if ($articles_count>$helper->getConfig('articles_perpage')) { |
|
| 114 | + include XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 115 | + $nav = new \XoopsPageNav($articles_count, $helper->getConfig('articles_perpage'), $start, 'start', 'month='.$month.'&day='.$day.'&year='.$year.'&blog='.$blog_id); |
|
| 116 | 116 | $pagenav = $nav->renderNav(4); |
| 117 | -} else { |
|
| 117 | +}else { |
|
| 118 | 118 | $pagenav = ''; |
| 119 | 119 | } |
| 120 | 120 | |
@@ -123,43 +123,43 @@ discard block |
||
| 123 | 123 | $months = null; |
| 124 | 124 | if (empty($start)) { |
| 125 | 125 | if ($blog_id) { |
| 126 | - $blog_criteria = ' AND blog_id=' . $blog_id; |
|
| 127 | - } else { |
|
| 126 | + $blog_criteria = ' AND blog_id='.$blog_id; |
|
| 127 | + }else { |
|
| 128 | 128 | $blog_criteria = ''; |
| 129 | 129 | } |
| 130 | 130 | // Get monthly list |
| 131 | 131 | if (empty($month)) { |
| 132 | - $sql = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count |
|
| 133 | - FROM " . planet_DB_prefix('article') . " |
|
| 132 | + $sql = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count |
|
| 133 | + FROM ".planet_DB_prefix('article')." |
|
| 134 | 134 | WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year |
| 135 | - " . $blog_criteria . ' |
|
| 135 | + ".$blog_criteria.' |
|
| 136 | 136 | GROUP BY mon |
| 137 | 137 | '; |
| 138 | 138 | $result = $xoopsDB->query($sql); |
| 139 | 139 | $months = []; |
| 140 | 140 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
| 141 | 141 | $months[] = [ |
| 142 | - 'title' => planet_constant('MD_MONTH_' . (int)$myrow['mon']) . ' (' . (int)$myrow['count'] . ')', |
|
| 143 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $year . '/' . $myrow['mon'] . '/b' . $blog_id |
|
| 142 | + 'title' => planet_constant('MD_MONTH_'.(int) $myrow['mon']).' ('.(int) $myrow['count'].')', |
|
| 143 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$year.'/'.$myrow['mon'].'/b'.$blog_id |
|
| 144 | 144 | ]; |
| 145 | 145 | } |
| 146 | 146 | $timenav['prev'] = [ |
| 147 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . ($year - 1) . '/b' . $blog_id, |
|
| 148 | - 'title' => sprintf(planet_constant('MD_TIME_Y'), $year - 1) |
|
| 147 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.($year-1).'/b'.$blog_id, |
|
| 148 | + 'title' => sprintf(planet_constant('MD_TIME_Y'), $year-1) |
|
| 149 | 149 | ]; |
| 150 | - if ($year < date('Y')) { |
|
| 150 | + if ($year<date('Y')) { |
|
| 151 | 151 | $timenav['next'] = [ |
| 152 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . ($year + 1) . '/b' . $blog_id, |
|
| 153 | - 'title' => sprintf(planet_constant('MD_TIME_Y'), $year + 1) |
|
| 152 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.($year+1).'/b'.$blog_id, |
|
| 153 | + 'title' => sprintf(planet_constant('MD_TIME_Y'), $year+1) |
|
| 154 | 154 | ]; |
| 155 | 155 | } |
| 156 | 156 | } // Get daily list |
| 157 | 157 | elseif (empty($day)) { |
| 158 | - $sql = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count |
|
| 159 | - FROM " . planet_DB_prefix('article') . " |
|
| 158 | + $sql = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count |
|
| 159 | + FROM ".planet_DB_prefix('article')." |
|
| 160 | 160 | WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year |
| 161 | 161 | AND MONTH(FROM_UNIXTIME(art_time - $timeoffset)) = $month |
| 162 | - " . $blog_criteria . ' |
|
| 162 | + ".$blog_criteria.' |
|
| 163 | 163 | GROUP BY day |
| 164 | 164 | '; |
| 165 | 165 | $result = $xoopsDB->query($sql); |
@@ -167,35 +167,35 @@ discard block |
||
| 167 | 167 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
| 168 | 168 | $days[$myrow['day']]['count'] = $myrow['count']; |
| 169 | 169 | } |
| 170 | - for ($i = 1; $i <= 31; ++$i) { |
|
| 170 | + for ($i = 1; $i<=31; ++$i) { |
|
| 171 | 171 | if (!isset($days[$i])) { |
| 172 | 172 | continue; |
| 173 | 173 | } |
| 174 | 174 | $days[$i] = [ |
| 175 | 175 | 'title' => $days[$i]['count'], |
| 176 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $year . '/' . $month . '/' . $i . '/b' . $blog_id |
|
| 176 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$year.'/'.$month.'/'.$i.'/b'.$blog_id |
|
| 177 | 177 | ]; |
| 178 | 178 | } |
| 179 | 179 | $calendar = planet_getCalendar($year, $month, $days); |
| 180 | - $month_next = $month + 1; |
|
| 181 | - $month_prev = $month - 1; |
|
| 180 | + $month_next = $month+1; |
|
| 181 | + $month_prev = $month-1; |
|
| 182 | 182 | $_year = $year; |
| 183 | 183 | if (12 == $month) { |
| 184 | 184 | $month_next = 1; |
| 185 | - $_year = $year + 1; |
|
| 185 | + $_year = $year+1; |
|
| 186 | 186 | } |
| 187 | 187 | if (1 == $month) { |
| 188 | 188 | $month_pre = 12; |
| 189 | - $_year = $year - 1; |
|
| 189 | + $_year = $year-1; |
|
| 190 | 190 | } |
| 191 | 191 | $timenav['prev'] = [ |
| 192 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $_year . '/' . $month_prev . '/b' . $blog_id, |
|
| 193 | - 'title' => planet_constant('MD_MONTH_' . $month_prev) |
|
| 192 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$_year.'/'.$month_prev.'/b'.$blog_id, |
|
| 193 | + 'title' => planet_constant('MD_MONTH_'.$month_prev) |
|
| 194 | 194 | ]; |
| 195 | - if ($year < date('Y') || $month < date('n')) { |
|
| 195 | + if ($year<date('Y') || $month<date('n')) { |
|
| 196 | 196 | $timenav['next'] = [ |
| 197 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $_year . '/' . $month_next . '/b' . $blog_id, |
|
| 198 | - 'title' => planet_constant('MD_MONTH_' . $month_next) |
|
| 197 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$_year.'/'.$month_next.'/b'.$blog_id, |
|
| 198 | + 'title' => planet_constant('MD_MONTH_'.$month_next) |
|
| 199 | 199 | ]; |
| 200 | 200 | } |
| 201 | 201 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $xoopsTpl->assign('timenav', $timenav); |
| 216 | 216 | $xoopsTpl->assign('pagenav', $pagenav); |
| 217 | 217 | |
| 218 | -require_once __DIR__ . '/footer.php'; |
|
| 218 | +require_once __DIR__.'/footer.php'; |
|
| 219 | 219 | |
| 220 | 220 | /** |
| 221 | 221 | * @param null $year |
@@ -232,24 +232,24 @@ discard block |
||
| 232 | 232 | ob_start(); |
| 233 | 233 | echo '<table id="calendar">'; |
| 234 | 234 | echo '<caption>'; |
| 235 | - printf(planet_constant('MD_TIME_YM'), $year, planet_constant('MD_MONTH_' . $month)); |
|
| 235 | + printf(planet_constant('MD_TIME_YM'), $year, planet_constant('MD_MONTH_'.$month)); |
|
| 236 | 236 | echo '</caption>'; |
| 237 | 237 | |
| 238 | - for ($i = 1; $i <= 7; ++$i) { |
|
| 239 | - echo "\n\t\t<th abbr=\"" . planet_constant('MD_WEEK_' . $i) . '" scope="col" title="' . planet_constant('MD_WEEK_' . $i) . '">' . planet_constant('MD_WEEK_' . $i) . '</th>'; |
|
| 238 | + for ($i = 1; $i<=7; ++$i) { |
|
| 239 | + echo "\n\t\t<th abbr=\"".planet_constant('MD_WEEK_'.$i).'" scope="col" title="'.planet_constant('MD_WEEK_'.$i).'">'.planet_constant('MD_WEEK_'.$i).'</th>'; |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | echo '<tr>'; |
| 243 | 243 | |
| 244 | 244 | // See how much we should pad in the beginning |
| 245 | 245 | $week_begins = 1; |
| 246 | - $pad = planet_calendar_week_mod(date('w', $unixmonth) - $week_begins); |
|
| 246 | + $pad = planet_calendar_week_mod(date('w', $unixmonth)-$week_begins); |
|
| 247 | 247 | if (0 != $pad) { |
| 248 | - echo "\n\t\t" . '<td colspan="' . $pad . '"> </td>'; |
|
| 248 | + echo "\n\t\t".'<td colspan="'.$pad.'"> </td>'; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | - $daysinmonth = (int)date('t', $unixmonth); |
|
| 252 | - for ($day = 1; $day <= $daysinmonth; ++$day) { |
|
| 251 | + $daysinmonth = (int) date('t', $unixmonth); |
|
| 252 | + for ($day = 1; $day<=$daysinmonth; ++$day) { |
|
| 253 | 253 | if (isset($newrow) && $newrow) { |
| 254 | 254 | echo "\n\t</tr>\n\t<tr>\n\t\t"; |
| 255 | 255 | } |
@@ -258,26 +258,26 @@ discard block |
||
| 258 | 258 | echo '<td>'; |
| 259 | 259 | |
| 260 | 260 | if (!empty($days[$day]['url'])) { |
| 261 | - echo '<a href="' . $days[$day]['url'] . '"'; |
|
| 261 | + echo '<a href="'.$days[$day]['url'].'"'; |
|
| 262 | 262 | if (!empty($days[$day]['title'])) { |
| 263 | - echo 'title="' . $days[$day]['title'] . '"'; |
|
| 263 | + echo 'title="'.$days[$day]['title'].'"'; |
|
| 264 | 264 | } |
| 265 | 265 | echo ">$day</a>"; |
| 266 | 266 | } elseif (!empty($days[$day]['title'])) { |
| 267 | - echo '<acronym title="' . $days[$day]['title'] . "\">$day</acronym>"; |
|
| 268 | - } else { |
|
| 267 | + echo '<acronym title="'.$days[$day]['title']."\">$day</acronym>"; |
|
| 268 | + }else { |
|
| 269 | 269 | echo $day; |
| 270 | 270 | } |
| 271 | 271 | echo '</td>'; |
| 272 | 272 | |
| 273 | - if (6 == planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year)) - $week_begins)) { |
|
| 273 | + if (6 == planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year))-$week_begins)) { |
|
| 274 | 274 | $newrow = true; |
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - $pad = 7 - planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year)) - $week_begins); |
|
| 278 | + $pad = 7-planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year))-$week_begins); |
|
| 279 | 279 | if (0 != $pad && 7 != $pad) { |
| 280 | - echo "\n\t\t" . '<td class="pad" colspan="' . $pad . '"> </td>'; |
|
| 280 | + echo "\n\t\t".'<td class="pad" colspan="'.$pad.'"> </td>'; |
|
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | echo "\n\t</tr>\n\t</tbody>\n\t</table>"; |
@@ -296,5 +296,5 @@ discard block |
||
| 296 | 296 | { |
| 297 | 297 | $base = 7; |
| 298 | 298 | |
| 299 | - return ($num - $base * floor($num / $base)); |
|
| 299 | + return ($num-$base*floor($num/$base)); |
|
| 300 | 300 | } |
@@ -26,26 +26,26 @@ discard block |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | use Xmf\Request; |
| 28 | 28 | |
| 29 | -include __DIR__ . '/header.php'; |
|
| 29 | +include __DIR__.'/header.php'; |
|
| 30 | 30 | |
| 31 | -$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET');//(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
|
| 31 | +$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET'); //(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
|
| 32 | 32 | if (empty($art_id)) { |
| 33 | 33 | redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID')); |
| 34 | 34 | } |
| 35 | 35 | if (!$xoopsUser->isAdmin()) { |
| 36 | 36 | redirect_header('javascript:history.go(-1);', 2, _NOPERM); |
| 37 | 37 | } |
| 38 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
| 39 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 38 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
| 39 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 40 | 40 | |
| 41 | 41 | $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
| 42 | 42 | $article_obj = $articleHandler->get($art_id); |
| 43 | 43 | |
| 44 | -$op = Request::getCmd('op', 'check', 'POST');//isset($_POST['op']) ? $_POST['op'] : ''; |
|
| 44 | +$op = Request::getCmd('op', 'check', 'POST'); //isset($_POST['op']) ? $_POST['op'] : ''; |
|
| 45 | 45 | |
| 46 | 46 | if ('del' === $op || !empty(Request::getString('del', '', 'POST'))) { |
| 47 | 47 | $articleHandler->delete($article_obj); |
| 48 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
| 48 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
| 49 | 49 | $message = planet_constant('MD_SAVED'); |
| 50 | 50 | redirect_header($redirect, 2, $message); |
| 51 | 51 | } elseif ('save' === $op) { |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $art_id_new = $articleHandler->insert($article_obj); |
| 68 | 68 | if (!$article_obj->getVar('art_id')) { |
| 69 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
| 69 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
| 70 | 70 | $message = planet_constant('MD_INSERTERROR'); |
| 71 | - } else { |
|
| 72 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
| 71 | + }else { |
|
| 72 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id'); |
|
| 73 | 73 | $message = planet_constant('MD_SAVED'); |
| 74 | 74 | } |
| 75 | 75 | redirect_header($redirect, 2, $message); |
| 76 | -} else { |
|
| 77 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 76 | +}else { |
|
| 77 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 78 | 78 | |
| 79 | 79 | $form = new \XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true); |
| 80 | 80 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'"); |
| 94 | 94 | $button_tray->addElement($butt_del); |
| 95 | 95 | $butt_cancel = new \XoopsFormButton('', 'cancel', _CANCEL, 'button'); |
| 96 | - $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $art_id . "\"'"); |
|
| 96 | + $butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$art_id."\"'"); |
|
| 97 | 97 | $button_tray->addElement($butt_cancel); |
| 98 | 98 | $form->addElement($button_tray); |
| 99 | 99 | $form->display(); |
| 100 | 100 | } |
| 101 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 101 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|