@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | public function __toString() |
49 | 49 | { |
50 | - return (string)$this->_s; |
|
50 | + return (string) $this->_s; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | public function toJavaScriptLiteral() |
@@ -20,9 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | class THttpUtility |
22 | 22 | { |
23 | - private static $_encodeTable = ['<' => '<','>' => '>','"' => '"']; |
|
24 | - private static $_decodeTable = ['<' => '<','>' => '>','"' => '"']; |
|
25 | - private static $_stripTable = ['<' => '','>' => '','"' => '']; |
|
23 | + private static $_encodeTable = ['<' => '<', '>' => '>', '"' => '"']; |
|
24 | + private static $_decodeTable = ['<' => '<', '>' => '>', '"' => '"']; |
|
25 | + private static $_stripTable = ['<' => '', '>' => '', '"' => '']; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * HTML-encodes a string. |
@@ -41,7 +41,9 @@ |
||
41 | 41 | */ |
42 | 42 | protected function updateJuiOptions($options) |
43 | 43 | { |
44 | - foreach ($options as $key => $value) $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value)); |
|
44 | + foreach ($options as $key => $value) { |
|
45 | + $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value)); |
|
46 | + } |
|
45 | 47 | $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });"; |
46 | 48 | $this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code); |
47 | 49 | } |
@@ -41,8 +41,8 @@ |
||
41 | 41 | */ |
42 | 42 | protected function updateJuiOptions($options) |
43 | 43 | { |
44 | - foreach ($options as $key => $value) $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value)); |
|
45 | - $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });"; |
|
44 | + foreach ($options as $key => $value) $options[$key] = $key.': '.(is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value)); |
|
45 | + $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { ".implode(', ', $options)." });"; |
|
46 | 46 | $this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code); |
47 | 47 | } |
48 | 48 |
@@ -36,14 +36,16 @@ |
||
36 | 36 | |
37 | 37 | public function write($s) |
38 | 38 | { |
39 | - foreach($this->_writers as $writer) |
|
40 | - $writer->write($s); |
|
39 | + foreach($this->_writers as $writer) { |
|
40 | + $writer->write($s); |
|
41 | + } |
|
41 | 42 | } |
42 | 43 | |
43 | 44 | public function flush() |
44 | 45 | { |
45 | - foreach($this->_writers as $writer) |
|
46 | - $s = $writer->flush(); |
|
46 | + foreach($this->_writers as $writer) { |
|
47 | + $s = $writer->flush(); |
|
48 | + } |
|
47 | 49 | return $s; |
48 | 50 | } |
49 | 51 | } |
50 | 52 | \ No newline at end of file |
@@ -36,13 +36,13 @@ |
||
36 | 36 | |
37 | 37 | public function write($s) |
38 | 38 | { |
39 | - foreach($this->_writers as $writer) |
|
39 | + foreach ($this->_writers as $writer) |
|
40 | 40 | $writer->write($s); |
41 | 41 | } |
42 | 42 | |
43 | 43 | public function flush() |
44 | 44 | { |
45 | - foreach($this->_writers as $writer) |
|
45 | + foreach ($this->_writers as $writer) |
|
46 | 46 | $s = $writer->flush(); |
47 | 47 | return $s; |
48 | 48 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $code = strtoupper($this->getToggleKey()); |
87 | 87 | $info = '(<a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/" target="_blank">more info</a>).'; |
88 | 88 | $link = '<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>'; |
89 | - $usage = 'Press ALT-' . $code . ' (Or CTRL-' . $code . ' on OS X) to'; |
|
89 | + $usage = 'Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to'; |
|
90 | 90 | $writer->write("{$usage} {$link} {$info}"); |
91 | 91 | } |
92 | 92 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function writeLine($str = '') |
55 | 55 | { |
56 | - $this->write($str . "\n"); |
|
56 | + $this->write($str."\n"); |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 |
@@ -44,8 +44,9 @@ discard block |
||
44 | 44 | public function attach($owner) |
45 | 45 | { |
46 | 46 | $this->_owner = $owner; |
47 | - foreach($this->events() as $event => $handler) |
|
48 | - $owner->attachEventHandler($event, [$this,$handler]); |
|
47 | + foreach($this->events() as $event => $handler) { |
|
48 | + $owner->attachEventHandler($event, [$this,$handler]); |
|
49 | + } |
|
49 | 50 | } |
50 | 51 | |
51 | 52 | /** |
@@ -57,8 +58,9 @@ discard block |
||
57 | 58 | */ |
58 | 59 | public function detach($owner) |
59 | 60 | { |
60 | - foreach($this->events() as $event => $handler) |
|
61 | - $owner->detachEventHandler($event, [$this,$handler]); |
|
61 | + foreach($this->events() as $event => $handler) { |
|
62 | + $owner->detachEventHandler($event, [$this,$handler]); |
|
63 | + } |
|
62 | 64 | $this->_owner = null; |
63 | 65 | } |
64 | 66 |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | public function attach($owner) |
45 | 45 | { |
46 | 46 | $this->_owner = $owner; |
47 | - foreach($this->events() as $event => $handler) |
|
48 | - $owner->attachEventHandler($event, [$this,$handler]); |
|
47 | + foreach ($this->events() as $event => $handler) |
|
48 | + $owner->attachEventHandler($event, [$this, $handler]); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function detach($owner) |
59 | 59 | { |
60 | - foreach($this->events() as $event => $handler) |
|
61 | - $owner->detachEventHandler($event, [$this,$handler]); |
|
60 | + foreach ($this->events() as $event => $handler) |
|
61 | + $owner->detachEventHandler($event, [$this, $handler]); |
|
62 | 62 | $this->_owner = null; |
63 | 63 | } |
64 | 64 |
@@ -111,8 +111,9 @@ |
||
111 | 111 | $fkeys = $this->findForeignKeys($fkObjects[0], $source); |
112 | 112 | for($i = 0;$i < $total;$i++) |
113 | 113 | { |
114 | - foreach($fkeys as $fKey => $srcKey) |
|
115 | - $fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey)); |
|
114 | + foreach($fkeys as $fKey => $srcKey) { |
|
115 | + $fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey)); |
|
116 | + } |
|
116 | 117 | $success = $fkObjects[$i]->save() && $success; |
117 | 118 | } |
118 | 119 | } |
@@ -105,13 +105,13 @@ |
||
105 | 105 | $obj = $this->getContext()->getSourceRecord(); |
106 | 106 | $fkObjects = &$obj->{$this->getContext()->getProperty()}; |
107 | 107 | $success = true; |
108 | - if(($total = count($fkObjects)) > 0) |
|
108 | + if (($total = count($fkObjects)) > 0) |
|
109 | 109 | { |
110 | 110 | $source = $this->getSourceRecord(); |
111 | 111 | $fkeys = $this->findForeignKeys($fkObjects[0], $source); |
112 | - for($i = 0;$i < $total;$i++) |
|
112 | + for ($i = 0; $i < $total; $i++) |
|
113 | 113 | { |
114 | - foreach($fkeys as $fKey => $srcKey) |
|
114 | + foreach ($fkeys as $fKey => $srcKey) |
|
115 | 115 | $fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey)); |
116 | 116 | $success = $fkObjects[$i]->save() && $success; |
117 | 117 | } |
@@ -23,6 +23,6 @@ |
||
23 | 23 | { |
24 | 24 | private $_generate; |
25 | 25 | |
26 | - public function getGenerate(){ return $this->_generate; } |
|
27 | - public function setGenerate($value){ $this->_generate = $value; } |
|
26 | + public function getGenerate() { return $this->_generate; } |
|
27 | + public function setGenerate($value) { $this->_generate = $value; } |
|
28 | 28 | } |
29 | 29 | \ No newline at end of file |