Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 83dcd5d

Browse files
author
Guillermo Cespedes
committed
minor changes
1 parent af33257 commit 83dcd5d

File tree

4 files changed

+12
-41
lines changed

4 files changed

+12
-41
lines changed

Particle/Apps/Router/default.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
<ignorepreg>/[^a-z0-9-]/</ignorepreg>
99
</rule>
1010
11+
<url request="/test">
12+
<controller>index</controller>
13+
<method>index</method>
14+
<argument name="NameArgs">
15+
<value>12345</value>
16+
</argument>
17+
</url>
18+
1119
<url request="/*" rule="alfanum" argumentname="rubro" jsonlist="rubros" wildcard="*">
1220
<controller>testing</controller>
1321
<method>index</method>

Particle/Apps/phpunit/phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<phpunit bootstrap="bootstrap.php"
22
colors="true"
3-
processIsolation="true"
3+
processIsolation="false"
44
verbose="false"
55
printerClass="Sempro\PHPUnitPrettyPrinter\PrettyPrinter">
66
<testsuites>

Particle/Core/Controller.php

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -181,39 +181,4 @@ final protected static function selfToUTF8($string)
181181

182182
return $string;
183183
}
184-
185-
final protected static function uploadFile($File, $FullPatch, $allowedExts = false, $allowedTypes = false)
186-
{
187-
if (!$allowedExts) {
188-
$allowedExts = array('jpg', 'jpeg', 'gif', 'png', 'zip');
189-
}
190-
191-
if (!$allowedTypes) {
192-
$allowedTypes = array('image/gif', 'image/jpeg', 'image/pjpeg');
193-
}
194-
195-
$extension = end(explode('.', $File['name']));
196-
// TODO: add $allowedTypes
197-
if (($File['size'] < 20000) && in_array($extension, $allowedExts)) {
198-
if ($File['error'] > 0) {
199-
echo 'Return Code: '.$File['error'].'<br />';
200-
} else {
201-
echo 'Upload: '.$File['name'].'<br />';
202-
echo 'Type: '.$File['type'].'<br />';
203-
echo 'Size: '.($File['size'] / 1024).' Kb<br />';
204-
echo 'Temp file: '.$File['tmp_name'].'<br />';
205-
206-
if (file_exists($FullPatch.$File['name'])) {
207-
echo $File['name'].' already exists. ';
208-
} else {
209-
move_uploaded_file($File['tmp_name'], $FullPatch.$File['name']);
210-
echo 'Stored in: '.$FullPatch.$File['name'];
211-
212-
return $FullPatch.$File['name'];
213-
}
214-
}
215-
} else {
216-
echo 'Error - Invalid File';
217-
}
218-
}
219184
}

Particle/Core/Debug.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
**/
1212
final class Debug
1313
{
14-
final public static function savelogfile($id, $location, $message, $filename = 'error.log')
14+
final public static function savelogfile($id, $location, $message, $filename = 'error')
1515
{
1616
//
1717
// id: Error ID
@@ -20,10 +20,8 @@ final public static function savelogfile($id, $location, $message, $filename = '
2020
// filename: Log file path
2121
//
2222
// Usage: Core\Debug::savelogfile(1, 'index.php:33', 'Mensaje de Error');
23-
//
24-
// TODO: ultimo parametro $filename sin utilizar
25-
//
26-
$filename = $_SERVER['DOCUMENT_ROOT'].'/error.log';
23+
24+
$filename = $_SERVER['DOCUMENT_ROOT'].DS.$filename.'.log';
2725

2826
$file = fopen($filename, 'a');
2927

0 commit comments

Comments
 (0)