Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
7f7aa898
Commit
7f7aa898
authored
Aug 22, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ip and blank validators updated
parent
f554dac5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
18 deletions
+3
-18
Ip.php
Doctrine/Validator/Ip.php
+1
-9
Notblank.php
Doctrine/Validator/Notblank.php
+1
-8
documentation.php
manual/documentation.php
+1
-1
No files found.
Doctrine/Validator/Ip.php
View file @
7f7aa898
...
...
@@ -8,15 +8,7 @@ class Doctrine_Validator_Ip {
* @return boolean
*/
public
function
validate
(
Doctrine_Record
$record
,
$key
,
$value
,
$args
)
{
$e
=
explode
(
"."
,
$request
);
if
(
count
(
$e
)
!=
4
)
return
false
;
foreach
(
$e
as
$k
=>
$v
)
:
if
(
!
is_numeric
(
$v
))
return
false
;
$v
=
(
int
)
$v
;
if
(
$v
<
0
||
$v
>
255
)
return
false
;
endforeach
;
return
true
;
return
(
bool
)
ip2long
(
str_replace
(
"
\0
"
,
''
,
$value
));
}
}
?>
Doctrine/Validator/Notblank.php
View file @
7f7aa898
...
...
@@ -8,14 +8,7 @@ class Doctrine_Validator_Notblank {
* @return boolean
*/
public
function
validate
(
Doctrine_Record
$record
,
$key
,
$value
,
$args
)
{
$string
=
str_replace
(
"
\n
"
,
""
,
$value
);
$string
=
str_replace
(
"
\r
"
,
""
,
$string
);
$string
=
str_replace
(
"
\t
"
,
""
,
$string
);
$string
=
str_replace
(
"\s"
,
""
,
$string
);
$string
=
str_replace
(
" "
,
""
,
$string
);
if
(
$string
==
""
)
return
false
;
return
true
;
return
(
trim
(
$var
)
!=
""
);
}
}
?>
manual/documentation.php
View file @
7f7aa898
...
...
@@ -177,7 +177,7 @@ $menu = array("Getting started" =>
"Overview"
,
"List of exceptions"
)
),
),
"Mapping object relations"
=>
array
(
"Introduction"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment