includes/pageutils.php
changeset 304 e2cb5f1432c8
parent 271 f088805540ae
parent 285 7846d45bd250
child 326 ab66d6d1f1f4
equal deleted inserted replaced
280:dc08c70ca550 304:e2cb5f1432c8
   627         }
   627         }
   628         else
   628         else
   629         {
   629         {
   630           $rc = '';
   630           $rc = '';
   631         }
   631         }
   632         echo '<td class="' . $cls . '"' . $rc . '><a href="'.makeUrlNS('User', $r['author']).'" ';
   632         echo '<td class="' . $cls . '"' . $rc . '><a href="'.makeUrlNS('User', sanitize_page_id($r['author'])).'" ';
   633         if ( !isPage($paths->nslist['User'] . $r['author']) )
   633         if ( !isPage($paths->nslist['User'] . sanitize_page_id($r['author'])) )
   634         {
   634         {
   635           echo 'class="wikilink-nonexistent"';
   635           echo 'class="wikilink-nonexistent"';
   636         }
   636         }
   637         echo '>' . $r['author'] . '</a></td class="' . $cls . '">'."\n";
   637         echo '>' . $r['author'] . '</a></td class="' . $cls . '">'."\n";
   638         
   638         
   695         
   695         
   696         // Date and time
   696         // Date and time
   697         echo '<td class="' . $cls . '">' . $r['date_string'] . '</td class="' . $cls . '">';
   697         echo '<td class="' . $cls . '">' . $r['date_string'] . '</td class="' . $cls . '">';
   698         
   698         
   699         // User
   699         // User
   700         echo '<td class="' . $cls . '"><a href="'.makeUrlNS('User', $r['author']).'" ';
   700         echo '<td class="' . $cls . '"><a href="'.makeUrlNS('User', sanitize_page_id($r['author'])).'" ';
   701         if(!isPage($paths->nslist['User'] . $r['author'])) echo 'class="wikilink-nonexistent"';
   701         if(!isPage($paths->nslist['User'] . sanitize_page_id($r['author']))) echo 'class="wikilink-nonexistent"';
   702         echo '>' . $r['author'] . '</a></td class="' . $cls . '">';
   702         echo '>' . $r['author'] . '</a></td class="' . $cls . '">';
   703         
   703         
   704         
   704         
   705         // Minor edit
   705         // Minor edit
   706         echo '<td class="' . $cls . '" style="text-align: center;">'. (( $r['minor_edit'] ) ? 'M' : '' ) .'</td>';
   706         echo '<td class="' . $cls . '" style="text-align: center;">'. (( $r['minor_edit'] ) ? 'M' : '' ) .'</td>';
  1049         // Comment ID (used in the Javascript apps)
  1049         // Comment ID (used in the Javascript apps)
  1050         $strings['ID'] = (string)$i;
  1050         $strings['ID'] = (string)$i;
  1051         
  1051         
  1052         // Determine the name, and whether to link to the user page or not
  1052         // Determine the name, and whether to link to the user page or not
  1053         $name = '';
  1053         $name = '';
  1054         if($row['user_id'] > 1) $name .= '<a href="'.makeUrlNS('User', str_replace(' ', '_', $row['name'])).'">';
  1054         if($row['user_id'] > 1) $name .= '<a href="'.makeUrlNS('User', sanitize_page_id(' ', '_', $row['name'])).'">';
  1055         $name .= $row['name'];
  1055         $name .= $row['name'];
  1056         if($row['user_id'] > 1) $name .= '</a>';
  1056         if($row['user_id'] > 1) $name .= '</a>';
  1057         $strings['NAME'] = $name; unset($name);
  1057         $strings['NAME'] = $name; unset($name);
  1058         
  1058         
  1059         // Subject
  1059         // Subject