Added urlField and disabled persistent mysql connection by default
This commit is contained in:
parent
e0e2b5a472
commit
3054f272da
2 changed files with 32 additions and 1 deletions
30
src/CoreFields/UrlField.php
Normal file
30
src/CoreFields/UrlField.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace PhangoApp\PhaModels\CoreFields;
|
||||
|
||||
use PhangoApp\PhaModels\CoreFields\CharField;
|
||||
use PhangoApp\PhaUtils\Utils;
|
||||
|
||||
class UrlField extends CharField {
|
||||
|
||||
public function check($value)
|
||||
{
|
||||
|
||||
//Delete Javascript tags and simple quotes.
|
||||
|
||||
if(filter_var($value, FILTER_VALIDATE_URL))
|
||||
{
|
||||
return Utils::form_text($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -13,7 +13,8 @@ class SQLClass {
|
|||
|
||||
static public $debug=true;
|
||||
|
||||
static public $persistent='p:';
|
||||
//static public $persistent='p:';
|
||||
static public $persistent='';
|
||||
|
||||
static public function print_sql_fail($sql_fail, $server_data='default')
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue