@@ -202,13 +202,13 @@ discard block |
||
202 | 202 | $parentPath = $this->getData("permalink"); |
203 | 203 | $parentTitle = $this->getData("page_title"); |
204 | 204 | $this->addActionButton($label,function($row) use ($label, $controllerName, $foreignKey, $additionalInfo, $parentPath, $parentTitle) { |
205 | - $actionParameters = [ |
|
206 | - "label"=>$label, |
|
207 | - "foreignKey"=>$foreignKey, |
|
208 | - "foreignValue"=>$row->primary_key, |
|
209 | - "parentPath"=>$parentPath, |
|
210 | - "parentTitle"=>$parentTitle |
|
211 | - ]; |
|
205 | + $actionParameters = [ |
|
206 | + "label"=>$label, |
|
207 | + "foreignKey"=>$foreignKey, |
|
208 | + "foreignValue"=>$row->primary_key, |
|
209 | + "parentPath"=>$parentPath, |
|
210 | + "parentTitle"=>$parentTitle |
|
211 | + ]; |
|
212 | 212 | |
213 | 213 | if(isset($additionalInfo) && is_callable($additionalInfo)) { |
214 | 214 | $additionalInfo = call_user_func($additionalInfo, $row); |
@@ -217,15 +217,15 @@ discard block |
||
217 | 217 | } |
218 | 218 | } |
219 | 219 | |
220 | - $actionHash = md5(serialize($actionParameters)); |
|
221 | - $actionHashToken = Cache::get("subModule".$actionHash); |
|
222 | - if(!$actionHashToken) { |
|
223 | - $actionHashToken = Str::random(5); |
|
224 | - Cache::forever("subModule".$actionHash, $actionHashToken); |
|
225 | - Cache::forever("subModule".$actionHashToken, $actionParameters); |
|
226 | - } |
|
220 | + $actionHash = md5(serialize($actionParameters)); |
|
221 | + $actionHashToken = Cache::get("subModule".$actionHash); |
|
222 | + if(!$actionHashToken) { |
|
223 | + $actionHashToken = Str::random(5); |
|
224 | + Cache::forever("subModule".$actionHash, $actionHashToken); |
|
225 | + Cache::forever("subModule".$actionHashToken, $actionParameters); |
|
226 | + } |
|
227 | 227 | |
228 | - return action(class_basename($controllerName)."@getSubModule",['subModuleKey'=>$actionHashToken])."?ref=".makeReferalUrl($parentTitle); |
|
228 | + return action(class_basename($controllerName)."@getSubModule",['subModuleKey'=>$actionHashToken])."?ref=".makeReferalUrl($parentTitle); |
|
229 | 229 | }, $condition, $font, $color); |
230 | 230 | |
231 | 231 | } |
@@ -37,8 +37,8 @@ |
||
37 | 37 | $this->menu = (!$this->menu)?cb()->find("cb_menus",["type"=>"path","path"=>request()->segment(2)]):$this->menu; |
38 | 38 | if($this->menu) { |
39 | 39 | $this->privilege = cb()->find("cb_role_privileges",[ |
40 | - "cb_menus_id"=>$this->menu->id, |
|
41 | - "cb_roles_id"=>cb()->session()->roleId() |
|
40 | + "cb_menus_id"=>$this->menu->id, |
|
41 | + "cb_roles_id"=>cb()->session()->roleId() |
|
42 | 42 | ]); |
43 | 43 | } |
44 | 44 | } |