@@ -25,6 +25,9 @@ |
||
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $day |
|
30 | + */ |
|
28 | 31 | public function getFreeTimeInDay($day) |
29 | 32 | { |
30 | 33 | $currentUser = Users_Record_Model::getCurrentUserModel(); |
@@ -6,22 +6,22 @@ |
||
6 | 6 | require_once 'include/main/WebUI.php'; |
7 | 7 | \App\Config::$requestMode = 'API'; |
8 | 8 | try { |
9 | - if (!in_array('webservice', $enabledServices)) { |
|
10 | - throw new \App\Exceptions\NoPermittedToApi('Webservice - Service is not active', 403); |
|
11 | - } |
|
12 | - $controller = Api\Controller::getInstance(); |
|
13 | - $process = $controller->preProcess(); |
|
14 | - if ($process) { |
|
15 | - $controller->process(); |
|
16 | - } |
|
17 | - $controller->postProcess(); |
|
9 | + if (!in_array('webservice', $enabledServices)) { |
|
10 | + throw new \App\Exceptions\NoPermittedToApi('Webservice - Service is not active', 403); |
|
11 | + } |
|
12 | + $controller = Api\Controller::getInstance(); |
|
13 | + $process = $controller->preProcess(); |
|
14 | + if ($process) { |
|
15 | + $controller->process(); |
|
16 | + } |
|
17 | + $controller->postProcess(); |
|
18 | 18 | } catch (\Api\Core\Exception $e) { |
19 | - $e->handleError(); |
|
19 | + $e->handleError(); |
|
20 | 20 | } catch (\App\Exceptions\NoPermittedToApi $e) { |
21 | - echo json_encode([ |
|
22 | - 'status' => 0, |
|
23 | - 'error' => [ |
|
24 | - 'message' => $e->getMessage(), |
|
25 | - ], |
|
26 | - ]); |
|
21 | + echo json_encode([ |
|
22 | + 'status' => 0, |
|
23 | + 'error' => [ |
|
24 | + 'message' => $e->getMessage(), |
|
25 | + ], |
|
26 | + ]); |
|
27 | 27 | } |
@@ -8,9 +8,9 @@ discard block |
||
8 | 8 | /* +******** active services *********** */ |
9 | 9 | //List of active services. To enable you must uncomment the appropriate line. |
10 | 10 | $enabledServices = [ |
11 | - //'dav', |
|
12 | - //'webservices', |
|
13 | - //'webservice', |
|
11 | + //'dav', |
|
12 | + //'webservices', |
|
13 | + //'webservice', |
|
14 | 14 | ]; |
15 | 15 | /* +*************** DAV **************** */ |
16 | 16 | $enableBrowser = false; |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | |
21 | 21 | /* +********* Webservice config ********* */ |
22 | 22 | $API_CONFIG = [ |
23 | - 'ENCRYPT_DATA_TRANSFER' => false, |
|
24 | - 'AUTH_METHOD' => 'Basic', |
|
25 | - 'PRIVATE_KEY' => 'config/private.key', |
|
26 | - 'PUBLIC_KEY' => 'config/public.key', |
|
23 | + 'ENCRYPT_DATA_TRANSFER' => false, |
|
24 | + 'AUTH_METHOD' => 'Basic', |
|
25 | + 'PRIVATE_KEY' => 'config/private.key', |
|
26 | + 'PUBLIC_KEY' => 'config/public.key', |
|
27 | 27 | ]; |
@@ -6,16 +6,16 @@ |
||
6 | 6 | * @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com) |
7 | 7 | */ |
8 | 8 | $DEVELOPER_CONFIG = [ |
9 | - // Turn the possibility to change generatedtype |
|
10 | - 'CHANGE_GENERATEDTYPE' => false, |
|
11 | - // Enable minimize JS files |
|
12 | - 'MINIMIZE_JS' => true, |
|
13 | - // Enable minimize CSS files |
|
14 | - 'MINIMIZE_CSS' => true, |
|
15 | - // Change of fields visibility |
|
16 | - 'CHANGE_VISIBILITY' => false, |
|
17 | - // Adding/Deleting relations between modules. |
|
18 | - 'CHANGE_RELATIONS' => false, |
|
19 | - // Developer libraries update mode |
|
20 | - 'MISSING_LIBRARY_DEV_MODE' => false, |
|
9 | + // Turn the possibility to change generatedtype |
|
10 | + 'CHANGE_GENERATEDTYPE' => false, |
|
11 | + // Enable minimize JS files |
|
12 | + 'MINIMIZE_JS' => true, |
|
13 | + // Enable minimize CSS files |
|
14 | + 'MINIMIZE_CSS' => true, |
|
15 | + // Change of fields visibility |
|
16 | + 'CHANGE_VISIBILITY' => false, |
|
17 | + // Adding/Deleting relations between modules. |
|
18 | + 'CHANGE_RELATIONS' => false, |
|
19 | + // Developer libraries update mode |
|
20 | + 'MISSING_LIBRARY_DEV_MODE' => false, |
|
21 | 21 | ]; |
@@ -6,6 +6,6 @@ |
||
6 | 6 | * @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com) |
7 | 7 | * @author Mariusz Krzaczkowski <[email protected]> |
8 | 8 | */ |
9 | -chdir(__DIR__.'/../'); |
|
9 | +chdir(__DIR__ . '/../'); |
|
10 | 10 | define('IS_PUBLIC_DIR', true); |
11 | 11 | require './index.php'; |
@@ -6,6 +6,6 @@ |
||
6 | 6 | * @copyright YetiForce Sp. z o.o |
7 | 7 | * @author Mariusz Krzaczkowski <[email protected]> |
8 | 8 | */ |
9 | -chdir(__DIR__.'/../'); |
|
9 | +chdir(__DIR__ . '/../'); |
|
10 | 10 | define('IS_PUBLIC_DIR', true); |
11 | 11 | require 'webservice.php'; |
@@ -6,6 +6,6 @@ |
||
6 | 6 | * @copyright YetiForce Sp. z o.o |
7 | 7 | * @author Mariusz Krzaczkowski <[email protected]> |
8 | 8 | */ |
9 | -chdir(__DIR__.'/../'); |
|
9 | +chdir(__DIR__ . '/../'); |
|
10 | 10 | define('IS_PUBLIC_DIR', true); |
11 | 11 | require 'cron.php'; |
@@ -6,6 +6,6 @@ |
||
6 | 6 | * @copyright YetiForce Sp. z o.o |
7 | 7 | * @author Mariusz Krzaczkowski <[email protected]> |
8 | 8 | */ |
9 | -chdir(__DIR__.'/../'); |
|
9 | +chdir(__DIR__ . '/../'); |
|
10 | 10 | define('IS_PUBLIC_DIR', true); |
11 | 11 | require 'dav.php'; |
@@ -6,6 +6,6 @@ |
||
6 | 6 | * @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com) |
7 | 7 | * @author Mariusz Krzaczkowski <[email protected]> |
8 | 8 | */ |
9 | -chdir(__DIR__.'/../'); |
|
9 | +chdir(__DIR__ . '/../'); |
|
10 | 10 | define('IS_PUBLIC_DIR', true); |
11 | 11 | require 'file.php'; |