Project

General

Profile

Bug #2201 ยป 2201.patch

krileon, 13 January 2011 15:31

View differences:

components/com_comprofiler/plugin/user/plug_cbmamboauthortab/cb.authortab.php
$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 .""
......
if ( $showHits ) {
$hits = "<td>".$item->hits."</td>";
}
if ( $jVer == 1 ) {
if ( $jVer >= 1 ) {
$url = cbSef( 'index.php?option=com_content&amp;view=article&amp;id=' . $item->slug . '&amp;catid=' . $item->catslug . $itemidtxt );
} else {
$url = cbSef( 'index.php?option=com_content&amp;task=view&amp;id=' . (int) $item->id . $itemidtxt );
    (1-1/1)