includes/pageutils.php
changeset 285 7846d45bd250
parent 270 5bcdee999015
child 304 e2cb5f1432c8
child 317 f8356d9c3481
equal deleted inserted replaced
284:0f039028f7a5 285:7846d45bd250
   621         }
   621         }
   622         else
   622         else
   623         {
   623         {
   624           $rc = '';
   624           $rc = '';
   625         }
   625         }
   626         echo '<td class="' . $cls . '"' . $rc . '><a href="'.makeUrlNS('User', $r['author']).'" ';
   626         echo '<td class="' . $cls . '"' . $rc . '><a href="'.makeUrlNS('User', sanitize_page_id($r['author'])).'" ';
   627         if ( !isPage($paths->nslist['User'] . $r['author']) )
   627         if ( !isPage($paths->nslist['User'] . sanitize_page_id($r['author'])) )
   628         {
   628         {
   629           echo 'class="wikilink-nonexistent"';
   629           echo 'class="wikilink-nonexistent"';
   630         }
   630         }
   631         echo '>' . $r['author'] . '</a></td class="' . $cls . '">'."\n";
   631         echo '>' . $r['author'] . '</a></td class="' . $cls . '">'."\n";
   632         
   632         
   670         
   670         
   671         // Date and time
   671         // Date and time
   672         echo '<td class="' . $cls . '">' . $r['date_string'] . '</td class="' . $cls . '">';
   672         echo '<td class="' . $cls . '">' . $r['date_string'] . '</td class="' . $cls . '">';
   673         
   673         
   674         // User
   674         // User
   675         echo '<td class="' . $cls . '"><a href="'.makeUrlNS('User', $r['author']).'" ';
   675         echo '<td class="' . $cls . '"><a href="'.makeUrlNS('User', sanitize_page_id($r['author'])).'" ';
   676         if(!isPage($paths->nslist['User'] . $r['author'])) echo 'class="wikilink-nonexistent"';
   676         if(!isPage($paths->nslist['User'] . sanitize_page_id($r['author']))) echo 'class="wikilink-nonexistent"';
   677         echo '>' . $r['author'] . '</a></td class="' . $cls . '">';
   677         echo '>' . $r['author'] . '</a></td class="' . $cls . '">';
   678         
   678         
   679         
   679         
   680         // Minor edit
   680         // Minor edit
   681         echo '<td class="' . $cls . '" style="text-align: center;">'. (( $r['minor_edit'] ) ? 'M' : '' ) .'</td>';
   681         echo '<td class="' . $cls . '" style="text-align: center;">'. (( $r['minor_edit'] ) ? 'M' : '' ) .'</td>';
  1018         // Comment ID (used in the Javascript apps)
  1018         // Comment ID (used in the Javascript apps)
  1019         $strings['ID'] = (string)$i;
  1019         $strings['ID'] = (string)$i;
  1020         
  1020         
  1021         // Determine the name, and whether to link to the user page or not
  1021         // Determine the name, and whether to link to the user page or not
  1022         $name = '';
  1022         $name = '';
  1023         if($row['user_id'] > 0) $name .= '<a href="'.makeUrlNS('User', str_replace(' ', '_', $row['name'])).'">';
  1023         if($row['user_id'] > 0) $name .= '<a href="'.makeUrlNS('User', sanitize_page_id(' ', '_', $row['name'])).'">';
  1024         $name .= $row['name'];
  1024         $name .= $row['name'];
  1025         if($row['user_id'] > 0) $name .= '</a>';
  1025         if($row['user_id'] > 0) $name .= '</a>';
  1026         $strings['NAME'] = $name; unset($name);
  1026         $strings['NAME'] = $name; unset($name);
  1027         
  1027         
  1028         // Subject
  1028         // Subject