@@ -21,11 +21,11 @@ |
||
21 | 21 | $path = str_replace("\\", DIRECTORY_SEPARATOR, $class); |
22 | 22 | |
23 | 23 | // filepath |
24 | - $abs_path = SOURCE_DIR . DIRECTORY_SEPARATOR . $path . ".php"; |
|
24 | + $abs_path = SOURCE_DIR.DIRECTORY_SEPARATOR.$path.".php"; |
|
25 | 25 | if (!file_exists($abs_path)) { |
26 | - pre('→ ' . $class); |
|
27 | - pre('→ ' . $path); |
|
28 | - pre('→ ' . $abs_path); |
|
26 | + pre('→ '.$class); |
|
27 | + pre('→ '.$path); |
|
28 | + pre('→ '.$abs_path); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | // require the file |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | unset($_SERVER["PHP_AUTH_USER"]); |
39 | 39 | unset($_SERVER["PHP_AUTH_PW"]); |
40 | 40 | header_remove("Authorization"); |
41 | - } else { |
|
41 | + }else { |
|
42 | 42 | header('Authorization:'); |
43 | 43 | } |
44 | 44 | } |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | Logger::log('Adding debug headers to render response'); |
67 | 67 | $vars["__DEBUG__"]["includes"] = get_included_files(); |
68 | 68 | $vars["__DEBUG__"]["trace"] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
69 | - header('X-PSFS-DEBUG-TS: ' . Dispatcher::getInstance()->getTs() . ' s'); |
|
70 | - header('X-PSFS-DEBUG-MEM: ' . Dispatcher::getInstance()->getMem('MBytes') . ' MBytes'); |
|
71 | - header('X-PSFS-DEBUG-FILES: ' . count(get_included_files()) . ' files opened'); |
|
69 | + header('X-PSFS-DEBUG-TS: '.Dispatcher::getInstance()->getTs().' s'); |
|
70 | + header('X-PSFS-DEBUG-MEM: '.Dispatcher::getInstance()->getMem('MBytes').' MBytes'); |
|
71 | + header('X-PSFS-DEBUG-FILES: '.count(get_included_files()).' files opened'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return $vars; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | Logger::log('Configuration saved successful'); |
64 | 64 | Security::getInstance()->setFlash("callback_message", _("Usuario agregado correctamente")); |
65 | 65 | Security::getInstance()->setFlash("callback_route", Router::getInstance()->getRoute("admin", true)); |
66 | - } else { |
|
66 | + }else { |
|
67 | 67 | throw new ConfigException(_('Error al guardar los administradores, prueba a cambiar los permisos')); |
68 | 68 | } |
69 | 69 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | if ($this->isAdmin()) { |
101 | 101 | return $this->redirect('admin'); |
102 | - } else { |
|
102 | + }else { |
|
103 | 103 | return Admin::staticAdminLogon($route); |
104 | 104 | } |
105 | 105 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $cookies = array( |
132 | 132 | array( |
133 | 133 | "name" => Security::getInstance()->getHash(), |
134 | - "value" => base64_encode($form->getFieldValue("user") . ":" . $form->getFieldValue("pass")), |
|
134 | + "value" => base64_encode($form->getFieldValue("user").":".$form->getFieldValue("pass")), |
|
135 | 135 | "expire" => time() + 3600, |
136 | 136 | "http" => true, |
137 | 137 | ) |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'status_message' => _("Acceso permitido... redirigiendo!!"), |
143 | 143 | 'delay' => 1, |
144 | 144 | ); |
145 | - } else { |
|
145 | + }else { |
|
146 | 146 | $form->setError("user", _("El usuario no tiene acceso a la web")); |
147 | 147 | } |
148 | 148 | } |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public static function staticAdminLogon($route = null) |
50 | 50 | { |
51 | - if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
|
51 | + if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) { |
|
52 | 52 | if ('login' !== Config::getInstance()->get('admin_login')) { |
53 | 53 | return AdminServices::getInstance()->setAdminHeaders(); |
54 | - } else { |
|
54 | + }else { |
|
55 | 55 | $form = new LoginForm(); |
56 | 56 | $form->setData(array("route" => $route)); |
57 | 57 | $form->build(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | 'form' => $form, |
62 | 62 | )); |
63 | 63 | } |
64 | - } else { |
|
64 | + }else { |
|
65 | 65 | return UserController::showAdminManager(); |
66 | 66 | } |
67 | 67 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | )) |
38 | 38 | ->addButton('submit', _("Acceder como {{username}}")) |
39 | 39 | ->addButton("cancel", _("Cancelar"), "button", array( |
40 | - "onclick" => "javacript:location.href = \"" . Router::getInstance()->getRoute('') . "\";", |
|
40 | + "onclick" => "javacript:location.href = \"".Router::getInstance()->getRoute('')."\";", |
|
41 | 41 | "class" => "btn-link", |
42 | 42 | )); |
43 | 43 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | if (preg_match('/^asc$/i', $direction)) { |
64 | 64 | return Order::ASC; |
65 | - } else { |
|
65 | + }else { |
|
66 | 66 | return Order::DESC; |
67 | 67 | } |
68 | 68 | } |
@@ -26,13 +26,13 @@ |
||
26 | 26 | { |
27 | 27 | $namespace = explode('\\', $this->getModelTableMap()); |
28 | 28 | $module = strtolower($namespace[0]); |
29 | - $secret = Config::getInstance()->get($module . '.api.secret'); |
|
29 | + $secret = Config::getInstance()->get($module.'.api.secret'); |
|
30 | 30 | if (NULL === $secret) { |
31 | 31 | $secret = Config::getInstance()->get("api.secret"); |
32 | 32 | } |
33 | 33 | if (NULL === $secret) { |
34 | 34 | $auth = TRUE; |
35 | - } else { |
|
35 | + }else { |
|
36 | 36 | $token = Request::getInstance()->getHeader('X-API-SEC-TOKEN'); |
37 | 37 | if (array_key_exists('API_TOKEN', $this->query)) { |
38 | 38 | $token = $this->query['API_TOKEN']; |
@@ -30,16 +30,16 @@ |
||
30 | 30 | $scripts = $this->getNode("scripts"); |
31 | 31 | |
32 | 32 | //Creamos el parser |
33 | - $compiler->addDebugInfo($scripts)->write('$parser = new \\PSFS\\base\\extension\\AssetsParser(\'' . $this->type . '\')') |
|
33 | + $compiler->addDebugInfo($scripts)->write('$parser = new \\PSFS\\base\\extension\\AssetsParser(\''.$this->type.'\')') |
|
34 | 34 | ->raw(";\n"); |
35 | 35 | |
36 | 36 | //Asociamos el hash |
37 | - $compiler->write('$parser->setHash(\'' . $this->hash . '\')') |
|
37 | + $compiler->write('$parser->setHash(\''.$this->hash.'\')') |
|
38 | 38 | ->raw(";\n"); |
39 | 39 | |
40 | 40 | //Asociamos los ficheros |
41 | 41 | foreach ($scripts->getAttribute("value") as $value) { |
42 | - $compiler->write('$parser->addFile(\'' . $value . '\')')->raw(";\n"); |
|
42 | + $compiler->write('$parser->addFile(\''.$value.'\')')->raw(";\n"); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | //Procesamos los ficheros |
@@ -139,7 +139,7 @@ |
||
139 | 139 | $tmp = array(); |
140 | 140 | if (NULL === $node) { |
141 | 141 | $node = $value; |
142 | - } else { |
|
142 | + }else { |
|
143 | 143 | $tmp = $this->getTmpAttribute($node); |
144 | 144 | } |
145 | 145 | $tmp[] = $value->getAttribute("value"); |