From 8f1624c05431840e6a1bcdcea5ec4599cfa50172 Mon Sep 17 00:00:00 2001 From: ywarnier Date: Thu, 21 Apr 2011 14:25:16 -0500 Subject: [PATCH] Minor - remove notices --- main/metadata/doc/dcex.php | 15 +++++++-------- main/metadata/importmanifest.php | 4 ++-- main/metadata/md_phpdig.php | 2 +- main/metadata/phpdig/phpdig_functions.php | 8 ++++---- main/metadata/phpdig/search_function.php | 3 ++- 5 files changed, 16 insertions(+), 16 deletions(-) mode change 100644 => 100755 main/metadata/doc/dcex.php diff --git a/main/metadata/doc/dcex.php b/main/metadata/doc/dcex.php old mode 100644 new mode 100755 index a694c907b0..b440cdef80 --- a/main/metadata/doc/dcex.php +++ b/main/metadata/doc/dcex.php @@ -1,18 +1,17 @@ mds_get_dc_elements($mdObj))) +if (is_array($dcelems = $mdStore->mds_get_dc_elements($mdObj))) { echo '
', htmlspecialchars($dcelems['Identifier']), ': ', htmlspecialchars($dcelems['Description']), '
'; - +} // Store example: $langMdCopyright = 'Provided the source is acknowledged'; -$mdStore->mds_put_dc_elements($mdObj, array('Description'=>time())); -?> \ No newline at end of file +$mdStore->mds_put_dc_elements($mdObj, array('Description'=>time())); \ No newline at end of file diff --git a/main/metadata/importmanifest.php b/main/metadata/importmanifest.php index 6dbe3d820f..7d4c206305 100755 --- a/main/metadata/importmanifest.php +++ b/main/metadata/importmanifest.php @@ -106,7 +106,7 @@ $originalHdrInfo = $hdrInfo; function slurpmanifest() { - global $baseWorkDir, $workWith, $sdisub, $mfContents, $xht_doc; + global $baseWorkDir, $workWith, $sdisub, $mfContents, $xht_doc, $charset; $fmff = $baseWorkDir .'/'. $workWith . '/' . MFFNAME . $sdisub . MFFDEXT; if (file_exists($fmff)) { @@ -236,7 +236,7 @@ elseif ($smo == get_lang('Import')) function store_md_and_traverse_subitems($mfdocId, $level, $counter, $contextElem, $treeElem, $parentElem) { - global $_user, $xht_doc, $mdStore, $mdObj, $sdisub; + global $_user, $xht_doc, $mdStore, $mdObj, $sdisub, $charset; // $contextElem -> @identifier, metadata/lom // $treeElem -> title, items diff --git a/main/metadata/md_phpdig.php b/main/metadata/md_phpdig.php index 9cf9d4fe32..c5ab963f1b 100755 --- a/main/metadata/md_phpdig.php +++ b/main/metadata/md_phpdig.php @@ -157,7 +157,7 @@ function index_words($site_id, $path, $file, $first_words, $keywords) Database::query("INSERT INTO " . PHPDIG_DB_PREFIX . "engine (spider_id,key_id,weight) VALUES ($spider_id,$key_id,$w)"); } - + global $charset; echo '', htmlspecialchars($file, ENT_QUOTES, $charset), '(spider_id ', $spider_id, '):', count($keywords), ' kwds, ', $new , ' new', "\n"; diff --git a/main/metadata/phpdig/phpdig_functions.php b/main/metadata/phpdig/phpdig_functions.php index 37837127d4..800eb4e560 100755 --- a/main/metadata/phpdig/phpdig_functions.php +++ b/main/metadata/phpdig/phpdig_functions.php @@ -156,7 +156,7 @@ if ($ereg) { return $string; } else { - return $result; + return null; } } @@ -169,7 +169,7 @@ if (!isset($phpdigEncode[$encoding])) { } // exceptions if ($encoding == 'iso-8859-1') { - $chaine = str_replace('Æ','ae',str_replace('æ','ae',$chaine)); + $chaine = str_replace('�','ae',str_replace('�','ae',$chaine)); } return( strtr( $chaine,$phpdigEncode[$encoding]['str'],$phpdigEncode[$encoding]['tr']) ); } @@ -217,7 +217,7 @@ foreach($subststrings as $encoding => $subststring) { } //================================================= -//epure a string from all non alnum words (words can contain &__&ßðþ character) +//epure a string from all non alnum words (words can contain &__&��� character) function phpdigEpureText($text,$min_word_length=2,$encoding=PHPDIG_ENCODING) { global $phpdig_words_chars; @@ -225,7 +225,7 @@ $text = phpdigStripAccents(strtolower ($text)); //no-latin upper to lowercase - now islandic switch (PHPDIG_ENCODING) { case 'iso-8859-1': - $text = strtr( $text,'ÐÞ','ðþ'); + $text = strtr( $text,'��','��'); break; } diff --git a/main/metadata/phpdig/search_function.php b/main/metadata/phpdig/search_function.php index 777401bd26..e0ce08e86f 100755 --- a/main/metadata/phpdig/search_function.php +++ b/main/metadata/phpdig/search_function.php @@ -33,6 +33,7 @@ if (($refine != 0) && ($refine != 1)) { $refine = 0; } // $lim_start set in search_function.php file settype($limite,'integer'); if (($limite != 10) && ($limite != 30) && ($limite != 100)) { $limite = SEARCH_DEFAULT_LIMIT; } +$limit_start = 0; settype($limit_start,'integer'); if (isset($limit_start)) { $limit_start = $limite * floor($limit_start / $limite); } if (($browse != 0) && ($browse != 1)) { $browse = 0; } @@ -53,7 +54,7 @@ $timer = new phpdigTimer('html'); $timer->start('All'); // init variables -global $phpdig_words_chars; +global $phpdig_words_chars,$maxweight; settype($maxweight,'integer'); $ignore = ''; $ignore_common = '';