Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php update fixes for blog page #14

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CategoriesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public function categoryParseArticle($obj, $arrArticle, $objTemplate)
{
if(!isset(self::$arrJumpTo[$arrArticle['pid']])) {
$this->import('Database');
$objJumpTo = $this->Database->prepare('SELECT tl_page.id, tl_page.alias
$objJumpTo = $this->Database->prepare('SELECT tl_page.*
FROM tl_page
LEFT JOIN tl_news4ward ON (tl_page.id=tl_news4ward.jumpToList)
WHERE tl_news4ward.id=?')
->execute($article['pid']);
->execute($arrArticle['pid']);
if($objJumpTo->numRows) {
self::$arrJumpTo[$arrArticle['pid']] = $objJumpTo->row();
} else {
Expand All @@ -61,7 +61,7 @@ public function categoryParseArticle($obj, $arrArticle, $objTemplate)
}

if(self::$arrJumpTo[$arrArticle['pid']]) {
$objTemplate->categoryHref = $this->generateFrontendUrl(self::$arrJumpTo[$article['pid']], '/cat/'.urlencode($arrArticle['category']));
$objTemplate->categoryHref = $this->generateFrontendUrl(self::$arrJumpTo[$arrArticle['pid']], '/cat/'.urlencode($arrArticle['category']));
} else {
$objTemplate->categoryHref = $this->generateFrontendUrl($GLOBALS['objPage']->row(), '/cat/'.urlencode($arrArticle['category']));
}
Expand Down
49 changes: 29 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
{
"name":"psi/news4ward_categories",
"description":"Categories menu frontend module for News4ward",
"keywords":["news", "blog", "categories"],
"type":"contao-module",
"name": "imi/news4ward_categories",
"description": "Categories menu frontend module for News4ward",
"keywords": [
"news",
"blog",
"categories"
],
"type": "contao-module",
"license": "LGPL-3.0-or-later",
"authors":[
"authors": [
{
"name": "Christoph Wiechert",
"email": "wio@psitrax.de.de",
"homepage": "http://4wardmedia.de",
"role": "Developer"
},
{
"name":"Christoph Wiechert",
"email":"wio@psitrax.de.de",
"homepage":"http://4wardmedia.de",
"role":"Developer"
"name": "iMi digital GmbH",
"homepage": "https://www.imi-digital.de",
"role": "Maintainer"
}
],
"support":{
"email":"wio@psitrax.de.de",
"issues":"https://github.com/psi-4ward/news4ward_categories/issues?direction=desc&sort=created&state=open",
"forum":"https://community.contao.org/de/forumdisplay.php?110-4ward",
"irc":"irc://irc.freenode.org/contao.de",
"source":"https://github.com/psi-4ward/news4ward_categories"
"support": {
"issues": "https://github.com/iMi-digital/news4ward_categories/issues",
"forum": "https://community.contao.org/de/forumdisplay.php?110-4ward",
"irc": "irc://irc.freenode.org/contao.de",
"source": "https://github.com/iMi-digital/news4ward_categories"
},
"require":{
"php":">=5.3",
"require": {
"php": ">=5.3",
"contao/core-bundle": "^3.2.1 || ^4.4",
"contao-community-alliance/composer-plugin": "^2.4 || ^3.0",
"psi/news4ward": "~2"
"imi/news4ward": "~2"
},
"replace":{
"contao-legacy/news4ward_categories": "*"
"replace": {
"contao-legacy/news4ward_categories": "*",
"psi/news4ward_categories": "self.version"
},
"extra": {
"contao": {
Expand Down