@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | $sale['price'], |
| 46 | 46 | $currency['iso_code'], |
| 47 | 47 | 'paypal', |
| 48 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/success.php', |
|
| 49 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/error.php', |
|
| 48 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/success.php', |
|
| 49 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/error.php', |
|
| 50 | 50 | $extra |
| 51 | 51 | ); |
| 52 | 52 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | unset($_SESSION['bc_sale_id']); |
| 94 | 94 | |
| 95 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
|
|
| 95 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
|
|
| 96 | 96 | exit; |
| 97 | 97 | } |
| 98 | 98 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | ); |
| 130 | 130 | |
| 131 | 131 | unset($_SESSION['bc_sale_id']); |
| 132 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/course_catalog.php');
|
|
| 132 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/course_catalog.php');
|
|
| 133 | 133 | exit; |
| 134 | 134 | } |
| 135 | 135 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | api_not_allowed(true); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - $urlToRedirect = api_get_self() . '?'; |
|
| 27 | + $urlToRedirect = api_get_self().'?'; |
|
| 28 | 28 | |
| 29 | 29 | switch ($_GET['action']) {
|
| 30 | 30 | case 'confirm': |
@@ -93,10 +93,10 @@ discard block |
||
| 93 | 93 | get_lang('Filter'),
|
| 94 | 94 | [$plugin->get_lang('ByStatus'), $plugin->get_lang('ByUser')]
|
| 95 | 95 | ); |
| 96 | -$form->addHtml('<div id="report-by-status" ' . ($selectedFilterType !== '0' ? 'style="display:none"' : '') . '>');
|
|
| 96 | +$form->addHtml('<div id="report-by-status" '.($selectedFilterType !== '0' ? 'style="display:none"' : '').'>');
|
|
| 97 | 97 | $form->addSelect('status', $plugin->get_lang('OrderStatus'), $saleStatuses);
|
| 98 | 98 | $form->addHtml('</div>');
|
| 99 | -$form->addHtml('<div id="report-by-user" ' . ($selectedFilterType !== '1' ? 'style="display:none"' : '') . '>');
|
|
| 99 | +$form->addHtml('<div id="report-by-user" '.($selectedFilterType !== '1' ? 'style="display:none"' : '').'>');
|
|
| 100 | 100 | $form->addText('user', get_lang('UserName'), false);
|
| 101 | 101 | $form->addHtml('</div>');
|
| 102 | 102 | $form->addButtonFilter(get_lang('Search'));
|
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $toolbar .= Display::toolbarButton( |
| 146 | 146 | $plugin->get_lang('PaypalPayoutCommissions'),
|
| 147 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/paypal_payout.php', |
|
| 147 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/paypal_payout.php', |
|
| 148 | 148 | 'paypal', |
| 149 | 149 | 'primary', |
| 150 | 150 | ['title' => $plugin->get_lang('PaypalPayoutCommissions')]
|
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $toolbar .= Display::toolbarButton( |
| 160 | 160 | $plugin->get_lang('PayoutReport'),
|
| 161 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/payout_report.php', |
|
| 161 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/payout_report.php', |
|
| 162 | 162 | 'money', |
| 163 | 163 | 'info', |
| 164 | 164 | ['title' => $plugin->get_lang('PayoutReport')]
|
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
| 4 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | /** |
| 9 | 9 | * Initialization |
| 10 | 10 | */ |
| 11 | -require_once dirname(__FILE__) . '/config.php'; |
|
| 11 | +require_once dirname(__FILE__).'/config.php'; |
|
| 12 | 12 | if (!api_is_platform_admin()) {
|
| 13 | 13 | die ('You must have admin permissions to install plugins');
|
| 14 | 14 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | api_get_setting('cas_activate') == 'true' && |
| 8 | 8 | $_user['auth_source'] == CAS_AUTH_SOURCE |
| 9 | 9 | ) { |
| 10 | - $_template['show_message'] = true; |
|
| 10 | + $_template['show_message'] = true; |
|
| 11 | 11 | // the link URL |
| 12 | 12 | $link_url = "#"; |
| 13 | 13 | if (!empty($plugin_info['settings']['ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url'])) { |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 4 | -if (file_exists(__DIR__ . '/config.vm.php')) { |
|
| 3 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 4 | +if (file_exists(__DIR__.'/config.vm.php')) { |
|
| 5 | 5 | |
| 6 | - require_once dirname(__FILE__) . '/config.php'; |
|
| 6 | + require_once dirname(__FILE__).'/config.php'; |
|
| 7 | 7 | |
| 8 | - require __DIR__ . '/lib/vm/AbstractVM.php'; |
|
| 9 | - require __DIR__ . '/lib/vm/VMInterface.php'; |
|
| 10 | - require __DIR__ . '/lib/vm/DigitalOceanVM.php'; |
|
| 11 | - require __DIR__ . '/lib/VM.php'; |
|
| 8 | + require __DIR__.'/lib/vm/AbstractVM.php'; |
|
| 9 | + require __DIR__.'/lib/vm/VMInterface.php'; |
|
| 10 | + require __DIR__.'/lib/vm/DigitalOceanVM.php'; |
|
| 11 | + require __DIR__.'/lib/VM.php'; |
|
| 12 | 12 | |
| 13 | - $config = require __DIR__ . '/config.vm.php'; |
|
| 13 | + $config = require __DIR__.'/config.vm.php'; |
|
| 14 | 14 | |
| 15 | 15 | $vm = new VM($config); |
| 16 | 16 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | if (empty($activeSessions)) { |
| 22 | 22 | $vm->runCron(); |
| 23 | 23 | } else { |
| 24 | - echo "Can't run cron active sessions found: " . $activeSessions; |
|
| 24 | + echo "Can't run cron active sessions found: ".$activeSessions; |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -55,25 +55,25 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | // BASE CONFIGS - set these for your BBB server in config.php and they will |
| 57 | 57 | // simply flow in here via the constants: |
| 58 | - $this->_securitySalt = CONFIG_SECURITY_SALT; |
|
| 59 | - $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; |
|
| 58 | + $this->_securitySalt = CONFIG_SECURITY_SALT; |
|
| 59 | + $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - private function _processXmlResponse($url){ |
|
| 62 | + private function _processXmlResponse($url) { |
|
| 63 | 63 | /* |
| 64 | 64 | A private utility method used by other public methods to process XML responses. |
| 65 | 65 | */ |
| 66 | 66 | if (extension_loaded('curl')) { |
| 67 | - $ch = curl_init() or die ( curl_error($ch) ); |
|
| 67 | + $ch = curl_init() or die (curl_error($ch)); |
|
| 68 | 68 | $timeout = 10; |
| 69 | - curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false); |
|
| 70 | - curl_setopt( $ch, CURLOPT_URL, $url ); |
|
| 71 | - curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); |
|
| 72 | - curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout); |
|
| 73 | - $data = curl_exec( $ch ); |
|
| 74 | - curl_close( $ch ); |
|
| 75 | - |
|
| 76 | - if($data) |
|
| 69 | + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
|
| 70 | + curl_setopt($ch, CURLOPT_URL, $url); |
|
| 71 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
| 72 | + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); |
|
| 73 | + $data = curl_exec($ch); |
|
| 74 | + curl_close($ch); |
|
| 75 | + |
|
| 76 | + if ($data) |
|
| 77 | 77 | return (new SimpleXMLElement($data)); |
| 78 | 78 | else |
| 79 | 79 | return false; |
@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | '&duration='.urlencode($creationParams['duration']); |
| 138 | 138 | //'&meta_category='.urlencode($creationParams['meta_category']); |
| 139 | 139 | $welcomeMessage = $creationParams['welcomeMsg']; |
| 140 | - if(trim($welcomeMessage)) |
|
| 140 | + if (trim($welcomeMessage)) |
|
| 141 | 141 | $params .= '&welcome='.urlencode($welcomeMessage); |
| 142 | 142 | // Return the complete URL: |
| 143 | - return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) ); |
|
| 143 | + return ($creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt)); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | public function createMeetingWithXmlResponseArray($creationParams) { |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams)); |
| 166 | 166 | |
| 167 | 167 | if ($xml) { |
| 168 | - if($xml->meetingID) |
|
| 168 | + if ($xml->meetingID) |
|
| 169 | 169 | return array( |
| 170 | 170 | 'returncode' => $xml->returncode, |
| 171 | 171 | 'message' => $xml->message, |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $meetingId = '1234' -- REQUIRED - The unique id for the meeting |
| 284 | 284 | */ |
| 285 | 285 | $xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId)); |
| 286 | - if($xml) { |
|
| 286 | + if ($xml) { |
|
| 287 | 287 | return array( |
| 288 | 288 | 'returncode' => $xml->returncode, |
| 289 | 289 | 'running' => $xml->running // -- Returns true/false. |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | and then handle the results that we get in the XML response. |
| 311 | 311 | */ |
| 312 | 312 | $xml = $this->_processXmlResponse($this->getGetMeetingsUrl()); |
| 313 | - if($xml) { |
|
| 313 | + if ($xml) { |
|
| 314 | 314 | // If we don't get a success code, stop processing and return just the returncode: |
| 315 | 315 | if ($xml->returncode != 'SUCCESS') { |
| 316 | 316 | $result = array( |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | ); |
| 380 | 380 | */ |
| 381 | 381 | $xml = $this->_processXmlResponse($this->getMeetingInfoUrl($infoParams)); |
| 382 | - if($xml) { |
|
| 382 | + if ($xml) { |
|
| 383 | 383 | // If we don't get a success code or messageKey, find out why: |
| 384 | 384 | if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
| 385 | 385 | $result = array( |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | probably be required in user code when 'recording' is set to true. |
| 455 | 455 | */ |
| 456 | 456 | $xml = $this->_processXmlResponse($this->getRecordingsUrl($recordingParams)); |
| 457 | - if($xml) { |
|
| 457 | + if ($xml) { |
|
| 458 | 458 | // If we don't get a success code or messageKey, find out why: |
| 459 | 459 | if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
| 460 | 460 | $result = array( |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | ); |
| 525 | 525 | */ |
| 526 | 526 | $xml = $this->_processXmlResponse($this->getPublishRecordingsUrl($recordingParams)); |
| 527 | - if($xml) { |
|
| 527 | + if ($xml) { |
|
| 528 | 528 | return array( |
| 529 | 529 | 'returncode' => $xml->returncode, |
| 530 | 530 | 'published' => $xml->published // -- Returns true/false. |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | */ |
| 558 | 558 | |
| 559 | 559 | $xml = $this->_processXmlResponse($this->getDeleteRecordingsUrl($recordingParams)); |
| 560 | - if($xml) { |
|
| 560 | + if ($xml) { |
|
| 561 | 561 | return array( |
| 562 | 562 | 'returncode' => $xml->returncode, |
| 563 | 563 | 'deleted' => $xml->deleted // -- Returns true/false. |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | foreach ($vmList as $vm) { |
| 72 | 72 | if (isset($vm['enabled']) && $vm['enabled'] == true) { |
| 73 | - $className = $vm['name'] . 'VM'; |
|
| 73 | + $className = $vm['name'].'VM'; |
|
| 74 | 74 | |
| 75 | 75 | return new $className($vm); |
| 76 | 76 | break; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | break; |
| 101 | 101 | } |
| 102 | 102 | } else { |
| 103 | - throw new \Exception(" Id " . $this->vmId . " doesn't exists."); |
|
| 103 | + throw new \Exception(" Id ".$this->vmId." doesn't exists."); |
|
| 104 | 104 | } |
| 105 | 105 | } catch (Exception $e) { |
| 106 | 106 | die($e->getMessage()); |
@@ -118,22 +118,22 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | $powerOff = $droplets->powerOff($this->vmId); |
| 120 | 120 | |
| 121 | - $this->addMessage('Power off droplet #' . $this->vmId); |
|
| 121 | + $this->addMessage('Power off droplet #'.$this->vmId); |
|
| 122 | 122 | |
| 123 | 123 | $this->waitForEvent($powerOff->event_id); |
| 124 | 124 | |
| 125 | - $this->addMessage('Current status: ' . $dropletInfo->droplet->status); |
|
| 125 | + $this->addMessage('Current status: '.$dropletInfo->droplet->status); |
|
| 126 | 126 | |
| 127 | 127 | $resizeDroplet = $droplets->resize( |
| 128 | 128 | $this->vmId, |
| 129 | 129 | array('size_id' => intval($sizeId)) |
| 130 | 130 | ); |
| 131 | - $this->addMessage('Resize droplet to size id: ' . $sizeId); |
|
| 131 | + $this->addMessage('Resize droplet to size id: '.$sizeId); |
|
| 132 | 132 | $this->waitForEvent($resizeDroplet->event_id); |
| 133 | 133 | |
| 134 | 134 | $powerOn = $droplets->powerOn($this->vmId); |
| 135 | 135 | $this->waitForEvent($powerOn->event_id); |
| 136 | - $this->addMessage('Power on droplet #' . $this->vmId); |
|
| 136 | + $this->addMessage('Power on droplet #'.$this->vmId); |
|
| 137 | 137 | |
| 138 | 138 | } |
| 139 | 139 | |