Changeset 977


Ignore:
Timestamp:
Jun 30, 2025, 6:13:54 PM (7 hours ago)
Author:
chronos
Message:
  • Modified: Show URL field in Log items in IS.
  • Fixed: Check presence of Registration form fields on submit.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r976 r977  
    11<?php
    22
    3 $Revision = 976; // Subversion revision
     3$Revision = 977; // Subversion revision
    44$DatabaseRevision = 970; // SQL structure revision
    55$ReleaseTime = strtotime('2025-06-30');
  • trunk/Modules/Log/Log.php

    r958 r977  
    2929        'Value' => array('Type' => 'Text', 'Caption' => 'Hodnota', 'Default' => '', 'ReadOnly' => true),
    3030        'IPAddress' => array('Type' => 'IPv4Address', 'Caption' => 'Adresa IP', 'Default' => '', 'ReadOnly' => true),
     31        'URL' => array('Type' => 'String', 'Caption' => 'URL', 'Default' => '', 'ReadOnly' => true),
    3132      ),
    3233    ));
  • trunk/Modules/User/UserPage.php

    r954 r977  
    208208      if ($Action == 'UserRegisterSave')
    209209      {
    210         $Form = new Form($this->System->FormManager);
    211         $Form->SetClass('UserRegister');
    212         $Form->LoadValuesFromForm();
    213         if ($Form->Values['IsHuman'] == 1)
    214         {
    215           $Result = $User->Register($Form->Values['Login'], $Form->Values['Password'],
    216             $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name']);
    217           $Output .= $this->SystemMessage('Registrace nového účtu', $Result);
    218         } else
    219         {
    220           $Result = USER_NOT_HUMAN;
    221           $Output .= $this->SystemMessage('Nejsi člověk. Strojům není dovoleno se registrovat.', $Result);
    222         }
    223         if ($Result <> USER_REGISTRATED)
    224         {
    225           $Form->OnSubmit = '?Action=UserRegisterSave';
    226           $Output .= $Form->ShowEditForm();
    227         }
     210        if (array_key_exists('Login', $_POST) and array_key_exists('Password', $_POST) and array_key_exists('Name', $_POST)
     211          and array_key_exists('Email', $_POST))
     212        {
     213          $Form = new Form($this->System->FormManager);
     214          $Form->SetClass('UserRegister');
     215          $Form->LoadValuesFromForm();
     216          if ($Form->Values['IsHuman'] == 1)
     217          {
     218            $Result = $User->Register($Form->Values['Login'], $Form->Values['Password'],
     219              $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name']);
     220            $Output .= $this->SystemMessage('Registrace nového účtu', $Result);
     221          } else
     222          {
     223            $Result = USER_NOT_HUMAN;
     224            $Output .= $this->SystemMessage('Nejsi člověk. Strojům není dovoleno se registrovat.', $Result);
     225          }
     226          if ($Result <> USER_REGISTRATED)
     227          {
     228            $Form->OnSubmit = '?Action=UserRegisterSave';
     229            $Output .= $Form->ShowEditForm();
     230          }
     231        } else $Output .= $this->SystemMessage('Registrace', 'Nezadány registrační údaje');
    228232      } else
    229233      if ($Action == 'UserMenu')
Note: See TracChangeset for help on using the changeset viewer.