Ignore:
Timestamp:
May 3, 2014 11:09:03 PM (10 years ago)
Author:
anonymous
Message:

Convert tabs to spaces, and lineendings to LF in all files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r477 r479  
    2929 * Print variable dump.
    3030 *
    31  * @param  mixed    $var        The variable to dump.
    32  * @param  bool     $display    Print the dump in <pre> tags or hide it in html comments (non-CLI only).
    33  * @param  bool     $var_dump   Use var_dump instead of print_r.
    34  * @param  string   $file       Value of __FILE__.
    35  * @param  string   $line       Value of __LINE__
     31 * @param  mixed    $var        The variable to dump.
     32 * @param  bool     $display    Print the dump in <pre> tags or hide it in html comments (non-CLI only).
     33 * @param  bool     $var_dump   Use var_dump instead of print_r.
     34 * @param  string   $file       Value of __FILE__.
     35 * @param  string   $line       Value of __LINE__
    3636 */
    3737function dump($var, $display=false, $var_dump=false, $file='', $line='')
     
    4545        var_dump($var);
    4646    } else {
    47         // Print human-readable descriptions of invisible types.
    48         if (null === $var) {
    49             echo '(null)';
    50         } else if (true === $var) {
    51             echo '(bool: true)';
    52         } else if (false === $var) {
    53             echo '(bool: false)';
    54         } else if (is_scalar($var) && '' === $var) {
    55             echo '(empty string)';
    56         } else if (is_scalar($var) && preg_match('/^\s+$/', $var)) {
    57             echo '(only white space)';
    58         } else {
    59             print_r($var);
    60         }
     47        // Print human-readable descriptions of invisible types.
     48        if (null === $var) {
     49            echo '(null)';
     50        } else if (true === $var) {
     51            echo '(bool: true)';
     52        } else if (false === $var) {
     53            echo '(bool: false)';
     54        } else if (is_scalar($var) && '' === $var) {
     55            echo '(empty string)';
     56        } else if (is_scalar($var) && preg_match('/^\s+$/', $var)) {
     57            echo '(only white space)';
     58        } else {
     59            print_r($var);
     60        }
    6161    }
    6262    if (defined('_CLI')) {
     
    144144function oTxt($text, $preserve_html=false)
    145145{
    146     $app =& App::getInstance();
     146    $app =& App::getInstance();
    147147
    148148    $search = array();
     
    546546function filePutContents($filename, $content)
    547547{
    548     $app =& App::getInstance();
     548    $app =& App::getInstance();
    549549
    550550    // Open file for writing and truncate to zero length.
     
    754754function escapedList($in, $separator="', '")
    755755{
    756     $db =& DB::getInstance();
     756    $db =& DB::getInstance();
    757757
    758758    if (is_array($in) && !empty($in)) {
     
    982982function mailmanAddMember($email, $list, $send_welcome_message=false)
    983983{
    984     $app =& App::getInstance();
    985 
    986     $add_members = '/usr/lib/mailman/bin/add_members';
     984    $app =& App::getInstance();
     985
     986    $add_members = '/usr/lib/mailman/bin/add_members';
    987987    // FIXME: checking of executable is disabled.
    988988    if (true || is_executable($add_members) && is_readable($add_members)) {
     
    10141014function mailmanRemoveMember($email, $list, $send_user_ack=false)
    10151015{
    1016     $app =& App::getInstance();
     1016    $app =& App::getInstance();
    10171017
    10181018    $remove_members = '/usr/lib/mailman/bin/remove_members';
Note: See TracChangeset for help on using the changeset viewer.