@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /* |
| 3 | 5 | | ------------------------------------------------------------------- |
| 4 | 6 | | Transliteration characters |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | </tbody> |
| 70 | 70 | </table> |
| 71 | 71 | </div> |
| 72 | -<?php }else{?> |
|
| 72 | +<?php } else{?> |
|
| 73 | 73 | <br/> |
| 74 | 74 | <?php echo $this->l('list_no_items'); ?> |
| 75 | 75 | <br/> |
@@ -23,7 +23,8 @@ |
||
| 23 | 23 | * @endcode |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
|
|
| 27 | - include_once( 'ckeditor_php4.php' ) ; |
|
| 28 | -else |
|
| 29 | - include_once( 'ckeditor_php5.php' ) ; |
|
| 26 | +if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) ) { |
|
| 27 | + include_once( 'ckeditor_php4.php' ) ; |
|
| 28 | +} else { |
|
| 29 | + include_once( 'ckeditor_php5.php' ) ; |
|
| 30 | +} |
|
@@ -142,10 +142,11 @@ discard block |
||
| 142 | 142 | $_config = $this->configSettings($config, $events); |
| 143 | 143 | |
| 144 | 144 | $js = $this->returnGlobalEvents(); |
| 145 | - if (!empty($_config)) |
|
| 146 | - $js .= "CKEDITOR.replace('".$name."', ".$this->jsEncode($_config).");";
|
|
| 147 | - else |
|
| 148 | - $js .= "CKEDITOR.replace('".$name."');";
|
|
| 145 | + if (!empty($_config)) { |
|
| 146 | + $js .= "CKEDITOR.replace('".$name."', ".$this->jsEncode($_config).");"; |
|
| 147 | + } else { |
|
| 148 | + $js .= "CKEDITOR.replace('".$name."');"; |
|
| 149 | + } |
|
| 149 | 150 | |
| 150 | 151 | $out .= $this->script($js); |
| 151 | 152 | |
@@ -182,8 +183,7 @@ discard block |
||
| 182 | 183 | $js = $this->returnGlobalEvents(); |
| 183 | 184 | if (!empty($_config)) {
|
| 184 | 185 | $js .= "CKEDITOR.replace('".$id."', ".$this->jsEncode($_config).");";
|
| 185 | - } |
|
| 186 | - else {
|
|
| 186 | + } else {
|
|
| 187 | 187 | $js .= "CKEDITOR.replace('".$id."');";
|
| 188 | 188 | } |
| 189 | 189 | $out .= $this->script($js); |
@@ -226,12 +226,10 @@ discard block |
||
| 226 | 226 | if (empty($_config)) {
|
| 227 | 227 | if (empty($className)) {
|
| 228 | 228 | $js .= "CKEDITOR.replaceAll();"; |
| 229 | - } |
|
| 230 | - else {
|
|
| 229 | + } else {
|
|
| 231 | 230 | $js .= "CKEDITOR.replaceAll('".$className."');";
|
| 232 | 231 | } |
| 233 | - } |
|
| 234 | - else {
|
|
| 232 | + } else {
|
|
| 235 | 233 | $classDetection = ""; |
| 236 | 234 | $js .= "CKEDITOR.replaceAll( function(textarea, config) {\n";
|
| 237 | 235 | if (!empty($className)) {
|
@@ -289,8 +287,7 @@ discard block |
||
| 289 | 287 | {
|
| 290 | 288 | if (!empty($event)) {
|
| 291 | 289 | $this->events[$event] = array(); |
| 292 | - } |
|
| 293 | - else {
|
|
| 290 | + } else {
|
|
| 294 | 291 | $this->events = array(); |
| 295 | 292 | } |
| 296 | 293 | } |
@@ -329,8 +326,7 @@ discard block |
||
| 329 | 326 | {
|
| 330 | 327 | if (!empty($event)) {
|
| 331 | 328 | $this->globalEvents[$event] = array(); |
| 332 | - } |
|
| 333 | - else {
|
|
| 329 | + } else {
|
|
| 334 | 330 | $this->globalEvents = array(); |
| 335 | 331 | } |
| 336 | 332 | } |
@@ -381,11 +377,9 @@ discard block |
||
| 381 | 377 | foreach($_events as $eventName => $handlers) {
|
| 382 | 378 | if (empty($handlers)) {
|
| 383 | 379 | continue; |
| 384 | - } |
|
| 385 | - else if (count($handlers) == 1) {
|
|
| 380 | + } else if (count($handlers) == 1) {
|
|
| 386 | 381 | $_config['on'][$eventName] = '@@'.$handlers[0]; |
| 387 | - } |
|
| 388 | - else {
|
|
| 382 | + } else {
|
|
| 389 | 383 | $_config['on'][$eventName] = '@@function (ev){';
|
| 390 | 384 | foreach ($handlers as $handler => $code) {
|
| 391 | 385 | $_config['on'][$eventName] .= '('.$code.')(ev);';
|
@@ -488,8 +482,7 @@ discard block |
||
| 488 | 482 | */ |
| 489 | 483 | if (isset($_SERVER['SCRIPT_FILENAME'])) {
|
| 490 | 484 | $realPath = dirname($_SERVER['SCRIPT_FILENAME']); |
| 491 | - } |
|
| 492 | - else {
|
|
| 485 | + } else {
|
|
| 493 | 486 | /** |
| 494 | 487 | * realpath - Returns canonicalized absolute pathname |
| 495 | 488 | */ |
@@ -546,10 +539,12 @@ discard block |
||
| 546 | 539 | return '{' . implode(',', $temp) . '}';
|
| 547 | 540 | } |
| 548 | 541 | // String otherwise |
| 549 | - if (strpos($val, '@@') === 0) |
|
| 550 | - return substr($val, 2); |
|
| 551 | - if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') |
|
| 552 | - return $val; |
|
| 542 | + if (strpos($val, '@@') === 0) { |
|
| 543 | + return substr($val, 2); |
|
| 544 | + } |
|
| 545 | + if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') { |
|
| 546 | + return $val; |
|
| 547 | + } |
|
| 553 | 548 | |
| 554 | 549 | return '"' . str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val) . '"';
|
| 555 | 550 | } |
@@ -146,10 +146,11 @@ discard block |
||
| 146 | 146 | $_config = $this->configSettings($config, $events); |
| 147 | 147 | |
| 148 | 148 | $js = $this->returnGlobalEvents(); |
| 149 | - if (!empty($_config)) |
|
| 150 | - $js .= "CKEDITOR.replace('".$name."', ".$this->jsEncode($_config).");";
|
|
| 151 | - else |
|
| 152 | - $js .= "CKEDITOR.replace('".$name."');";
|
|
| 149 | + if (!empty($_config)) { |
|
| 150 | + $js .= "CKEDITOR.replace('".$name."', ".$this->jsEncode($_config).");"; |
|
| 151 | + } else { |
|
| 152 | + $js .= "CKEDITOR.replace('".$name."');"; |
|
| 153 | + } |
|
| 153 | 154 | |
| 154 | 155 | $out .= $this->script($js); |
| 155 | 156 | |
@@ -186,8 +187,7 @@ discard block |
||
| 186 | 187 | $js = $this->returnGlobalEvents(); |
| 187 | 188 | if (!empty($_config)) {
|
| 188 | 189 | $js .= "CKEDITOR.replace('".$id."', ".$this->jsEncode($_config).");";
|
| 189 | - } |
|
| 190 | - else {
|
|
| 190 | + } else {
|
|
| 191 | 191 | $js .= "CKEDITOR.replace('".$id."');";
|
| 192 | 192 | } |
| 193 | 193 | $out .= $this->script($js); |
@@ -230,12 +230,10 @@ discard block |
||
| 230 | 230 | if (empty($_config)) {
|
| 231 | 231 | if (empty($className)) {
|
| 232 | 232 | $js .= "CKEDITOR.replaceAll();"; |
| 233 | - } |
|
| 234 | - else {
|
|
| 233 | + } else {
|
|
| 235 | 234 | $js .= "CKEDITOR.replaceAll('".$className."');";
|
| 236 | 235 | } |
| 237 | - } |
|
| 238 | - else {
|
|
| 236 | + } else {
|
|
| 239 | 237 | $classDetection = ""; |
| 240 | 238 | $js .= "CKEDITOR.replaceAll( function(textarea, config) {\n";
|
| 241 | 239 | if (!empty($className)) {
|
@@ -293,8 +291,7 @@ discard block |
||
| 293 | 291 | {
|
| 294 | 292 | if (!empty($event)) {
|
| 295 | 293 | $this->_events[$event] = array(); |
| 296 | - } |
|
| 297 | - else {
|
|
| 294 | + } else {
|
|
| 298 | 295 | $this->_events = array(); |
| 299 | 296 | } |
| 300 | 297 | } |
@@ -333,8 +330,7 @@ discard block |
||
| 333 | 330 | {
|
| 334 | 331 | if (!empty($event)) {
|
| 335 | 332 | $this->_globalEvents[$event] = array(); |
| 336 | - } |
|
| 337 | - else {
|
|
| 333 | + } else {
|
|
| 338 | 334 | $this->_globalEvents = array(); |
| 339 | 335 | } |
| 340 | 336 | } |
@@ -387,11 +383,9 @@ discard block |
||
| 387 | 383 | foreach($_events as $eventName => $handlers) {
|
| 388 | 384 | if (empty($handlers)) {
|
| 389 | 385 | continue; |
| 390 | - } |
|
| 391 | - else if (count($handlers) == 1) {
|
|
| 386 | + } else if (count($handlers) == 1) {
|
|
| 392 | 387 | $_config['on'][$eventName] = '@@'.$handlers[0]; |
| 393 | - } |
|
| 394 | - else {
|
|
| 388 | + } else {
|
|
| 395 | 389 | $_config['on'][$eventName] = '@@function (ev){';
|
| 396 | 390 | foreach ($handlers as $handler => $code) {
|
| 397 | 391 | $_config['on'][$eventName] .= '('.$code.')(ev);';
|
@@ -497,8 +491,7 @@ discard block |
||
| 497 | 491 | */ |
| 498 | 492 | if (isset($_SERVER['SCRIPT_FILENAME'])) {
|
| 499 | 493 | $realPath = dirname($_SERVER['SCRIPT_FILENAME']); |
| 500 | - } |
|
| 501 | - else {
|
|
| 494 | + } else {
|
|
| 502 | 495 | /** |
| 503 | 496 | * realpath - Returns canonicalized absolute pathname |
| 504 | 497 | */ |
@@ -556,10 +549,12 @@ discard block |
||
| 556 | 549 | return '{' . implode(',', $temp) . '}';
|
| 557 | 550 | } |
| 558 | 551 | // String otherwise |
| 559 | - if (strpos($val, '@@') === 0) |
|
| 560 | - return substr($val, 2); |
|
| 561 | - if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') |
|
| 562 | - return $val; |
|
| 552 | + if (strpos($val, '@@') === 0) { |
|
| 553 | + return substr($val, 2); |
|
| 554 | + } |
|
| 555 | + if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') { |
|
| 556 | + return $val; |
|
| 557 | + } |
|
| 563 | 558 | |
| 564 | 559 | return '"' . str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val) . '"';
|
| 565 | 560 | } |
@@ -16,8 +16,9 @@ |
||
| 16 | 16 | // specify the LDAP server to connect to |
| 17 | 17 | $conn = ldap_connect($this->config->item('ldapserver')) or die("Oh no can't create LDAP connection"); |
| 18 | 18 | // bind to the LDAP server specified above |
| 19 | - if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) |
|
| 20 | - echo "Invalid credentials."; |
|
| 19 | + if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) { |
|
| 20 | + echo "Invalid credentials."; |
|
| 21 | + } |
|
| 21 | 22 | // Search for user in directory |
| 22 | 23 | $cred = explode('\\', $username); |
| 23 | 24 | list($domain, $user) = $cred; |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | </tbody> |
| 70 | 70 | </table> |
| 71 | 71 | </div> |
| 72 | -<?php }else{?> |
|
| 72 | +<?php } else{?> |
|
| 73 | 73 | <br/> |
| 74 | 74 | <?php echo $this->l('list_no_items'); ?> |
| 75 | 75 | <br/> |