Changeset 3833:ea88f004549f for admin/services.php
- Timestamp:
- 08/30/18 16:26:16 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/services.php
r3819 r3833 25 25 $core->rest->addFunction('setSectionFold', array('dcRestMethods', 'setSectionFold')); 26 26 $core->rest->addFunction('getModuleById', array('dcRestMethods', 'getModuleById')); 27 $core->rest->addFunction('setDashboardPositions', array('dcRestMethods', 'setDashboardPositions')); 27 28 28 29 $core->rest->serve(); … … 566 567 } 567 568 569 public static function setDashboardPositions($core, $get, $post) 570 { 571 if (empty($post['id'])) { 572 throw new Exception('No zone name'); 573 } 574 if (empty($post['list'])) { 575 throw new Exception('No sorted list of id'); 576 } 577 578 if ($core->auth->user_prefs->dashboard === null) { 579 $core->auth->user_prefs->addWorkspace('dashboard'); 580 } 581 582 $zone = $post['id']; 583 $order = $post['list']; 584 585 $core->auth->user_prefs->dashboard->put($zone, $order); 586 return true; 587 } 588 568 589 public static function getModuleById($core, $get, $post) 569 590 {
Note: See TracChangeset
for help on using the changeset viewer.