File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ public function invoke(?array $args): bool
1919 $ this ->model ->acl_allowed = $ this ->model ->active_user
2020 && $ this ->model ->active_user ->getOption (\BNETDocs \Libraries \User \User::OPTION_ACL_DOCUMENT_MODIFY );
2121
22+ $ this ->model ->document_id = Router::query ()['id ' ] ?? null ;
23+
2224 if (!$ this ->model ->acl_allowed )
2325 {
2426 $ this ->model ->_responseCode = HttpCode::HTTP_FORBIDDEN ;
2527 $ this ->model ->error = $ this ->model ->active_user ? EditModel::ERROR_ACL_NOT_SET : EditModel::ERROR_NOT_LOGGED_IN ;
2628 return true ;
2729 }
2830
29- $ this ->model ->document_id = Router::query ()['id ' ] ?? null ;
30-
3131 try { $ this ->model ->document = new \BNETDocs \Libraries \Document ($ this ->model ->document_id ); }
3232 catch (\UnexpectedValueException ) { $ this ->model ->document = null ; }
3333
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ $description = 'This form allows an individual to edit a document.';
88$ url = '/document/edit ' ;
99$ comments = $ this ->getContext ()->comments ;
1010$ document_id = $ this ->getContext ()->document_id ;
11- $ document_url = ($ this ->getContext ()->document ? $ this ->getContext ()->document ->getURI () : UrlFormatter::format ('/document/ ' . rawurlencode ($ document_id )));
11+ $ document_url = ($ this ->getContext ()->document ? $ this ->getContext ()->document ->getURI () : UrlFormatter::format ('/document/ ' . rawurlencode ($ document_id ?? '' )));
1212$ error = $ this ->getContext ()->error ;
1313switch ($ error )
1414{
You can’t perform that action at this time.
0 commit comments