Ignore:
Timestamp:
Feb 13, 2011, 11:12:58 AM (13 years ago)
Author:
mistic100
Message:

ContestResults :

  • Code revision
  • Add Letton (lv_LV) language, thanks to Aivars Baldone
  • Delete display options
  • Fix languages bugs
  • Improve public appearence
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContestResults/include/functions.php

    r6782 r9200  
    33
    44// Racourcis un texte et ajoute une ellipse
    5 function CR_cut_string($string, $limit){
     5function CR_cut_string($string, $limit) {
    66        include_once(CR_PATH . 'include/cutstring.class.php');
    7         if(strlen(str_replace("\r\n", "\n", strip_tags($string))) > $limit){
     7        if (strlen(str_replace("\r\n", "\n", strip_tags($string))) > $limit) {
    88                $output = new HtmlCutString($string, $limit);
    99                return ($output->cut()).'...';
    10         }else{
     10        } else {
    1111                return $string;
    1212        }
     
    1414
    1515// Recupère le nom d'un coucours à partir de l'id
    16 function get_contest_name($id){
    17         $query = pwg_query("SELECT name FROM " . CR_TABLE_1 . " WHERE id = " . $id . ";");
    18         if(pwg_db_num_rows($query)){
    19                 $result = pwg_db_fetch_assoc($query);
    20                 return $result['name'];
    21         }else{
     16function get_contest_name($id) {
     17        $contest = pwg_query("SELECT name FROM " . CR_TABLE_1 . " WHERE id = " . $id . ";");
     18        if (pwg_db_num_rows($contest)) {
     19                $contest = pwg_db_fetch_assoc($contest);
     20                return $contest['name'];
     21        } else {
    2222                return null;
    2323        }
Note: See TracChangeset for help on using the changeset viewer.