X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=invoice_view.php;h=62f0cbbff6740dd571a517ddc957c7cd4e9557a6;hb=e02d7592b0556895e35f4d028939197c132f6b09;hp=4a6027a5b86f81bb04c24e59e194fa242ed7fa9a;hpb=926ea063e48ed8a45dcd308b87f92abe2bfed716;p=timetracker.git diff --git a/invoice_view.php b/invoice_view.php index 4a6027a5..62f0cbbf 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -32,11 +32,15 @@ import('ttInvoiceHelper'); import('ttClientHelper'); import('form.Form'); -// Access check. -if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_own_invoices')) || !$user->isPluginEnabled('iv')) { +// Access checks. +if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_own_invoices'))) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('iv')) { + header('Location: feature_disabled.php'); + exit(); +} $cl_id = (int)$request->getParameter('id'); $invoice = ttInvoiceHelper::getInvoice($cl_id); @@ -90,12 +94,12 @@ $form = new Form('invoiceForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); // invoiceForm only contains controls for "Mark paid" block below invoice table. if ($user->isPluginEnabled('ps')) { - $mark_paid_action_options = array('1'=>$i18n->getKey('dropdown.paid'),'2'=>$i18n->getKey('dropdown.not_paid')); + $mark_paid_action_options = array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')); $form->addInput(array('type'=>'combobox', 'name'=>'mark_paid_action_options', 'data'=>$mark_paid_action_options, 'value'=>$cl_mark_paid_action_option)); - $form->addInput(array('type'=>'submit','name'=>'btn_mark_paid','value'=>$i18n->getKey('button.submit'))); + $form->addInput(array('type'=>'submit','name'=>'btn_mark_paid','value'=>$i18n->get('button.submit'))); } if ($request->isPost()) { @@ -120,6 +124,6 @@ $smarty->assign('client_name', $client['name']); $smarty->assign('client_address', $client['address']); $smarty->assign('invoice_items', $invoice_items); $smarty->assign('colspan', $colspan); -$smarty->assign('title', $i18n->getKey('title.view_invoice')); +$smarty->assign('title', $i18n->get('title.view_invoice')); $smarty->assign('content_page_name', 'invoice_view.tpl'); $smarty->display('index.tpl');