]> git.mxchange.org Git - friendica.git/commitdiff
push directory on register - if permitted
authorFriendika <info@friendika.com>
Wed, 23 Feb 2011 09:37:15 +0000 (01:37 -0800)
committerFriendika <info@friendika.com>
Wed, 23 Feb 2011 09:37:15 +0000 (01:37 -0800)
include/datetime.php
mod/register.php
mod/regmod.php

index 724eec9336c9c379f3c464253ba77766a044b1c5..f7be5bdb11666d789af3f3a908515671583b7af9 100644 (file)
@@ -275,7 +275,7 @@ function cal($y = 0,$m = 0, $links = false) {
   $o = '<table class="calendar">';
   $o .= "<caption>$str_month $y</caption><tr>";
   for($a = 0; $a < 7; $a ++)
-     $o .= '<th>' . substr(day_translate($dn[$a]),0,3) . '</th>';
+     $o .= '<th>' . mb_substr(day_translate($dn[$a]),0,3,'UTF-8') . '</th>';
   $o .= '</tr><tr>';
 
   while($d <= $l) {
index 5c41fbfad89066c0c0df70c59f47de81a7d61521..d97b3e0cd59a7e130d290b5ed77f88f0c867a7d5 100644 (file)
@@ -346,6 +346,14 @@ function register_post(&$a) {
                        goaway($a->get_baseurl());
                }
 
+       }
+
+       if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
+               $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
+               $url = $a->get_baseurl() . "/profile/$nickname";
+               if($url && strlen(get_config('system','directory_submit_url')))
+                       proc_run($php_path,"include/directory.php","$url");
+
        }
        return;
 }}
index eabbec090b92ef9d445f58951f8b1fbd058db786..f662902d8dbcf71eb3516bc5cf4395fba56164ca 100644 (file)
@@ -70,6 +70,16 @@ function regmod_content(&$a) {
                        intval($register[0]['uid'])
                );
                
+               $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default` = 1",
+                       intval($user[0]['uid'])
+               );
+               if(count($r) && $r[0]['net-publish']) {
+                       $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
+                       $url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
+                       if($url && strlen(get_config('system','directory_submit_url')))
+                               proc_run($php_path,"include/directory.php","$url");
+               }
+
                $email_tpl = load_view_file("view/register_open_eml.tpl");
                $email_tpl = replace_macros($email_tpl, array(
                                '$sitename' => $a->config['sitename'],