Changeset 414


Ignore:
Timestamp:
Apr 20, 2013 6:55:12 PM (11 years ago)
Author:
anonymous
Message:
 
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/App.inc.php

    r402 r414  
    100100        'date'      => date('Y-m-d H:i:s'),
    101101        'remote ip' => getRemoteAddr(),
    102         'pid'       => (substr(PHP_OS, 0, 3) != 'WIN' ? posix_getpid() : ''),
     102        'pid'       => getmypid(),
    103103        'type'      => priorityToString($priority),
    104104        'file:line' => "$file : $line",
  • trunk/lib/App.inc.php

    r413 r414  
    651651            'date'      => date('Y-m-d H:i:s'),
    652652            'remote ip' => getRemoteAddr(),
    653             'pid'       => (mb_substr(PHP_OS, 0, 3) != 'WIN' ? posix_getpid() : ''),
     653            'pid'       => getmypid(),
    654654            'type'      => $this->logPriorityToString($priority),
    655655            'file:line' => "$file : $line",
  • trunk/lib/Utilities.inc.php

    r400 r414  
    301301*
    302302* @access   public
    303 * @param    string  $strong The string
    304 * @return   string          String with uper-cased first character.
     303* @param    string  $string The string
     304* @return   string          String with upper-cased first character.
    305305* @author   Quinn Comendant <quinn@strangecode.com>
    306306* @version  1.0
     
    311311    {
    312312        return mb_strtoupper(mb_substr($string, 0, 1)) . mb_substr($string, 1, mb_strlen($string));
     313    }
     314}
     315
     316/*
     317* A substitution for the missing mb_strtr function.
     318*
     319* @access   public
     320* @param    string  $string The string
     321* @param    string  $from   String of characters to translate from
     322* @param    string  $to     String of characters to translate to
     323* @return   string          String with translated characters.
     324* @author   Quinn Comendant <quinn@strangecode.com>
     325* @version  1.0
     326* @since    20 Jan 2013 12:33:26
     327*/
     328if (!function_exists('mb_strtr')) {   
     329    function mb_strtr($string, $from, $to)
     330    {
     331        return str_replace(mb_split('.', $from), mb_split('.', $to), $string);
    313332    }
    314333}
     
    10701089}
    10711090
    1072 /**
    1073  * Stub functions used when installation does not have
    1074  * GNU gettext extension installed
    1075  */
    1076 if (!extension_loaded('gettext')) {
    1077     /**
    1078     * Translates text
    1079     *
    1080     * @access public
    1081     * @param string $text the text to be translated
    1082     * @return string translated text
    1083     */
    1084     function gettext($text) {
    1085         return $text;
    1086     }
    1087 
    1088     /**
    1089     * Translates text
    1090     *
    1091     * @access public
    1092     * @param string $text the text to be translated
    1093     * @return string translated text
    1094     */
    1095     function _($text) {
    1096         return $text;
    1097     }
    1098 
    1099     /**
    1100     * Translates text by domain
    1101     *
    1102     * @access public
    1103     * @param string $domain the language to translate the text into
    1104     * @param string $text the text to be translated
    1105     * @return string translated text
    1106     */
    1107     function dgettext($domain, $text) {
    1108         return $text;
    1109     }
    1110 
    1111     /**
    1112     * Translates text by domain and category
    1113     *
    1114     * @access public
    1115     * @param string $domain the language to translate the text into
    1116     * @param string $text the text to be translated
    1117     * @param string $category the language dialect to use
    1118     * @return string translated text
    1119     */
    1120     function dcgettext($domain, $text, $category) {
    1121         return $text;
    1122     }
    1123 
    1124     /**
    1125     * Binds the text domain
    1126     *
    1127     * @access public
    1128     * @param string $domain the language to translate the text into
    1129     * @param string
    1130     * @return string translated text
    1131     */
    1132     function bindtextdomain($domain, $directory) {
    1133         return $domain;
    1134     }
    1135 
    1136     /**
    1137     * Sets the text domain
    1138     *
    1139     * @access public
    1140     * @param string $domain the language to translate the text into
    1141     * @return string translated text
    1142     */
    1143     function textdomain($domain) {
    1144         return $domain;
    1145     }
    1146 }
    11471091
    11481092?>
Note: See TracChangeset for help on using the changeset viewer.