]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
Merge pull request #108 from fabrixxm/widget
[friendica.git] / mod / register.php
index 21d5a1033c37378c775b02afe2d8a14e8eb63013..c9521f9be5dd3826d873322927cf8e4813383784 100644 (file)
@@ -70,9 +70,9 @@ function register_post(&$a) {
        $err = '';
 
 
-       if(strlen($username) > 48)
+       if(mb_strlen($username) > 48)
                $err .= t('Please use a shorter name.') . EOL;
-       if(strlen($username) < 3)
+       if(mb_strlen($username) < 3)
                $err .= t('Name too short.') . EOL;
 
        // I don't really like having this rule, but it cuts down
@@ -319,7 +319,7 @@ function register_post(&$a) {
 
 
        if( $a->config['register_policy'] == REGISTER_OPEN ) {
-               $email_tpl = load_view_file("view/register_open_eml.tpl");
+               $email_tpl = get_intltext_template("register_open_eml.tpl");
                $email_tpl = replace_macros($email_tpl, array(
                                '$sitename' => $a->config['sitename'],
                                '$siteurl' =>  $a->get_baseurl(),
@@ -357,7 +357,7 @@ function register_post(&$a) {
                        dbesc($new_password)
                );
 
-               $email_tpl = load_view_file("view/register_verify_eml.tpl");
+               $email_tpl = get_intltext_template("register_verify_eml.tpl");
                $email_tpl = replace_macros($email_tpl, array(
                                '$sitename' => $a->config['sitename'],
                                '$siteurl' =>  $a->get_baseurl(),
@@ -435,7 +435,7 @@ function register_content(&$a) {
                $profile_publish_reg = '<input type="hidden" name="profile_publish_reg" value="1" />';
        }
        else {
-               $publish_tpl = file_get_contents("view/profile_publish.tpl");
+               $publish_tpl = get_markup_template("profile_publish.tpl");
                $profile_publish = replace_macros($publish_tpl,array(
                        '$instance'     => 'reg',
                        '$pubdesc'      => t('Include your profile in member directory?'),
@@ -450,7 +450,7 @@ function register_content(&$a) {
        $license = t('Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.');
 
 
-       $o = file_get_contents("view/register.tpl");
+       $o = get_markup_template("register.tpl");
        $o = replace_macros($o, array(
                '$oidhtml' => $oidhtml,
                '$realpeople' => $realpeople,