Changeset 43d08a5


Ignore:
Timestamp:
01/21/08 16:05:32 (9 years ago)
Author:
benoitg <benoitg@…>
Branches:
('master', '490da607341fc912953151a06bff77650ca214bb')('vitrine', '64aced58f2abea1ed48aa3134c125a714fe507cf')
Children:
8199aacf3ff1127bbbf14a1215e5837c20a22bd2
Parents:
146c3058a3543ce19692ee374735efd00c60a0f0
git-author:
benoitg <benoitg@9a151f2f-a8df-0310-a5c5-9fb547312938>2008-01-21 21:05:32+00:00
git-committer:
benoitg <benoitg@9a151f2f-a8df-0310-a5c5-9fb547312938>2008-01-21 21:05:32+00:00
Message:
  • Make DC export more resistant to URLs with parameters.

git-svn-id: http://projects.coeus.ca/svn/eureka@491 9a151f2f-a8df-0310-a5c5-9fb547312938

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r7a900cd r43d08a5  
     1# $Id: $ 
     22008-01-21: Benoit Grégoire  <bock@step.polymtl.ca> 
     3        * Make DC export more resistant to URLs with parameters. 
     4         
    152008-01-18: Benoit Grégoire  <bock@step.polymtl.ca> 
    26        * Add support for new search modes (and (current default), or, and exact_string) 
  • trunk/php/classes/Lom.php

    reb23ca4 r43d08a5  
    13411341        self::getcachedXML($this->getId(), FORMAT_OAI_DC, false, null, Session::getObject()->getPrefLocale()->getId(), $tempDocument, $dummy, false); 
    13421342 
    1343          
     1343 
    13441344        $childrens = $tempDocument->firstChild->childNodes; 
    13451345        foreach ($childrens as $child){ 
     
    13961396        $urls = $relationnn->getArray(); 
    13971397        foreach ($urls as $url) { 
    1398             $url_node = $document->createElementNS(DUBLIN_CORE_NS, "dc:identifier", $url->getString()); 
     1398            $url_node = $document->createElementNS(DUBLIN_CORE_NS, "dc:identifier"); 
     1399            $textnode = $document->createTextNode($url->getString()); 
     1400            $url_node = $url_node->appendChild($textnode); 
    13991401            $parent->appendChild($url_node); 
    14001402        } 
     
    27682770        $retval = null; 
    27692771        try { 
    2770             $this->mBd->ExecuterSqlResUnique("SELECT lom_identifiers.lom_identifiers_id FROM lom_identifiers JOIN lom_3_1_has_lom_identifiers ON (lom_identifiers.lom_identifiers_id=lom_3_1_has_lom_identifiers.lom_identifiers_id) WHERE lom_id=" . $this->getId() . " AND lom_identifiers.catalog='URI' AND lom_identifiers.entry LIKE 'oai:%' ORDER BY lom_identifiers.lom_identifiers_id", $row, false); 
     2772            $this->mBd->ExecuterSqlResUnique("SELECT lom_identifiers.lom_identifiers_id FROM lom_identifiers JOIN lom_3_1_has_lom_identifiers ON (lom_identifiers.lom_identifiers_id=lom_3_1_has_lom_identifiers.lom_identifiers_id) WHERE lom_id=" . $this->getId() . " AND lom_identifiers.catalog='URI' AND lom_identifiers.entry LIKE 'oai:%' ORDER BY lom_identifiers.lom_identifiers_id LIMIT 1", $row, false); 
    27712773        } 
    27722774        catch (SqlNotUniqueResException $e) { 
  • trunk/php/classes/SearchEngine.php

    r05acfc3 r43d08a5  
    263263     */ 
    264264    static public function getThemeLimitBooleanOperators() { 
    265         return array(array('AND', _('AND')), array('OR', _('OR')),array('NOT', _('NOT'))); 
     265        return array(array('AND', 'AND'), array('OR', 'OR'),array('NOT', 'NOT')); 
    266266    } 
    267267 
     
    762762 
    763763        /* DEPRECATED */ 
    764         $last_theme = $session->getLastTheme(); 
     764        /*$last_theme = $session->getLastTheme(); 
    765765        $last_theme_id = $last_theme->getId(); 
    766766        $html .= "<tr><td>"._("search_limit_to_theme_id[]: DEPRECATED, will be removed very SOON!  Use the search_theme_limit_* parameters instead.  Two part parameter, the first is the the value identifier, the second the vocabulary identifier.  If both part are set, all learning objects must have the selected entry as one of it's classification, or as one of it's classification's parent.")."</td>\n"; 
    767767        $html .= "<td><input type=text size=80 name='search_limit_to_theme_id[]' value='{$last_theme_id[0]}'><br/><input type=text size=80 name='search_limit_to_theme_id[]' value='{$last_theme_id[1]}'></td></tr>\n"; 
    768  
     768*/ 
     769         
    769770        /* NEW */ 
    770771        $last_theme = $session->getLastTheme(); 
  • trunk/php/classes/Session.php

    rf9d5d7b r43d08a5  
    371371                // Test it against current PHP locale 
    372372                if (substr($current_locale, 0, 2) != $lang_only_locale_id) { 
    373                     echo sprintf("Warning in /classes/Locale.php setCurentLocale: Unable to setlocale() to %s: %s.  I tried %s, %s, %s, %s, and got return value: %s, current locale is: %s", $q, $locale_id, $candidate_locale_array[0], $candidate_locale_array[1], $candidate_locale_array[2], $candidate_locale_array[3], $current_locale, setlocale(LC_ALL, 0)) . "<br/>"; 
     373                    echo sprintf("Warning in /classes/Session.php setPrefLocale: Unable to setlocale() to %s: %s.  I tried %s, %s, %s, %s, and got return value: %s, current locale is: %s", $q, $locale_id, $candidate_locale_array[0], $candidate_locale_array[1], $candidate_locale_array[2], $candidate_locale_array[3], $current_locale, setlocale(LC_ALL, 0)) . "<br/>"; 
    374374                    $retval = false; 
    375375                } 
Note: See TracChangeset for help on using the changeset viewer.