Example #1
0
 foreach ($this->related as $line) {
     if ($line->section == 'Topic') {
         if ($line->group != '' && $line->scope != '') {
             $sef = Route::url('index.php?option=com_groups&scope=' . $line->scope . '&pagename=' . $line->alias);
         } else {
             $sef = Route::url('index.php?option=com_topics&scope=' . $line->scope . '&pagename=' . $line->alias);
         }
     } else {
         $class = \Components\Publications\Helpers\Html::getRatingClass($line->rating);
         // Get version authors
         $authors = $pa->getAuthors($line->version);
         $authorlist = \Components\Publications\Helpers\Html::showContributors($authors, false, true);
         // If the user is logged in, get their rating for this publication
         if (!User::isGuest()) {
             $mr = new \Components\Publications\Tables\Review($database);
             $myrating = $mr->loadUserRating($line->id, User::get('id'), $line->version);
         } else {
             $myrating = 0;
         }
         $myclass = \Components\Publications\Helpers\Html::getRatingClass($myrating);
         // Get the SEF for the publication
         if ($line->alias) {
             $sef = Route::url('index.php?option=' . $this->option . '&alias=' . $line->alias);
         } else {
             $sef = Route::url('index.php?option=' . $this->option . '&id=' . $line->id);
         }
     }
     // Make sure we have an SEF, otherwise it's a querystring
     if (strstr($sef, 'option=')) {
         $d = '&';
     } else {