@@ -33,7 +33,7 @@ |
||
33 | 33 | /** @var $this \OCP\Route\IRouter */ |
34 | 34 | $this->create('core_ajax_versions_preview', '/preview')->action( |
35 | 35 | function() { |
36 | - require_once __DIR__ . '/../ajax/preview.php'; |
|
36 | + require_once __DIR__.'/../ajax/preview.php'; |
|
37 | 37 | }); |
38 | 38 | |
39 | 39 | $this->create('files_versions_download', 'download.php') |
@@ -29,7 +29,7 @@ |
||
29 | 29 | OCP\JSON::checkLoggedIn(); |
30 | 30 | |
31 | 31 | $file = $_GET['file']; |
32 | -$revision=(int)$_GET['revision']; |
|
32 | +$revision = (int) $_GET['revision']; |
|
33 | 33 | |
34 | 34 | list($uid, $filename) = OCA\Files_Versions\Storage::getUidAndFilename($file); |
35 | 35 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | print_unescaped($l->t("Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\n", array($_['user_displayname'], $_['filename'], $_['link']))); |
3 | -if ( isset($_['expiration']) ) { |
|
3 | +if (isset($_['expiration'])) { |
|
4 | 4 | print_unescaped($l->t("The share will expire on %s.", array($_['expiration']))); |
5 | 5 | print_unescaped("\n\n"); |
6 | 6 | } |
@@ -9,5 +9,5 @@ discard block |
||
9 | 9 | ?> |
10 | 10 | |
11 | 11 | -- |
12 | -<?php p($theme->getName() . ' - ' . $theme->getSlogan()); ?> |
|
12 | +<?php p($theme->getName().' - '.$theme->getSlogan()); ?> |
|
13 | 13 | <?php print_unescaped("\n".$theme->getBaseUrl()); |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | <tr><td> |
3 | 3 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
4 | 4 | <tr> |
5 | -<td bgcolor="<?php p($theme->getMailHeaderColor());?>" width="20px"> </td> |
|
6 | -<td bgcolor="<?php p($theme->getMailHeaderColor());?>"> |
|
5 | +<td bgcolor="<?php p($theme->getMailHeaderColor()); ?>" width="20px"> </td> |
|
6 | +<td bgcolor="<?php p($theme->getMailHeaderColor()); ?>"> |
|
7 | 7 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
8 | 8 | </td> |
9 | 9 | </tr> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;"> |
14 | 14 | <?php |
15 | 15 | print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link']))); |
16 | -if ( isset($_['expiration']) ) { |
|
16 | +if (isset($_['expiration'])) { |
|
17 | 17 | p($l->t("The share will expire on %s.", array($_['expiration']))); |
18 | 18 | print_unescaped('<br><br>'); |
19 | 19 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
29 | 29 | <?php p($theme->getName()); ?> - |
30 | 30 | <?php p($theme->getSlogan()); ?> |
31 | -<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
31 | +<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
32 | 32 | </td> |
33 | 33 | </tr> |
34 | 34 | <tr> |
@@ -27,12 +27,12 @@ |
||
27 | 27 | \OC_Util::checkLoggedIn(); |
28 | 28 | \OC::$server->getSession()->close(); |
29 | 29 | |
30 | -$file = array_key_exists('file', $_GET) ? (string)$_GET['file'] : ''; |
|
31 | -$maxX = array_key_exists('x', $_GET) ? (int)$_GET['x'] : '32'; |
|
32 | -$maxY = array_key_exists('y', $_GET) ? (int)$_GET['y'] : '32'; |
|
33 | -$scalingUp = array_key_exists('scalingup', $_GET) ? (bool)$_GET['scalingup'] : true; |
|
30 | +$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : ''; |
|
31 | +$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '32'; |
|
32 | +$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '32'; |
|
33 | +$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true; |
|
34 | 34 | $keepAspect = array_key_exists('a', $_GET) ? true : false; |
35 | -$always = array_key_exists('forceIcon', $_GET) ? (bool)$_GET['forceIcon'] : true; |
|
35 | +$always = array_key_exists('forceIcon', $_GET) ? (bool) $_GET['forceIcon'] : true; |
|
36 | 36 | $mode = array_key_exists('mode', $_GET) ? $_GET['mode'] : 'fill'; |
37 | 37 | |
38 | 38 | if ($file === '') { |
@@ -26,44 +26,44 @@ |
||
26 | 26 | OC_Util::checkAdminUser(); |
27 | 27 | OCP\JSON::callCheck(); |
28 | 28 | |
29 | -$action=isset($_POST['action'])?$_POST['action']:$_GET['action']; |
|
29 | +$action = isset($_POST['action']) ? $_POST['action'] : $_GET['action']; |
|
30 | 30 | |
31 | -if(isset($_POST['app']) || isset($_GET['app'])) { |
|
32 | - $app=OC_App::cleanAppId(isset($_POST['app'])? (string)$_POST['app']: (string)$_GET['app']); |
|
31 | +if (isset($_POST['app']) || isset($_GET['app'])) { |
|
32 | + $app = OC_App::cleanAppId(isset($_POST['app']) ? (string) $_POST['app'] : (string) $_GET['app']); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // An admin should not be able to add remote and public services |
36 | 36 | // on its own. This should only be possible programmatically. |
37 | 37 | // This change is due the fact that an admin may not be expected |
38 | 38 | // to execute arbitrary code in every environment. |
39 | -if($app === 'core' && isset($_POST['key']) &&(substr((string)$_POST['key'],0,7) === 'remote_' || substr((string)$_POST['key'],0,7) === 'public_')) { |
|
39 | +if ($app === 'core' && isset($_POST['key']) && (substr((string) $_POST['key'], 0, 7) === 'remote_' || substr((string) $_POST['key'], 0, 7) === 'public_')) { |
|
40 | 40 | OC_JSON::error(array('data' => array('message' => 'Unexpected error!'))); |
41 | 41 | return; |
42 | 42 | } |
43 | 43 | |
44 | -$result=false; |
|
44 | +$result = false; |
|
45 | 45 | $appConfig = \OC::$server->getAppConfig(); |
46 | -switch($action) { |
|
46 | +switch ($action) { |
|
47 | 47 | case 'getValue': |
48 | - $result=$appConfig->getValue($app, (string)$_GET['key'], (string)$_GET['defaultValue']); |
|
48 | + $result = $appConfig->getValue($app, (string) $_GET['key'], (string) $_GET['defaultValue']); |
|
49 | 49 | break; |
50 | 50 | case 'setValue': |
51 | - $result=$appConfig->setValue($app, (string)$_POST['key'], (string)$_POST['value']); |
|
51 | + $result = $appConfig->setValue($app, (string) $_POST['key'], (string) $_POST['value']); |
|
52 | 52 | break; |
53 | 53 | case 'getApps': |
54 | - $result=$appConfig->getApps(); |
|
54 | + $result = $appConfig->getApps(); |
|
55 | 55 | break; |
56 | 56 | case 'getKeys': |
57 | - $result=$appConfig->getKeys($app); |
|
57 | + $result = $appConfig->getKeys($app); |
|
58 | 58 | break; |
59 | 59 | case 'hasKey': |
60 | - $result=$appConfig->hasKey($app, (string)$_GET['key']); |
|
60 | + $result = $appConfig->hasKey($app, (string) $_GET['key']); |
|
61 | 61 | break; |
62 | 62 | case 'deleteKey': |
63 | - $result=$appConfig->deleteKey($app, (string)$_POST['key']); |
|
63 | + $result = $appConfig->deleteKey($app, (string) $_POST['key']); |
|
64 | 64 | break; |
65 | 65 | case 'deleteApp': |
66 | - $result=$appConfig->deleteApp($app); |
|
66 | + $result = $appConfig->deleteApp($app); |
|
67 | 67 | break; |
68 | 68 | } |
69 | 69 | OC_JSON::success(array('data'=>$result)); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | */ |
35 | 35 | |
36 | -if(!\OC::$server->getRequest()->passesStrictCookieCheck()) { |
|
36 | +if (!\OC::$server->getRequest()->passesStrictCookieCheck()) { |
|
37 | 37 | die(); |
38 | 38 | } |
39 | 39 | |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | |
53 | 53 | // Get the config |
54 | 54 | $apps_paths = array(); |
55 | -foreach(OC_App::getEnabledApps() as $app) { |
|
55 | +foreach (OC_App::getEnabledApps() as $app) { |
|
56 | 56 | $apps_paths[$app] = OC_App::getAppWebPath($app); |
57 | 57 | } |
58 | 58 | |
59 | 59 | $config = \OC::$server->getConfig(); |
60 | 60 | $value = $config->getAppValue('core', 'shareapi_default_expire_date', 'no'); |
61 | -$defaultExpireDateEnabled = ($value === 'yes') ? true :false; |
|
61 | +$defaultExpireDateEnabled = ($value === 'yes') ? true : false; |
|
62 | 62 | $defaultExpireDate = $enforceDefaultExpireDate = null; |
63 | 63 | if ($defaultExpireDateEnabled) { |
64 | 64 | $defaultExpireDate = (int) $config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | |
70 | 70 | $countOfDataLocation = 0; |
71 | 71 | |
72 | -$dataLocation = str_replace(OC::$SERVERROOT .'/', '', $config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
73 | -if($countOfDataLocation !== 1 || !OC_User::isAdminUser(OC_User::getUser())){ |
|
72 | +$dataLocation = str_replace(OC::$SERVERROOT.'/', '', $config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
73 | +if ($countOfDataLocation !== 1 || !OC_User::isAdminUser(OC_User::getUser())) { |
|
74 | 74 | $dataLocation = false; |
75 | 75 | } |
76 | 76 | |
@@ -83,70 +83,70 @@ discard block |
||
83 | 83 | "datepickerFormatDate" => json_encode($l->l('jsdate', null)), |
84 | 84 | "dayNames" => json_encode( |
85 | 85 | array( |
86 | - (string)$l->t('Sunday'), |
|
87 | - (string)$l->t('Monday'), |
|
88 | - (string)$l->t('Tuesday'), |
|
89 | - (string)$l->t('Wednesday'), |
|
90 | - (string)$l->t('Thursday'), |
|
91 | - (string)$l->t('Friday'), |
|
92 | - (string)$l->t('Saturday') |
|
86 | + (string) $l->t('Sunday'), |
|
87 | + (string) $l->t('Monday'), |
|
88 | + (string) $l->t('Tuesday'), |
|
89 | + (string) $l->t('Wednesday'), |
|
90 | + (string) $l->t('Thursday'), |
|
91 | + (string) $l->t('Friday'), |
|
92 | + (string) $l->t('Saturday') |
|
93 | 93 | ) |
94 | 94 | ), |
95 | 95 | "dayNamesShort" => json_encode( |
96 | 96 | array( |
97 | - (string)$l->t('Sun.'), |
|
98 | - (string)$l->t('Mon.'), |
|
99 | - (string)$l->t('Tue.'), |
|
100 | - (string)$l->t('Wed.'), |
|
101 | - (string)$l->t('Thu.'), |
|
102 | - (string)$l->t('Fri.'), |
|
103 | - (string)$l->t('Sat.') |
|
97 | + (string) $l->t('Sun.'), |
|
98 | + (string) $l->t('Mon.'), |
|
99 | + (string) $l->t('Tue.'), |
|
100 | + (string) $l->t('Wed.'), |
|
101 | + (string) $l->t('Thu.'), |
|
102 | + (string) $l->t('Fri.'), |
|
103 | + (string) $l->t('Sat.') |
|
104 | 104 | ) |
105 | 105 | ), |
106 | 106 | "dayNamesMin" => json_encode( |
107 | 107 | array( |
108 | - (string)$l->t('Su'), |
|
109 | - (string)$l->t('Mo'), |
|
110 | - (string)$l->t('Tu'), |
|
111 | - (string)$l->t('We'), |
|
112 | - (string)$l->t('Th'), |
|
113 | - (string)$l->t('Fr'), |
|
114 | - (string)$l->t('Sa') |
|
108 | + (string) $l->t('Su'), |
|
109 | + (string) $l->t('Mo'), |
|
110 | + (string) $l->t('Tu'), |
|
111 | + (string) $l->t('We'), |
|
112 | + (string) $l->t('Th'), |
|
113 | + (string) $l->t('Fr'), |
|
114 | + (string) $l->t('Sa') |
|
115 | 115 | ) |
116 | 116 | ), |
117 | 117 | "monthNames" => json_encode( |
118 | 118 | array( |
119 | - (string)$l->t('January'), |
|
120 | - (string)$l->t('February'), |
|
121 | - (string)$l->t('March'), |
|
122 | - (string)$l->t('April'), |
|
123 | - (string)$l->t('May'), |
|
124 | - (string)$l->t('June'), |
|
125 | - (string)$l->t('July'), |
|
126 | - (string)$l->t('August'), |
|
127 | - (string)$l->t('September'), |
|
128 | - (string)$l->t('October'), |
|
129 | - (string)$l->t('November'), |
|
130 | - (string)$l->t('December') |
|
119 | + (string) $l->t('January'), |
|
120 | + (string) $l->t('February'), |
|
121 | + (string) $l->t('March'), |
|
122 | + (string) $l->t('April'), |
|
123 | + (string) $l->t('May'), |
|
124 | + (string) $l->t('June'), |
|
125 | + (string) $l->t('July'), |
|
126 | + (string) $l->t('August'), |
|
127 | + (string) $l->t('September'), |
|
128 | + (string) $l->t('October'), |
|
129 | + (string) $l->t('November'), |
|
130 | + (string) $l->t('December') |
|
131 | 131 | ) |
132 | 132 | ), |
133 | 133 | "monthNamesShort" => json_encode( |
134 | 134 | array( |
135 | - (string)$l->t('Jan.'), |
|
136 | - (string)$l->t('Feb.'), |
|
137 | - (string)$l->t('Mar.'), |
|
138 | - (string)$l->t('Apr.'), |
|
139 | - (string)$l->t('May.'), |
|
140 | - (string)$l->t('Jun.'), |
|
141 | - (string)$l->t('Jul.'), |
|
142 | - (string)$l->t('Aug.'), |
|
143 | - (string)$l->t('Sep.'), |
|
144 | - (string)$l->t('Oct.'), |
|
145 | - (string)$l->t('Nov.'), |
|
146 | - (string)$l->t('Dec.') |
|
135 | + (string) $l->t('Jan.'), |
|
136 | + (string) $l->t('Feb.'), |
|
137 | + (string) $l->t('Mar.'), |
|
138 | + (string) $l->t('Apr.'), |
|
139 | + (string) $l->t('May.'), |
|
140 | + (string) $l->t('Jun.'), |
|
141 | + (string) $l->t('Jul.'), |
|
142 | + (string) $l->t('Aug.'), |
|
143 | + (string) $l->t('Sep.'), |
|
144 | + (string) $l->t('Oct.'), |
|
145 | + (string) $l->t('Nov.'), |
|
146 | + (string) $l->t('Dec.') |
|
147 | 147 | ) |
148 | 148 | ), |
149 | - "firstDay" => json_encode($l->l('firstday', null)) , |
|
149 | + "firstDay" => json_encode($l->l('firstday', null)), |
|
150 | 150 | "oc_config" => json_encode( |
151 | 151 | array( |
152 | 152 | 'session_lifetime' => min(\OCP\Config::getSystemValue('session_lifetime', OC::$server->getIniWrapper()->getNumeric('session.gc_maxlifetime')), OC::$server->getIniWrapper()->getNumeric('session.gc_maxlifetime')), |
@@ -195,5 +195,5 @@ discard block |
||
195 | 195 | |
196 | 196 | // Echo it |
197 | 197 | foreach ($array as $setting => $value) { |
198 | - echo("var ". $setting ."=".$value.";\n"); |
|
198 | + echo("var ".$setting."=".$value.";\n"); |
|
199 | 199 | } |
@@ -167,12 +167,12 @@ discard block |
||
167 | 167 | public function n($text_singular, $text_plural, $count, $parameters = array()) { |
168 | 168 | $this->init(); |
169 | 169 | $identifier = "_${text_singular}_::_${text_plural}_"; |
170 | - if( array_key_exists($identifier, $this->translations)) { |
|
171 | - return new OC_L10N_String( $this, $identifier, $parameters, $count ); |
|
172 | - }else{ |
|
173 | - if($count === 1) { |
|
170 | + if (array_key_exists($identifier, $this->translations)) { |
|
171 | + return new OC_L10N_String($this, $identifier, $parameters, $count); |
|
172 | + } else { |
|
173 | + if ($count === 1) { |
|
174 | 174 | return new OC_L10N_String($this, $text_singular, $parameters, $count); |
175 | - }else{ |
|
175 | + } else { |
|
176 | 176 | return new OC_L10N_String($this, $text_plural, $parameters, $count); |
177 | 177 | } |
178 | 178 | } |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | |
236 | 236 | $this->init(); |
237 | 237 | $value = new DateTime(); |
238 | - if($data instanceof DateTime) { |
|
238 | + if ($data instanceof DateTime) { |
|
239 | 239 | $value = $data; |
240 | - } elseif(is_string($data) && !is_numeric($data)) { |
|
240 | + } elseif (is_string($data) && !is_numeric($data)) { |
|
241 | 241 | $data = strtotime($data); |
242 | 242 | $value->setTimestamp($data); |
243 | 243 | } else { |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | |
250 | 250 | $options = array_merge(array('width' => 'long'), $options); |
251 | 251 | $width = $options['width']; |
252 | - switch($type) { |
|
252 | + switch ($type) { |
|
253 | 253 | case 'date': |
254 | 254 | return Punic\Calendar::formatDate($value, $width, $locale); |
255 | 255 | case 'datetime': |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * @return array an array of available languages |
328 | 328 | * @deprecated 9.0.0 Use \OC::$server->getL10NFactory()->findAvailableLanguages() instead |
329 | 329 | */ |
330 | - public static function findAvailableLanguages($app=null) { |
|
330 | + public static function findAvailableLanguages($app = null) { |
|
331 | 331 | return \OC::$server->getL10NFactory()->findAvailableLanguages($app); |
332 | 332 | } |
333 | 333 |
@@ -1,17 +1,17 @@ discard block |
||
1 | -<table id="userlist" class="hascontrols grid" data-groups="<?php p($_['allGroups']);?>"> |
|
1 | +<table id="userlist" class="hascontrols grid" data-groups="<?php p($_['allGroups']); ?>"> |
|
2 | 2 | <thead> |
3 | 3 | <tr> |
4 | 4 | <?php if ($_['enableAvatars']): ?> |
5 | 5 | <th id="headerAvatar" scope="col"></th> |
6 | 6 | <?php endif; ?> |
7 | 7 | <th id="headerName" scope="col"><?php p($l->t('Username'))?></th> |
8 | - <th id="headerDisplayName" scope="col"><?php p($l->t( 'Full Name' )); ?></th> |
|
9 | - <th id="headerPassword" scope="col"><?php p($l->t( 'Password' )); ?></th> |
|
10 | - <th class="mailAddress" scope="col"><?php p($l->t( 'Email' )); ?></th> |
|
11 | - <th id="headerGroups" scope="col"><?php p($l->t( 'Groups' )); ?></th> |
|
12 | - <?php if(is_array($_['subadmins']) || $_['subadmins']): ?> |
|
8 | + <th id="headerDisplayName" scope="col"><?php p($l->t('Full Name')); ?></th> |
|
9 | + <th id="headerPassword" scope="col"><?php p($l->t('Password')); ?></th> |
|
10 | + <th class="mailAddress" scope="col"><?php p($l->t('Email')); ?></th> |
|
11 | + <th id="headerGroups" scope="col"><?php p($l->t('Groups')); ?></th> |
|
12 | + <?php if (is_array($_['subadmins']) || $_['subadmins']): ?> |
|
13 | 13 | <th id="headerSubAdmins" scope="col"><?php p($l->t('Group Admin for')); ?></th> |
14 | - <?php endif;?> |
|
14 | + <?php endif; ?> |
|
15 | 15 | <th id="headerQuota" scope="col"><?php p($l->t('Quota')); ?></th> |
16 | 16 | <th class="storageLocation" scope="col"><?php p($l->t('Storage Location')); ?></th> |
17 | 17 | <th class="userBackend" scope="col"><?php p($l->t('User Backend')); ?></th> |
@@ -41,26 +41,26 @@ discard block |
||
41 | 41 | <td class="groups"><div class="groupsListContainer multiselect button" |
42 | 42 | ><span class="title groupsList"></span><span class="icon-triangle-s"></span></div> |
43 | 43 | </td> |
44 | - <?php if(is_array($_['subadmins']) || $_['subadmins']): ?> |
|
44 | + <?php if (is_array($_['subadmins']) || $_['subadmins']): ?> |
|
45 | 45 | <td class="subadmins"><div class="groupsListContainer multiselect button" |
46 | 46 | ><span class="title groupsList"></span><span class="icon-triangle-s"></span></div> |
47 | 47 | </td> |
48 | - <?php endif;?> |
|
48 | + <?php endif; ?> |
|
49 | 49 | <td class="quota"> |
50 | 50 | <select class="quota-user" data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>"> |
51 | 51 | <option value='default'> |
52 | - <?php p($l->t('Default'));?> |
|
52 | + <?php p($l->t('Default')); ?> |
|
53 | 53 | </option> |
54 | 54 | <option value='none'> |
55 | - <?php p($l->t('Unlimited'));?> |
|
55 | + <?php p($l->t('Unlimited')); ?> |
|
56 | 56 | </option> |
57 | - <?php foreach($_['quota_preset'] as $preset):?> |
|
58 | - <option value='<?php p($preset);?>'> |
|
59 | - <?php p($preset);?> |
|
57 | + <?php foreach ($_['quota_preset'] as $preset):?> |
|
58 | + <option value='<?php p($preset); ?>'> |
|
59 | + <?php p($preset); ?> |
|
60 | 60 | </option> |
61 | - <?php endforeach;?> |
|
61 | + <?php endforeach; ?> |
|
62 | 62 | <option value='other' data-new> |
63 | - <?php p($l->t('Other'));?> ... |
|
63 | + <?php p($l->t('Other')); ?> ... |
|
64 | 64 | </option> |
65 | 65 | </select> |
66 | 66 | </td> |