Changeset 1063 for trunk


Ignore:
Timestamp:
11/24/09 19:42:51 (2 years ago)
Author:
bogdan2412
Message:

Replace tabs with spaces in non-external files.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/common/external_libs/simple_html_dom.php

    r969 r1063  
    269269        // return nth-element or array 
    270270        if (is_null($idx)) return $found; 
    271                 else if ($idx<0) $idx = count($found) + $idx; 
     271        else if ($idx<0) $idx = count($found) + $idx; 
    272272        return (isset($found[$idx])) ? $found[$idx] : null; 
    273273    } 
  • trunk/www/controllers/user.php

    r852 r1063  
    2020        'title' => $user['full_name'].' ('.$user['username'].')', 
    2121        'page_name' => $page_name, 
    22             'revision' => $revision, 
     22        'revision' => $revision, 
    2323        'revision_count' => textblock_get_revision_count($page_name), 
    2424        'action' => $action, 
  • trunk/www/format/pager.php

    r953 r1063  
    99//  * url_args              : Base arguments for the url function. Defaults to _GET. 
    1010//  * param_prefix          : Prefix for url parameters. 
    11 //  * show_count                : Show number of entries. true / false 
     11//  * show_count            : Show number of entries. true / false 
    1212//  * show_display_entries  : Shows "results per page" links 
    1313// 
  • trunk/www/macros/macro_calendar.php

    r958 r1063  
    66    $forumurl = url_forum(); 
    77 
    8         // Find all events which are happening in the near future that the member can see. 
    9         $result = db_fetch_all(" 
    10                 SELECT 
    11                         cal.ID_EVENT, cal.startDate, cal.endDate, cal.title, cal.ID_MEMBER, cal.ID_TOPIC, 
    12                         cal.ID_BOARD, t.ID_FIRST_MSG 
    13                 FROM ia_smf_calendar AS cal 
    14                         LEFT JOIN ia_smf_boards AS b ON (b.ID_BOARD = cal.ID_BOARD) 
    15                         LEFT JOIN ia_smf_topics AS t ON (t.ID_TOPIC = cal.ID_TOPIC) 
    16                 WHERE cal.endDate >= '" . strftime('%Y-%m-%d', time()) . "' AND 
     8    // Find all events which are happening in the near future that the member can see. 
     9    $result = db_fetch_all(" 
     10        SELECT 
     11            cal.ID_EVENT, cal.startDate, cal.endDate, cal.title, cal.ID_MEMBER, cal.ID_TOPIC, 
     12            cal.ID_BOARD, t.ID_FIRST_MSG 
     13        FROM ia_smf_calendar AS cal 
     14            LEFT JOIN ia_smf_boards AS b ON (b.ID_BOARD = cal.ID_BOARD) 
     15            LEFT JOIN ia_smf_topics AS t ON (t.ID_TOPIC = cal.ID_TOPIC) 
     16        WHERE cal.endDate >= '" . strftime('%Y-%m-%d', time()) . "' AND 
    1717        cal.startDate <= DATE_ADD(NOW(), INTERVAL 7 DAY) 
    18                 ORDER BY cal.startDate 
    19                 LIMIT $max_events"); 
    20         $return = array(); 
    21         $duplicates = array(); 
     18        ORDER BY cal.startDate 
     19        LIMIT $max_events"); 
     20    $return = array(); 
     21    $duplicates = array(); 
    2222    setlocale(LC_TIME, 'ro_RO.utf8'); 
    2323    foreach ($result as $row) 
    24         { 
    25                 // Check if we've already come by an event linked to this same topic with the same title... and don't display it if we have. 
    26                 if (!empty($duplicates[$row['title'] . $row['ID_TOPIC']])) 
    27                         continue; 
     24    { 
     25        // Check if we've already come by an event linked to this same topic with the same title... and don't display it if we have. 
     26        if (!empty($duplicates[$row['title'] . $row['ID_TOPIC']])) 
     27            continue; 
    2828 
    29                 if ($row['startDate'] < strftime('%Y-%m-%d', time())) 
    30                         $date = strftime('%Y-%m-%d', time()); 
    31                 else 
    32                         $date = $row['startDate']; 
     29        if ($row['startDate'] < strftime('%Y-%m-%d', time())) 
     30            $date = strftime('%Y-%m-%d', time()); 
     31        else 
     32            $date = $row['startDate']; 
    3333 
    34                 $return[$date][] = array( 
    35                         'id' => $row['ID_EVENT'], 
    36                         'title' => $row['title'], 
    37                         'modify_href' => $forumurl . '?action=' . ($row['ID_BOARD'] == 0 ? 'calendar;sa=post;' : 'post;msg=' . $row['ID_FIRST_MSG'] . ';topic=' . $row['ID_TOPIC'] . '.0;calendar;') . 'eventid=' . $row['ID_EVENT'], 
    38                         'href' => $row['ID_BOARD'] == 0 ? '' : $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0', 
    39                         'link' => $row['ID_BOARD'] == 0 ? $row['title'] : '<a href="' . $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['title'] . '</a>', 
    40                         'start_date' => $row['startDate'], 
    41                         'end_date' => $row['endDate'], 
    42                         'is_last' => false 
    43                 ); 
     34        $return[$date][] = array( 
     35            'id' => $row['ID_EVENT'], 
     36            'title' => $row['title'], 
     37            'modify_href' => $forumurl . '?action=' . ($row['ID_BOARD'] == 0 ? 'calendar;sa=post;' : 'post;msg=' . $row['ID_FIRST_MSG'] . ';topic=' . $row['ID_TOPIC'] . '.0;calendar;') . 'eventid=' . $row['ID_EVENT'], 
     38            'href' => $row['ID_BOARD'] == 0 ? '' : $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0', 
     39            'link' => $row['ID_BOARD'] == 0 ? $row['title'] : '<a href="' . $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['title'] . '</a>', 
     40            'start_date' => $row['startDate'], 
     41            'end_date' => $row['endDate'], 
     42            'is_last' => false 
     43        ); 
    4444 
    45                 // Let's not show this one again, huh? 
    46                 $duplicates[$row['title'] . $row['ID_TOPIC']] = true; 
    47         } 
     45        // Let's not show this one again, huh? 
     46        $duplicates[$row['title'] . $row['ID_TOPIC']] = true; 
     47    } 
    4848 
    49         foreach ($return as $mday => $array) 
    50                 $return[$mday][count($array) - 1]['is_last'] = true; 
     49    foreach ($return as $mday => $array) 
     50        $return[$mday][count($array) - 1]['is_last'] = true; 
    5151 
    5252    $html = '<div class="calendar">'; 
    5353    $html .= '<div class="header">'; 
    5454    $html .= '<a href="'.IA_URL.'forum?action=calendar">In curand...</a></div>'; 
    55         foreach ($return as $mday => $array) 
     55    foreach ($return as $mday => $array) 
    5656    { 
    5757        $html .= '<div class="date">'.strftime("%A, %d %b %Y", strtotime($mday)).'</div>'; 
    58                 foreach ($array as $event) 
    59                 { 
     58        foreach ($array as $event) 
     59        { 
    6060            $html .= '<div class="event">'; 
    6161            $html .= '&raquo;'; 
    62                         $html .=  $event['link']; 
     62            $html .=  $event['link']; 
    6363            $html .= '</div>'; 
    64                 } 
     64        } 
    6565    } 
    6666    $html .= '</div>'; 
  • trunk/www/views/user.php

    r1035 r1063  
    3333    // FIXME: duplicated code (see views/textblock_view.php) 
    3434    if (getattr($view, 'revision')) { 
    35             include('revision_warning.php'); 
     35        include('revision_warning.php'); 
    3636    } 
    3737 
  • trunk/www/wiki/latex.php

    r934 r1063  
    2323 * Revised by Steve Mayer 
    2424 * This file can be included in many PHP programs by using something like (see example.php to see how it can be used) 
    25  *              include_once('/full_path_here_to/latexrender/latex.php'); 
    26  *              $text_to_be_converted=latex_content($text_to_be_converted); 
     25 *      include_once('/full_path_here_to/latexrender/latex.php'); 
     26 *      $text_to_be_converted=latex_content($text_to_be_converted); 
    2727 * $text_to_be_converted will then contain the link to the appropriate image 
    2828 * or an error code as follows (the values can be altered in class.latexrender.php): 
    29  *      0 OK 
    30  *      1 Formula longer than 10000 characters 
    31  *      2 Includes a blacklisted tag 
    32  *      3 Latex rendering failed 
    33  *      4 Cannot create DVI file 
    34  *      5 Picture larger than 800 x 600 followed by x x y dimensions 
    35  *      6 Cannot copy image to latex directory 
     29 *      0 OK 
     30 *      1 Formula longer than 10000 characters 
     31 *      2 Includes a blacklisted tag 
     32 *      3 Latex rendering failed 
     33 *      4 Cannot create DVI file 
     34 *      5 Picture larger than 800 x 600 followed by x x y dimensions 
     35 *      6 Cannot copy image to latex directory 
    3636 *  
    3737 * This version includes Mike Boyle's modifications to allow vertical offset of LaTeX formulae 
Note: See TracChangeset for help on using the changeset viewer.