summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-11-13 13:26:45 +0100
committerchris <chris@jalakai.co.uk>2006-11-13 13:26:45 +0100
commit3fc667cfbc05c58679586aeccdb47438798a8e15 (patch)
treed09cf45b0d69f6295183c9d0200b1d99afa733b4
parent579b0f7e8d80287b11fd441dfa68d15e9d4bb74c (diff)
downloadrpg-3fc667cfbc05c58679586aeccdb47438798a8e15.tar.gz
rpg-3fc667cfbc05c58679586aeccdb47438798a8e15.tar.bz2
fixes for stricter php5 typing (bug#978)
darcs-hash:20061113122645-9b6ab-e5f5be2e88eea7eb00643e6a5210086f46191c30.gz
-rw-r--r--inc/indexer.php16
-rw-r--r--lib/exe/indexer.php2
2 files changed, 10 insertions, 8 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index c90f2b179..f7bc4a7c4 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -96,13 +96,15 @@ function idx_getPageWords($page){
if ($conf['deaccent']) {
$links = p_get_metadata($page,'relation references');
- $tmp = join(' ',array_keys($links)); // make a single string
- $tmp = strtr($tmp, ':', ' '); // replace namespace separator with a space
- $link_tokens = array_unique(explode(' ', $tmp)); // break into tokens
-
- foreach ($link_tokens as $link_token) {
- if (isset($tokens[$link_token])) continue;
- $tokens[$link_token] = 1;
+ if (!empty($links)) {
+ $tmp = join(' ',array_keys($links)); // make a single string
+ $tmp = strtr($tmp, ':', ' '); // replace namespace separator with a space
+ $link_tokens = array_unique(explode(' ', $tmp)); // break into tokens
+
+ foreach ($link_tokens as $link_token) {
+ if (isset($tokens[$link_token])) continue;
+ $tokens[$link_token] = 1;
+ }
}
}
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 12177406f..a84d99a84 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -198,7 +198,7 @@ function metaUpdate(){
0,true);
$meta = array();
- if(count($info)){
+ if(!empty($info)){
$meta['date']['created'] = $info[0][1];
foreach($info as $item){
if($item[4] != '*'){