X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mobile%2Fexpense_edit.php;h=654d1698d76892f9094963441008a9799691dbda;hb=ed41335d63e71a11d30e92f4367106e9398adf9d;hp=e9e1ca63a7a4d9e238b2d2df3868dc29a46c6a06;hpb=903dae76e54a4e0c081532a8113c00ef1b56a1b5;p=timetracker.git diff --git a/mobile/expense_edit.php b/mobile/expense_edit.php index e9e1ca63..654d1698 100644 --- a/mobile/expense_edit.php +++ b/mobile/expense_edit.php @@ -45,8 +45,8 @@ if (!$user->isPluginEnabled('ex')) { $cl_id = (int)$request->getParameter('id'); // Get the expense item we are editing. $expense_item = ttExpenseHelper::getItem($cl_id); -if (!$expense_item || $expense_item['invoice_id']) { - // Prohibit editing not ours or invoiced items. +if (!$expense_item || $expense_item['approved'] || $expense_item['invoice_id']) { + // Prohibit editing not ours, approved, or invoiced items. header('Location: access_denied.php'); exit(); } @@ -155,7 +155,7 @@ $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get( if ($request->isPost()) { // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) + if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); if ($show_project && !$cl_project) $err->add($i18n->get('error.project'));