Browse Source

2018-04-04

Visman 7 năm trước cách đây
mục cha
commit
5b4a0efd5e

+ 11 - 11
app/Models/Pages/Install.php

@@ -872,16 +872,16 @@ class Install extends Page
                 'password'         => ['VARCHAR(255)', false, ''],
                 'email'            => ['VARCHAR(80)', false, ''],
                 'email_confirmed'  => ['TINYINT(1)', false, 0],
-                'title'            => ['VARCHAR(50)', true],
-                'realname'         => ['VARCHAR(40)', true],
-                'url'              => ['VARCHAR(100)', true],
-                'jabber'           => ['VARCHAR(80)', true],
-                'icq'              => ['VARCHAR(12)', true],
-                'msn'              => ['VARCHAR(80)', true],
-                'aim'              => ['VARCHAR(30)', true],
-                'yahoo'            => ['VARCHAR(30)', true],
-                'location'         => ['VARCHAR(30)', true],
-                'signature'        => ['TEXT', true],
+                'title'            => ['VARCHAR(50)', false, ''],
+                'realname'         => ['VARCHAR(40)', false, ''],
+                'url'              => ['VARCHAR(100)', false, ''],
+                'jabber'           => ['VARCHAR(80)', false, ''],
+                'icq'              => ['VARCHAR(12)', false, ''],
+                'msn'              => ['VARCHAR(80)', false, ''],
+                'aim'              => ['VARCHAR(30)', false, ''],
+                'yahoo'            => ['VARCHAR(30)', false, ''],
+                'location'         => ['VARCHAR(30)', false, ''],
+                'signature'        => ['TEXT', false],
                 'disp_topics'      => ['TINYINT(3) UNSIGNED', true],
                 'disp_posts'       => ['TINYINT(3) UNSIGNED', true],
                 'email_setting'    => ['TINYINT(1)', false, 1],
@@ -906,7 +906,7 @@ class Install extends Page
                 'registered'       => ['INT(10) UNSIGNED', false, 0],
                 'registration_ip'  => ['VARCHAR(45)', false, ''],
                 'last_visit'       => ['INT(10) UNSIGNED', false, 0],
-                'admin_note'       => ['VARCHAR(30)', true],
+                'admin_note'       => ['VARCHAR(30)', false, ''],
                 'activate_string'  => ['VARCHAR(80)', true],
                 'activate_key'     => ['VARCHAR(8)', true],    //????
                 'messages_enable'  => ['TINYINT(1)', false, 1],

+ 6 - 2
app/Models/Pages/Profile.php

@@ -184,8 +184,12 @@ class Profile extends Page
 
                 $this->curUser->replAttrs($data, true);
 
+                $this->c->DB->beginTransaction();
+
                 $this->c->users->update($this->curUser);
 
+                $this->c->DB->commit();
+
                 return $this->c->Redirect->page('EditUserProfile',  ['id' => $this->curUser->id])->message('Profile redirect');
             } else {
                 $this->fIswev = $v->getErrors();
@@ -646,10 +650,10 @@ class Profile extends Page
                 'id'      => 'ip',
                 'class'   => 'pline',
                 'type'    => 'link',
-                'caption' => 'IP',
+                'caption' => \ForkBB\__('IP'),
                 'value'   => $this->curUser->registration_ip,
                 'href'    => $this->c->Router->link('', ['id' => $this->curUser->id]), // ????
-                'title'   => 'IP',
+                'title'   => \ForkBB\__('IP title'),
             ];
         }
         $form['sets'][] = [

+ 6 - 0
app/lang/English/profile.po

@@ -419,3 +419,9 @@ msgstr "New avatar"
 
 msgid "New avatar info"
 msgstr "The avatar will be automatically resize to <b>%1$s</b>x<b>%2$s</b> pixel / <b>%3$s</b> bytes (<i>%4$s</i>) if exceeds these parameters."
+
+msgid "IP"
+msgstr "IP"
+
+msgid "IP title"
+msgstr "IP"

+ 6 - 0
app/lang/Russian/profile.po

@@ -419,3 +419,9 @@ msgstr "Новая аватара"
 
 msgid "New avatar info"
 msgstr "Аватара будет автоматически сжата до <b>%1$s</b>x<b>%2$s</b> пиксел / <b>%3$s</b> байт (<i>%4$s</i>), если привысит эти параметры."
+
+msgid "IP"
+msgstr "IP"
+
+msgid "IP title"
+msgstr "IP"

+ 1 - 1
app/templates/topic.forkbb.php

@@ -98,7 +98,7 @@
           <div class="f-post-right f-post-main">
             {!! $post->html() !!}
           </div>
-    @if ($p->user->showSignature && $post->user->signature)
+    @if ($p->user->showSignature && '' != $post->user->signature)
           <div class="f-post-right f-post-signature">
             <hr>
             {!! $post->user->htmlSign !!}