File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ public function prepareDocument()
179179 }
180180
181181
182- if (trim ($ this ->documentData ['pagetitle ' ]) == "" ) {
182+ if (isset ( $ this -> documentData [ ' pagetitle ' ]) && trim ($ this ->documentData ['pagetitle ' ]) == "" ) {
183183 if ($ this ->documentData ['type ' ] == "reference " ) {
184184 $ this ->documentData ['pagetitle ' ] = Lang::get ('global.untitled_weblink ' );
185185 } else {
@@ -290,8 +290,8 @@ public function prepareCreateDocument()
290290
291291 $ this ->documentData ['menuindex ' ] = !empty ($ this ->documentData ['menuindex ' ]) ? (int )$ this ->documentData ['menuindex ' ] : 0 ;
292292
293- $ this ->documentData ['createdby ' ] = EvolutionCMS ()->getLoginUserID (' mgr ' );
294- $ this ->documentData ['editedby ' ] = EvolutionCMS ()->getLoginUserID (' mgr ' );
293+ $ this ->documentData ['createdby ' ] = EvolutionCMS ()->getLoginUserID ();
294+ $ this ->documentData ['editedby ' ] = EvolutionCMS ()->getLoginUserID ();
295295 $ this ->documentData ['createdon ' ] = $ this ->currentDate ;
296296 $ this ->documentData ['editedon ' ] = $ this ->currentDate ;
297297 // invoke OnBeforeDocFormSave event
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public function process(): \Illuminate\Database\Eloquent\Model
131131 SiteContent::query ()
132132 ->whereIn ('id ' , $ documentDeleteIds )
133133 ->update (['deleted ' => 1 ,
134- 'deletedby ' => EvolutionCMS ()->getLoginUserID (' mgr ' ),
134+ 'deletedby ' => EvolutionCMS ()->getLoginUserID (),
135135 'deletedon ' => time ()]);
136136
137137
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ public function validate(): bool
163163 public function prepareEditDocument ()
164164 {
165165 $ existingDocument = SiteContent::query ()->find ($ this ->documentData ['id ' ])->toArray ();
166- $ this ->documentData ['editedby ' ] = EvolutionCMS ()->getLoginUserID (' mgr ' );
166+ $ this ->documentData ['editedby ' ] = EvolutionCMS ()->getLoginUserID ();
167167 $ this ->documentData ['editedon ' ] = $ this ->currentDate ;
168168 $ this ->documentData ['oldparent ' ] = $ existingDocument ['parent ' ];
169169 if (!isset ($ this ->documentData ['parent ' ])){
@@ -211,7 +211,7 @@ public function prepareEditDocument()
211211 $ this ->documentData ['publishedby ' ] = EvolutionCMS ()->getLoginUserID ();
212212 } elseif ((!empty ($ this ->documentData ['pub_date ' ]) && $ this ->documentData ['pub_date ' ] <= $ this ->currentDate && $ this ->documentData ['published ' ])) {
213213 $ this ->documentData ['publishedon ' ] = $ this ->documentData ['pub_date ' ];
214- $ this ->documentData ['publishedby ' ] = EvolutionCMS ()->getLoginUserID (' mgr ' );
214+ $ this ->documentData ['publishedby ' ] = EvolutionCMS ()->getLoginUserID ();
215215 } elseif ($ was_published && !$ this ->documentData ['published ' ]) {
216216 $ this ->documentData ['publishedon ' ] = 0 ;
217217 $ this ->documentData ['publishedby ' ] = 0 ;
You can’t perform that action at this time.
0 commit comments