Skip to content

Commit 3810465

Browse files
committed
drop some PHP 5.* legacy stuff
1 parent ee8514d commit 3810465

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

db.class.php

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,7 @@ protected function paramsMapOptArrayTypes() {
701701
return array('b', 'c');
702702
}
703703

704-
/**
705-
* @internal has to be public for PHP 5.3 compatability
706-
*/
707-
public function sanitizeTS($ts) {
704+
protected function sanitizeTS($ts) {
708705
if (is_string($ts)) {
709706
return date('Y-m-d H:i:s', strtotime($ts));
710707
}
@@ -714,10 +711,7 @@ public function sanitizeTS($ts) {
714711
return '';
715712
}
716713

717-
/**
718-
* @internal has to be public for PHP 5.3 compatability
719-
*/
720-
public function sanitize($input) {
714+
protected function sanitize($input) {
721715
if (is_object($input)) {
722716
if ($input instanceof DateTime) {
723717
return new MeekroDBParsedQuery('?', array($input->format('Y-m-d H:i:s')));
@@ -733,10 +727,7 @@ public function sanitize($input) {
733727
return new MeekroDBParsedQuery('?', array($input));
734728
}
735729

736-
/**
737-
* @internal has to be public for PHP 5.3 compatability
738-
*/
739-
public function formatName($name, $can_join=false) {
730+
protected function formatName($name, $can_join=false) {
740731
if (is_array($name)) {
741732
if ($can_join) return implode('.', array_map(array($this, 'formatName'), $name));
742733
throw new MeekroDBException("Invalid column/table name");
@@ -745,11 +736,8 @@ public function formatName($name, $can_join=false) {
745736
if ($this->db_type() == 'pgsql') $char = '"';
746737
return $char . str_replace($char, $char . $char, $name) . $char;
747738
}
748-
749-
/**
750-
* @internal has to be public for PHP 5.3 compatability
751-
*/
752-
public function intval($var) {
739+
740+
protected function intval($var) {
753741
if (PHP_INT_SIZE == 8) return intval($var);
754742
return floor(doubleval($var));
755743
}

0 commit comments

Comments
 (0)