-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
78 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
parameters: | ||
bootstrapFiles: | ||
- src/constants.php | ||
|
||
ignoreErrors: | ||
- '(Call to an undefined static method F3::([sg]et|error|reroute)\(\))' | ||
- vendor/simplepie/simplepie/library/SimplePie.php | ||
- vendor/bin/.phpunit/phpunit/vendor/autoload.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
* @license GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html) | ||
* @author Harald Lapp <[email protected]> | ||
* @author Tobias Zeising <[email protected]> | ||
* | ||
* @mixin ItemsInterface | ||
*/ | ||
class Items { | ||
/** @var ItemsInterface Instance of backend specific items class */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ | |
* @author Harald Lapp <[email protected]> | ||
* @author Daniel Seither <[email protected]> | ||
* @author Tobias Zeising <[email protected]> | ||
* | ||
* @mixin SourcesInterface | ||
*/ | ||
class Sources { | ||
/** @var SourcesInterface Instance of backend specific sources class */ | ||
|
@@ -138,15 +140,15 @@ public function validate($title, $spout, array $params) { | |
} | ||
|
||
foreach ($validation as $validate) { | ||
if ($validate === 'alpha' && !preg_match("[A-Za-Z._\b]+", $value)) { | ||
if ($validate === 'alpha' && !preg_match("([A-Za-z._\b]+)", $value)) { | ||
$result[$id] = 'only alphabetic characters allowed for ' . $spout->params[$id]['title']; | ||
} elseif ($validate === 'email' && !preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $value)) { | ||
} elseif ($validate === 'email' && !preg_match('(^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$)', $value)) { | ||
$result[$id] = $spout->params[$id]['title'] . ' is not a valid email address'; | ||
} elseif ($validate === 'numeric' && !is_numeric($value)) { | ||
$result[$id] = 'only numeric values allowed for ' . $spout->params[$id]['title']; | ||
} elseif ($validate === 'int' && (int) $value != $value) { | ||
$result[$id] = 'only integer values allowed for ' . $spout->params[$id]['title']; | ||
} elseif ($validate === 'alnum' && !preg_match("[A-Za-Z0-9._\b]+", $value)) { | ||
} elseif ($validate === 'alnum' && !preg_match("([A-Za-z0-9._\b]+)", $value)) { | ||
$result[$id] = 'only alphanumeric values allowed for ' . $spout->params[$id]['title']; | ||
} elseif ($validate === 'notempty' && strlen(trim($value)) === 0) { | ||
$result[$id] = 'empty value for ' . $spout->params[$id]['title'] . ' not allowed'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
* @copyright Copyright (c) Tobias Zeising (http://www.aditu.de) | ||
* @license GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html) | ||
* @author Tobias Zeising <[email protected]> | ||
* | ||
* @mixin TagsInterface | ||
*/ | ||
class Tags { | ||
/** @var TagsInterface Instance of backend specific sources class */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters