@@ -533,23 +533,23 @@ public function getConnectionOptions() {
533533 */
534534 public function configToEnv ($ opts = null ) {
535535 $ options = is_null ($ opts ) ? $ this ->getConnectionOptions () : $ opts ;
536- if (array_key_exists ('url ' , $ options )){
537- putenv ('FLEXIBEE_URL= ' . $ options ['URL ' ]);
536+ if (array_key_exists ('url ' , $ options )) {
537+ putenv ('FLEXIBEE_URL= ' . $ options ['URL ' ]);
538538 }
539- if (array_key_exists ('user ' , $ options )){
540- putenv ('FLEXIBEE_LOGIN= ' . $ options ['user ' ]);
539+ if (array_key_exists ('user ' , $ options )) {
540+ putenv ('FLEXIBEE_LOGIN= ' . $ options ['user ' ]);
541541 }
542- if (array_key_exists ('password ' , $ options )){
543- putenv ('FLEXIBEE_PASSWORD= ' . $ options ['password ' ]);
542+ if (array_key_exists ('password ' , $ options )) {
543+ putenv ('FLEXIBEE_PASSWORD= ' . $ options ['password ' ]);
544544 }
545- if (array_key_exists ('company ' , $ options )){
546- putenv ('FLEXIBEE_COMPANY= ' . $ options ['company ' ]);
545+ if (array_key_exists ('company ' , $ options )) {
546+ putenv ('FLEXIBEE_COMPANY= ' . $ options ['company ' ]);
547547 }
548- if (array_key_exists ('authSessionId ' , $ options )){
549- putenv ('FLEXIBEE_AUTHSESSID= ' . $ options ['authSessionId ' ]);
548+ if (array_key_exists ('authSessionId ' , $ options )) {
549+ putenv ('FLEXIBEE_AUTHSESSID= ' . $ options ['authSessionId ' ]);
550550 }
551551 }
552-
552+
553553 /**
554554 * Inicializace CURL
555555 *
@@ -1087,7 +1087,7 @@ public function parseError(array $responseDecoded) {
10871087 }
10881088
10891089 foreach ($ this ->errors as $ errorInfo ) {
1090- $ this ->addStatusMessage (array_key_exists ('error ' ,$ errorInfo ) ? $ errorInfo ['error ' ] : $ errorInfo ['message ' ], 'error ' );
1090+ $ this ->addStatusMessage (array_key_exists ('error ' , $ errorInfo ) ? $ errorInfo ['error ' ] : $ errorInfo ['message ' ], 'error ' );
10911091 if (array_key_exists ('for ' , $ errorInfo )) {
10921092 unset($ errorInfo ['message ' ]);
10931093 $ this ->addStatusMessage (json_encode ($ errorInfo ), 'debug ' );
@@ -1738,7 +1738,7 @@ public function logResult($resultData = null, $url = null) {
17381738 $ resultData = $ this ->lastResult ;
17391739 }
17401740 if (isset ($ url )) {
1741- \Ease \Shared::logger ()->addToLog ($ this ,$ this ->lastResponseCode . ': ' . urldecode ($ url ));
1741+ \Ease \Shared::logger ()->addToLog ($ this , $ this ->lastResponseCode . ': ' . urldecode ($ url ));
17421742 }
17431743
17441744 if (isset ($ resultData ['results ' ])) {
@@ -2416,11 +2416,10 @@ public function sendByMail($to, $subject, $body, $cc = null) {
24162416 *
24172417 * @url https://www.flexibee.eu/api/dokumentace/ref/odesilani-mailem/
24182418 *
2419- * @return int http response code
2419+ * @return boolean
24202420 */
24212421 public function sendUnsent () {
2422- return $ this ->doCurlRequest ('automaticky-odeslat-neodeslane ' , 'PUT ' ,
2423- 'xml ' );
2422+ return $ this ->performRequest ('automaticky-odeslat-neodeslane ' , 'PUT ' , 'xml ' ) == 202 ;
24242423 }
24252424
24262425 /**
0 commit comments