Changeset 887 for trunk/Modules/Finance/UserState.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/UserState.php
r874 r887 3 3 class PageFinanceUserState extends Page 4 4 { 5 var $FullTitle = 'Stav financí účastníka'; 6 var $ShortTitle = 'Stav financí'; 7 var $ParentClass = 'PageUser'; 5 function __construct(System $System) 6 { 7 parent::__construct($System); 8 $this->FullTitle = 'Stav financí účastníka'; 9 $this->ShortTitle = 'Stav financí'; 10 $this->ParentClass = 'PageUser'; 11 } 8 12 9 13 function ShowFinanceOperation($Subject) … … 69 73 } 70 74 71 function Show() 75 function Show(): string 72 76 { 73 $Finance = & $this->System->Modules['Finance'];77 $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance; 74 78 $Finance->LoadMonthParameters(0); 75 79 … … 77 81 if (array_key_exists('i', $_GET)) 78 82 { 79 if (! $this->System->User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění';83 if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění'; 80 84 $CustomerId = $_GET['i']; 81 85 } else 82 86 { 83 if (! $this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) return 'Nemáte oprávnění';84 $UserId = $this->System->User->User['Id'];87 if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('Finance', 'DisplaySubjectState')) return 'Nemáte oprávnění'; 88 $UserId = ModuleUser::Cast($this->System->GetModule('User'))->User->User['Id']; 85 89 $DbResult = $this->Database->query('SELECT `Customer` FROM `UserCustomerRel` WHERE `User`='.$UserId.' LIMIT 1'); 86 90 if ($DbResult->num_rows > 0)
Note:
See TracChangeset
for help on using the changeset viewer.