@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | break; |
124 | 124 | case "boolean": |
125 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
125 | + $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>"; |
|
126 | 126 | break; |
127 | 127 | default: |
128 | 128 | $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
193 | 193 | $details['name'] = preg_replace('/\//', "", $details['name']); |
194 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
194 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
195 | 195 | if ($details['ca'] == 0 && $details['root'] != 1) { |
196 | 196 | return "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
197 | 197 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @author Zilvinas Vaira |
7 | 7 | * |
8 | 8 | */ |
9 | -interface TabbedElementInterface extends PageElementInterface{ |
|
9 | +interface TabbedElementInterface extends PageElementInterface { |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @return boolean |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @author Zilvinas Vaira |
11 | 11 | * |
12 | 12 | */ |
13 | -class TabbedPanelsBox implements PageElementInterface{ |
|
13 | +class TabbedPanelsBox implements PageElementInterface { |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | * @param integer $index |
42 | 42 | * @return string |
43 | 43 | */ |
44 | - private function composeTabId($index){ |
|
45 | - return PageElementInterface::TABS_CLASS.'-'.($index+1); |
|
44 | + private function composeTabId($index) { |
|
45 | + return PageElementInterface::TABS_CLASS . '-' . ($index + 1); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | * @param string $title |
51 | 51 | * @param TabbedElementInterface $element |
52 | 52 | */ |
53 | - public function addTabbedPanel($title, $element){ |
|
53 | + public function addTabbedPanel($title, $element) { |
|
54 | 54 | $li = new CompositeTag('li'); |
55 | 55 | $a = new Tag('a'); |
56 | - $a->addAttribute('href', '#'.$this->composeTabId($this->index)); |
|
56 | + $a->addAttribute('href', '#' . $this->composeTabId($this->index)); |
|
57 | 57 | $a->addText($title); |
58 | 58 | $li->addTag($a); |
59 | 59 | $this->titles [$this->index] = $li; |
60 | 60 | $this->elements [$this->index] = $element; |
61 | - if($element->isActive()){ |
|
61 | + if ($element->isActive()) { |
|
62 | 62 | $this->active = $this->index; |
63 | 63 | } |
64 | 64 | $this->index++; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * {@inheritDoc} |
70 | 70 | * @see \web\lib\admin\view\PageElementInterface::render() |
71 | 71 | */ |
72 | - public function render(){ |
|
72 | + public function render() { |
|
73 | 73 | ?> |
74 | 74 | <div id="<?php echo PageElementInterface::TABS_CLASS; ?>" active="<?php echo $this->active; ?>"> |
75 | 75 | <ul> |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * {@inheritDoc} |
32 | 32 | * @see \web\lib\admin\view\MessageReceiverInterface::hasMessages() |
33 | 33 | */ |
34 | - public function hasMessages(){ |
|
34 | + public function hasMessages() { |
|
35 | 35 | return $this->box->size() > 0; |
36 | 36 | } |
37 | 37 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * {@inheritDoc} |
42 | 42 | * @see MessageReceiverInterface::receiveMessage() |
43 | 43 | */ |
44 | - public function receiveMessage($message){ |
|
44 | + public function receiveMessage($message) { |
|
45 | 45 | $p = new Tag('p'); |
46 | 46 | $p->addAttribute('class', $message->getClass($this->class)); |
47 | 47 | $p->addText($message->getText()); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * |
53 | 53 | */ |
54 | - public function render(){ |
|
54 | + public function render() { |
|
55 | 55 | echo $this->__toString(); |
56 | 56 | } |
57 | 57 | |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | * {@inheritDoc} |
61 | 61 | * @see HtmlElementInterface::__toString() |
62 | 62 | */ |
63 | - public function __toString(){ |
|
64 | - if($this->hasMessages()){ |
|
63 | + public function __toString() { |
|
64 | + if ($this->hasMessages()) { |
|
65 | 65 | return $this->box->__toString(); |
66 | - }else{ |
|
66 | + } else { |
|
67 | 67 | return ''; |
68 | 68 | } |
69 | 69 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @author Zilvinas Vaira |
7 | 7 | * |
8 | 8 | */ |
9 | -abstract class AbstractForm implements TabbedElementInterface{ |
|
9 | +abstract class AbstractForm implements TabbedElementInterface { |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @var string |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return boolean |
42 | 42 | */ |
43 | - public function isActive(){ |
|
43 | + public function isActive() { |
|
44 | 44 | return $this->messageBox->hasMessages(); |
45 | 45 | } |
46 | 46 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @author Zilvinas Vaira |
10 | 10 | * |
11 | 11 | */ |
12 | -class AddNewUserForm extends AbstractForm{ |
|
12 | +class AddNewUserForm extends AbstractForm { |
|
13 | 13 | |
14 | 14 | const ADDNEWUSER_CLASS = 'sb-add-new-user'; |
15 | 15 | |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | * {@inheritDoc} |
29 | 29 | * @see \web\lib\admin\view\PageElementInterface::render() |
30 | 30 | */ |
31 | - public function render(){ |
|
31 | + public function render() { |
|
32 | 32 | ?> |
33 | - <form method="post" action="<?php echo $this->action;?>" accept-charset="utf-8"> |
|
33 | + <form method="post" action="<?php echo $this->action; ?>" accept-charset="utf-8"> |
|
34 | 34 | <div class="<?php echo self::ADDNEWUSER_CLASS; ?>"> |
35 | - <?php $this->messageBox->render();?> |
|
35 | + <?php $this->messageBox->render(); ?> |
|
36 | 36 | <label for="<?php echo AddUserCommand::PARAM_NAME; ?>"><?php echo $this->description; ?></label> |
37 | 37 | <div style="margin: 5px 0px 10px 0px;"> |
38 | 38 | <input type="text" name="<?php echo AddUserCommand::PARAM_NAME; ?>"> |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | $lookFor .= "$name"; |
186 | 186 | } |
187 | - $finding = preg_match("/^(".$lookFor."):(.*)/", $oneRow->user_id, $matches); |
|
187 | + $finding = preg_match("/^(" . $lookFor . "):(.*)/", $oneRow->user_id, $matches); |
|
188 | 188 | if ($finding === 0 || $finding === FALSE) { |
189 | 189 | return FALSE; |
190 | 190 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | case $providerStrings[3]: |
207 | 207 | case $providerStrings[4]: |
208 | 208 | case $providerStrings[5]: |
209 | - if (!in_array(User::PROVIDER_STRINGS[$matches[1]],$listOfProviders)) { |
|
209 | + if (!in_array(User::PROVIDER_STRINGS[$matches[1]], $listOfProviders)) { |
|
210 | 210 | $listOfProviders[] = User::PROVIDER_STRINGS[$matches[1]]; |
211 | 211 | } |
212 | 212 | break; |
@@ -134,7 +134,7 @@ |
||
134 | 134 | */ |
135 | 135 | public function string($input, $allowWhitespace = FALSE) { |
136 | 136 | // always chop out invalid characters, and surrounding whitespace |
137 | - $retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input); |
|
137 | + $retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input); |
|
138 | 138 | if ($retvalStep0 === FALSE) { |
139 | 139 | throw new Exception("iconv failure for string sanitisation. With TRANSLIT, this should never happen!"); |
140 | 140 | } |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | # will be the default value prompted to the user |
185 | 185 | |
186 | 186 | private function printFunctions() { |
187 | - $url = (isset($this->attributes['support:url'][0]) && $this->attributes['support:url'][0] ) ? $this->attributes['support:url'][0] : $this->support_url_substitute; |
|
188 | - $support = (isset($this->attributes['support:email'][0]) && $this->attributes['support:email'][0] ) ? $this->attributes['support:email'][0] : $this->support_email_substitute; |
|
187 | + $url = (isset($this->attributes['support:url'][0]) && $this->attributes['support:url'][0]) ? $this->attributes['support:url'][0] : $this->support_url_substitute; |
|
188 | + $support = (isset($this->attributes['support:email'][0]) && $this->attributes['support:email'][0]) ? $this->attributes['support:email'][0] : $this->support_email_substitute; |
|
189 | 189 | $out = ' |
190 | 190 | my_name=$0 |
191 | 191 | |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | '; |
481 | 481 | } |
482 | 482 | $cert_prompt = $this->selectedEap == \core\common\EAP::EAPTYPE_TLS ? _("enter the password for the certificate file") : _("enter your import password"); |
483 | - $out .= ' cert=$HOME/' . $this->localDir . '/user.p12 |
|
483 | + $out .= ' cert=$HOME/' . $this->localDir . '/user.p12 |
|
484 | 484 | |
485 | 485 | PASSWORD="" |
486 | 486 | prompt="' . $cert_prompt . '" |