diff options
Diffstat (limited to 'framework/I18N/core')
-rw-r--r-- | framework/I18N/core/DateFormat.php | 4 | ||||
-rw-r--r-- | framework/I18N/core/MessageCache.php | 6 | ||||
-rw-r--r-- | framework/I18N/core/MessageSource_MySQL.php | 8 | ||||
-rw-r--r-- | framework/I18N/core/MessageSource_SQLite.php | 10 | ||||
-rw-r--r-- | framework/I18N/core/MessageSource_XLIFF.php | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/framework/I18N/core/DateFormat.php b/framework/I18N/core/DateFormat.php index 173c119f..7724a480 100644 --- a/framework/I18N/core/DateFormat.php +++ b/framework/I18N/core/DateFormat.php @@ -471,7 +471,7 @@ class DateFormat throw new Exception('The pattern for AM/PM marker is "a".');
$hour = $date['hours'];
- $ampm = intval($hour/12);
+ $ampm = (int)($hour/12);
return $this->formatInfo->AMPMMarkers[$ampm];
}
@@ -649,4 +649,4 @@ class DateFormat }
-?> +?>
diff --git a/framework/I18N/core/MessageCache.php b/framework/I18N/core/MessageCache.php index 7d15e8c6..d4f58f1d 100644 --- a/framework/I18N/core/MessageCache.php +++ b/framework/I18N/core/MessageCache.php @@ -74,7 +74,7 @@ class MessageCache */
public function setLifeTime($time)
{
- $this->lifetime = intval($time);
+ $this->lifetime = (int)$time;
}
/**
@@ -119,7 +119,7 @@ class MessageCache return false;
- $lastmodified = intval($lastmodified);
+ $lastmodified = (int)$lastmodified;
if($lastmodified <= 0 || $lastmodified > filemtime($cache))
return false;
@@ -168,4 +168,4 @@ class MessageCache }
-?> +?>
diff --git a/framework/I18N/core/MessageSource_MySQL.php b/framework/I18N/core/MessageSource_MySQL.php index de7bea2b..317d53e2 100644 --- a/framework/I18N/core/MessageSource_MySQL.php +++ b/framework/I18N/core/MessageSource_MySQL.php @@ -186,7 +186,7 @@ class MessageSource_MySQL extends MessageSource "SELECT date_modified FROM catalogue WHERE name = '{$source}'",
$this->db);
- $result = $rs ? intval(mysql_result($rs,0)) : 0;
+ $result = $rs ? (int)mysql_result($rs,0) : 0;
return $result;
}
@@ -256,7 +256,7 @@ class MessageSource_MySQL extends MessageSource if(mysql_num_rows($rs) != 1)
return false;
- $cat_id = intval(mysql_result($rs,0));
+ $cat_id = (int)mysql_result($rs,0);
//first get the catalogue ID
$rs = mysql_query(
@@ -264,7 +264,7 @@ class MessageSource_MySQL extends MessageSource FROM trans_unit
WHERE cat_id = {$cat_id}", $this->db);
- $count = intval(mysql_result($rs,0));
+ $count = (int)mysql_result($rs,0);
return array($cat_id, $variant, $count);
}
@@ -415,4 +415,4 @@ class MessageSource_MySQL extends MessageSource }
-?> +?>
diff --git a/framework/I18N/core/MessageSource_SQLite.php b/framework/I18N/core/MessageSource_SQLite.php index 4448f801..22518bba 100644 --- a/framework/I18N/core/MessageSource_SQLite.php +++ b/framework/I18N/core/MessageSource_SQLite.php @@ -109,7 +109,7 @@ class MessageSource_SQLite extends MessageSource "SELECT date_modified FROM catalogue WHERE name = '{$source}'",
$db);
- $result = $rs ? intval(sqlite_fetch_single($rs)) : 0;
+ $result = $rs ? (int)sqlite_fetch_single($rs) : 0;
sqlite_close($db);
@@ -129,7 +129,7 @@ class MessageSource_SQLite extends MessageSource $rs = sqlite_query(
"SELECT COUNT(*) FROM catalogue WHERE name = '{$variant}'",
$db);
- $result = $rs && intval(sqlite_fetch_single($rs));
+ $result = $rs && (int)sqlite_fetch_single($rs);
sqlite_close($db);
return $result;
@@ -181,7 +181,7 @@ class MessageSource_SQLite extends MessageSource if(sqlite_num_rows($rs) != 1)
return false;
- $cat_id = intval(sqlite_fetch_single($rs));
+ $cat_id = (int)sqlite_fetch_single($rs);
//first get the catalogue ID
$rs = sqlite_query(
@@ -189,7 +189,7 @@ class MessageSource_SQLite extends MessageSource FROM trans_unit
WHERE cat_id = {$cat_id}", $db);
- $count = intval(sqlite_fetch_single($rs));
+ $count = (int)sqlite_fetch_single($rs);
sqlite_close($db);
@@ -351,4 +351,4 @@ class MessageSource_SQLite extends MessageSource }
}
-?> +?>
diff --git a/framework/I18N/core/MessageSource_XLIFF.php b/framework/I18N/core/MessageSource_XLIFF.php index 4a7db93b..f962e9a1 100644 --- a/framework/I18N/core/MessageSource_XLIFF.php +++ b/framework/I18N/core/MessageSource_XLIFF.php @@ -296,7 +296,7 @@ class MessageSource_XLIFF extends MessageSource $lastNodes = $xpath->query('//trans-unit[last()]');
if(($last=$lastNodes->item(0))!==null)
- $count = intval($last->getAttribute('id'));
+ $count = (int)$last->getAttribute('id');
else
$count = 0;
@@ -520,4 +520,4 @@ EOD; }
}
-?> +?>
|