X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=cbba8d0c5b501065c3ff451e14706be4ec9704a9;hb=0475fc1fce4965e660332cd538a43c1c82b7df6c;hp=f49ccc8abcbb8116fc63b10c55d0ef551e68c895;hpb=d38c040d50f28447209357a52c257f934bc24059;p=friendica.git diff --git a/include/text.php b/include/text.php index f49ccc8abc..cbba8d0c5b 100644 --- a/include/text.php +++ b/include/text.php @@ -1,15 +1,19 @@ $url, '$search_label' => t('Search'), '$save_label' => t('Save'), - '$savedsearch' => feature_enabled(local_user(),'savedsearch'), + '$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'), '$search_hint' => t('@name, !forum, #tags, content'), ); @@ -1071,17 +1068,14 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside = } /** - * Check if $x is a valid email string + * @brief Check for a valid email string * - * @param string $x + * @param string $email_address * @return boolean */ -function valid_email($x){ - - /// @TODO Removed because Fabio told me so. - //if (Config::get('system','disable_email_validation')) - // return true; - return preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/', $x); +function valid_email($email_address) +{ + return preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/', $email_address); } @@ -1121,40 +1115,6 @@ function get_poke_verbs() { return $arr; } -/** - * Load moods - * @return array index is mood, value is translated mood - * @hook mood_verbs moods array - */ -function get_mood_verbs() { - - $arr = array( - 'happy' => t('happy'), - 'sad' => t('sad'), - 'mellow' => t('mellow'), - 'tired' => t('tired'), - 'perky' => t('perky'), - 'angry' => t('angry'), - 'stupefied' => t('stupified'), - 'puzzled' => t('puzzled'), - 'interested' => t('interested'), - 'bitter' => t('bitter'), - 'cheerful' => t('cheerful'), - 'alive' => t('alive'), - 'annoyed' => t('annoyed'), - 'anxious' => t('anxious'), - 'cranky' => t('cranky'), - 'disturbed' => t('disturbed'), - 'frustrated' => t('frustrated'), - 'motivated' => t('motivated'), - 'relaxed' => t('relaxed'), - 'surprised' => t('surprised'), - ); - - call_hooks('mood_verbs', $arr); - return $arr; -} - /** * @brief Translate days and months names. * @@ -1181,7 +1141,7 @@ function day_translate($s) { */ function day_short_translate($s) { $ret = str_replace(array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'), - array(t('Mon'), t('Tue'), t('Wed'), t('Thu'), t('Fri'), t('Sat'), t('Sund')), + array(t('Mon'), t('Tue'), t('Wed'), t('Thu'), t('Fri'), t('Sat'), t('Sun')), $s); $ret = str_replace(array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov','Dec'), array(t('Jan'), t('Feb'), t('Mar'), t('Apr'), t('May'), ('Jun'), t('Jul'), t('Aug'), t('Sep'), t('Oct'), t('Nov'), t('Dec')), @@ -1412,7 +1372,7 @@ function prepare_body(&$item, $attach = false, $preview = false) { // Map. if (strpos($s, '
') !== false && x($item, 'coord')) { - $x = generate_map(trim($item['coord'])); + $x = Map::byCoordinates(trim($item['coord'])); if ($x) { $s = preg_replace('/\
/', '$0' . $x, $s); } @@ -1741,7 +1701,7 @@ function array_xmlify($val){ /** - * transorm link href and img src from relative to absolute + * transform link href and img src from relative to absolute * * @param string $text * @param string $base base url