diff --git a/dlf/common/class.tx_dlf_document.php b/dlf/common/class.tx_dlf_document.php index e9b8f4bd..88f49f28 100644 --- a/dlf/common/class.tx_dlf_document.php +++ b/dlf/common/class.tx_dlf_document.php @@ -916,7 +916,7 @@ class tx_dlf_document { '' ); - for ($i = 0; $i < $GLOBALS['TYPO3_DB']->sql_num_rows($result); $i++) { + for ($i = 0, $j = $GLOBALS['TYPO3_DB']->sql_num_rows($result); $i < $j; $i++) { $resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result); @@ -981,7 +981,7 @@ class tx_dlf_document { '' ); - for ($i = 0; $i < $GLOBALS['TYPO3_DB']->sql_num_rows($result); $i++) { + for ($i = 0, $j = $GLOBALS['TYPO3_DB']->sql_num_rows($result); $i < $j; $i++) { list ($collections[]) = $GLOBALS['TYPO3_DB']->sql_fetch_row($result); diff --git a/dlf/common/class.tx_dlf_helper.php b/dlf/common/class.tx_dlf_helper.php index e45d1185..6040bf17 100644 --- a/dlf/common/class.tx_dlf_helper.php +++ b/dlf/common/class.tx_dlf_helper.php @@ -93,7 +93,7 @@ class tx_dlf_helper { $checksum = 0; - for ($i = 0; $i < strlen($digits); $i++) { + for ($i = 0, $j = strlen($digits); $i < $j; $i++) { $checksum += (9 - $i) * intval(substr($digits, $i, 1)); @@ -398,7 +398,7 @@ class tx_dlf_helper { $digits = ''; - for ($i = 0; $i < strlen($urn); $i++) { + for ($i = 0, $j = strlen($urn); $i < $j; $i++) { $digits .= $concordance[substr($urn, $i, 1)]; @@ -406,7 +406,7 @@ class tx_dlf_helper { $checksum = 0; - for ($i = 0; $i < strlen($digits); $i++) { + for ($i = 0, $j = strlen($digits); $i < $j; $i++) { $checksum += ($i + 1) * intval(substr($digits, $i, 1)); @@ -603,7 +603,7 @@ class tx_dlf_helper { $_schemas = explode(' ', (string) $_schemaLocation->attributes('http://www.w3.org/2001/XMLSchema-instance')->schemaLocation); - for ($i = 1; $i <= count($_schemas); $i++) { + for ($i = 1, $j = count($_schemas); $i <= $j; $i++) { if ($_schemas[$i] == 'http://www.loc.gov/METS/') { diff --git a/dlf/common/class.tx_dlf_mods.php b/dlf/common/class.tx_dlf_mods.php index 302e78bd..aaa3a325 100644 --- a/dlf/common/class.tx_dlf_mods.php +++ b/dlf/common/class.tx_dlf_mods.php @@ -78,7 +78,7 @@ class tx_dlf_mods implements tx_dlf_format { if ($authors) { - for ($i = 0; $i < count($authors); $i++) { + for ($i = 0, $j = count($authors); $i < $j; $i++) { $authors[$i]->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); diff --git a/dlf/plugins/listview/class.tx_dlf_listview.php b/dlf/plugins/listview/class.tx_dlf_listview.php index a81f9399..f5cb502b 100644 --- a/dlf/plugins/listview/class.tx_dlf_listview.php +++ b/dlf/plugins/listview/class.tx_dlf_listview.php @@ -265,7 +265,7 @@ class tx_dlf_listview extends tx_dlf_plugin { $this->loadConfig(); - for ($i = $this->piVars['pointer'] * $this->conf['limit']; $i < ($this->piVars['pointer'] + 1) * $this->conf['limit']; $i++) { + for ($i = $this->piVars['pointer'] * $this->conf['limit'], $j = ($this->piVars['pointer'] + 1) * $this->conf['limit']; $i < $j; $i++) { if (empty($this->list->elements[$i])) { diff --git a/dlf/plugins/oai/class.tx_dlf_oai.php b/dlf/plugins/oai/class.tx_dlf_oai.php index b5ce2e87..309e6403 100644 --- a/dlf/plugins/oai/class.tx_dlf_oai.php +++ b/dlf/plugins/oai/class.tx_dlf_oai.php @@ -347,7 +347,7 @@ class tx_dlf_oai extends tx_dlf_plugin { $complete = FALSE; - for ($i = $resultSet->metadata['offset']; $i < intval($resultSet->metadata['offset'] + $this->conf['limit']); $i++) { + for ($i = $resultSet->metadata['offset'], $j = intval($resultSet->metadata['offset'] + $this->conf['limit']); $i < $j; $i++) { $markerArray = array ( '###RECORD_DELETED###' => '', @@ -793,7 +793,7 @@ class tx_dlf_oai extends tx_dlf_plugin { $complete = FALSE; - for ($i = 0; $i < intval($this->conf['limit']); $i++) { + for ($i = 0, $j = intval($this->conf['limit']); $i < $j; $i++) { $markerArray = array ( '###RECORD_DELETED###' => '', @@ -1181,7 +1181,7 @@ class tx_dlf_oai extends tx_dlf_plugin { $complete = FALSE; - for ($i = 0; $i < intval($this->conf['limit']); $i++) { + for ($i = 0, $j = intval($this->conf['limit']); $i < $j; $i++) { $markerArray = array ( '###RECORD_DELETED###' => '',