]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Sun, 1 Dec 2013 23:33:46 +0000 (00:33 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 1 Dec 2013 23:33:46 +0000 (00:33 +0100)
Conflicts:
mod/admin.php
mod/settings.php

1  2 
boot.php
mod/admin.php
mod/settings.php

diff --cc boot.php
Simple merge
diff --cc mod/admin.php
index c5b862ee59c472089b6ae9911976d8c7670ff511,4cbc13d91a871548d7361f039c876c622d2c4079..dd9a0d475fe883669f9f23ee2ff9b2e55878803f
@@@ -508,7 -572,8 +572,7 @@@ function admin_page_site(&$a) 
                '$corporate' => t('Policies'),
                '$advanced' => t('Advanced'),
                '$performance' => t('Performance'),
+               '$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
 -              
                '$baseurl' => $a->get_baseurl(true),
                // name, label, value, help string, extra data...
                '$sitename'             => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'),
index 0038216345b0928af72bf92f0c7cc110a65a5519,a19c51f7d4ec36196b9c86869ceac6e6e9177584..c8fcf39146fc880f78349c0ab6ffeb382de43216
@@@ -305,12 -305,18 +305,18 @@@ function settings_post(&$a) 
        }
  
        check_form_security_token_redirectOnErr('/settings', 'settings');
 -      
 +
+       if (x($_POST,'resend_relocate')) {
+               proc_run('php', 'include/notifier.php', 'relocate', local_user());
+               info(t("Relocate message has been send to your contacts"));
+               goaway($a->get_baseurl(true) . '/settings');
+       }
 -      
++
        call_hooks('settings_post', $_POST);
  
-       if((x($_POST,'npassword')) || (x($_POST,'confirm'))) {
+       if((x($_POST,'password')) || (x($_POST,'confirm'))) {
  
-               $newpass = $_POST['npassword'];
+               $newpass = $_POST['password'];
          $confirm = $_POST['confirm'];
          $oldpass = hash('whirlpool', $_POST['opassword']);
  
  
        if($email != $a->user['email']) {
                $email_changed = true;
 -        //  check for the correct password
 -        $r = q("SELECT `password` FROM `user`WHERE `uid` = %d LIMIT 1", intval(local_user()));
 -        $password = hash('whirlpool', $_POST['mpassword']);
 -        if ($password != $r[0]['password']) {
 -            $err .= t('Wrong Password') . EOL;
 -            $email = $a->user['email'];
 -        }
 -        //  check the email is valid
 -        if(! valid_email($email))
 -            $err .= t(' Not valid email.');
 -        //  ensure new email is not the admin mail
 -              if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0)) {
 -                      $err .= t(' Cannot change to that email.');
 +              //  check for the correct password
 +              $r = q("SELECT `password` FROM `user`WHERE `uid` = %d LIMIT 1", intval(local_user()));
-               $password = hash('whirlpool', $_POST['password']);
++              $password = hash('whirlpool', $_POST['mpassword']);
 +              if ($password != $r[0]['password']) {
 +                      $err .= t('Wrong Password') . EOL;
                        $email = $a->user['email'];
                }
 +              //  check the email is valid
 +              if(! valid_email($email))
 +                      $err .= t(' Not valid email.');
 +              //  ensure new email is not the admin mail
 +              //if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0)) {
 +              if(x($a->config,'admin_email')) {
 +                      $adminlist = explode(",", str_replace(" ", "", strtolower($a->config['admin_email'])));
 +                      if (in_array(strtolower($email), $adminlist)) {
 +                              $err .= t(' Cannot change to that email.');
 +                              $email = $a->user['email'];
 +                      }
 +              }
        }
  
        if(strlen($err)) {
@@@ -1080,22 -1082,22 +1086,22 @@@ function settings_content(&$a) 
                '$uid' => local_user(),
                '$form_security_token' => get_form_security_token("settings"),
                '$nickname_block' => $prof_addr,
--              
++
                '$h_pass'       => t('Password Settings'),
-               '$password1'=> array('npassword', t('New Password:'), '', ''),
+               '$password1'=> array('password', t('New Password:'), '', ''),
                '$password2'=> array('confirm', t('Confirm:'), '', t('Leave password fields blank unless changing')),
                '$password3'=> array('opassword', t('Current Password:'), '', t('Your current password to confirm the changes')),
-               '$password4'=> array('password', t('Password:'), '', t('Your current password to confirm the changes')),
+               '$password4'=> array('mpassword', t('Password:'), '', t('Your current password to confirm the changes')),
                '$oid_enable' => (! get_config('system','no_openid')),
                '$openid'       => $openid_field,
--              
++
                '$h_basic'      => t('Basic Settings'),
                '$username' => array('username',  t('Full Name:'), $username,''),
                '$email'        => array('email', t('Email Address:'), $email, ''),
                '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''),
                '$defloc'       => array('defloc', t('Default Post Location:'), $defloc, ''),
                '$allowloc' => array('allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''),
--              
++
  
                '$h_prv'        => t('Security and Privacy Settings'),