# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- components/com_comprofiler/plugin/user/plug_cbmamboauthortab/cb.authortab.php +++ components/com_comprofiler/plugin/user/plug_cbmamboauthortab/cb.authortab.php @@ -31,15 +31,16 @@ $now = date( 'Y-m-d H:i:s', $_CB_framework->now() + $_CB_framework->getCfg( 'offset' ) * 60 * 60 ); $query = "SELECT a.id, a.catid, a.title, a.hits,a.created, ROUND( r.rating_sum / r.rating_count ) AS rating,r.rating_count"; - if ( $jVer == 1 ) { + if ( $jVer >= 1 ) { $query .= ', CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,' . ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug'; } $query .= "\n FROM #__content AS a" - . "\n LEFT JOIN #__content_rating AS r ON r.content_id=a.id" - . "\n INNER JOIN #__sections AS s ON s.id=a.sectionid AND s.title != 'Mamblog'" - ; - if ( $jVer == 1 ) { + . "\n LEFT JOIN #__content_rating AS r ON r.content_id=a.id"; + if ( $jVer < 2 ) { + $query .= "\n INNER JOIN #__sections AS s ON s.id=a.sectionid AND s.title != 'Mamblog'"; + } + if ( $jVer >= 1 ) { $query .= "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid"; } $query .= "\n WHERE a.created_by=". (int) $user->id ."" @@ -105,7 +106,7 @@ if ( $showHits ) { $hits = "".$item->hits.""; } - if ( $jVer == 1 ) { \ No newline at end of file + if ( $jVer >= 1 ) { \ No newline at end of file $url = cbSef( 'index.php?option=com_content&view=article&id=' . $item->slug . '&catid=' . $item->catslug . $itemidtxt ); } else { $url = cbSef( 'index.php?option=com_content&task=view&id=' . (int) $item->id . $itemidtxt );