Changeset 752

Show
Ignore:
Timestamp:
09/12/05 15:02:57 (8 years ago)
Author:
benoitg
Message:

2005-09-12 Benoit Gr�goire <bock@…>

  • schema_validate.php: Fix a bug version 26. The conversion of the old account_origin as a parameter to the authenticator was wrong. To fix it manually if you already ran the script, you must quote the parameter in column network_authenticator_params in the networks table.
  • Network.php: Fix improper quoting of Authenticator arguments.
  • RssPressReview?.php: Make expansion of today's item optionnal.
Location:
trunk/wifidog-auth
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r751 r752  
     12005-09-12 Benoit Grégoire  <bock@step.polymtl.ca> 
     2        * schema_validate.php:  Fix a bug version 26.  The conversion of the old account_origin as a parameter  
     3        to the authenticator was wrong.  To fix it manually if you already ran the script, 
     4         you must quote the parameter in column network_authenticator_params in the networks table. 
     5        * RssPressReview.php:  Make expansion of today's item optionnal. 
     6 
    172005-09-11 Francois Proulx <francois.proulx@gmail.com> 
    28        * Fixed dependency check, found a workaround for the file_exists problem 
  • trunk/wifidog-auth/wifidog/classes/Network.php

    r748 r752  
    389389                        throw new Exception("Network::getAuthenticator():  Security error:  The parameters passed to the constructor of the authenticator are potentially unsafe"); 
    390390                } 
    391                 $objstring = 'return new '.$this->mRow['network_authenticator_class']."('".$this->mRow['network_authenticator_params']."');"; 
     391                $objstring = 'return new '.$this->mRow['network_authenticator_class']."(".$this->mRow['network_authenticator_params'].");"; 
    392392                return eval ($objstring); 
    393393        } 
  • trunk/wifidog-auth/wifidog/include/schema_validate.php

    r749 r752  
    580580                        $sql .= "  allow_custom_portal_redirect BOOLEAN NOT NULL DEFAULT FALSE\n"; 
    581581                        $sql .= ");\n"; 
    582                         $sql .= "INSERT INTO networks (network_id, network_authenticator_class, network_authenticator_params) SELECT  account_origin, COALESCE('AuthenticatorLocalUser') as network_authenticator_class, account_origin FROM users GROUP BY (account_origin) ORDER BY min(reg_date);\n"; 
     582                        $sql .= "INSERT INTO networks (network_id, network_authenticator_class, network_authenticator_params) SELECT  account_origin, COALESCE('AuthenticatorLocalUser') as network_authenticator_class, '\'' || account_origin || '\'' FROM users GROUP BY (account_origin) ORDER BY min(reg_date);\n"; 
    583583                        $sql .= "UPDATE networks SET is_default_network=TRUE WHERE network_id=(SELECT account_origin FROM users GROUP BY (account_origin) ORDER BY min(reg_date) LIMIT 1);\n"; 
    584584                        $sql .= "ALTER TABLE users ADD CONSTRAINT account_origin_fkey FOREIGN KEY (account_origin) REFERENCES networks (network_id) ON UPDATE CASCADE ON DELETE RESTRICT;\n"; 
  • trunk/wifidog-auth/wifidog/lib/RssPressReview/RssPressReview.php

    r717 r752  
    692692        @param $show_empty_sources Should we show the feed information even if no news item has be selected? 
    693693        */ 
    694         function get_rss_html($number_of_items_to_display = 20, $last_visit = null, $show_empty_sources = true) 
     694        function get_rss_html($number_of_items_to_display = 20, $last_visit = null, $show_empty_sources = true, $highlight_todays_news = true) 
    695695        { 
    696696                $html = ''; 
     
    750750                                                $feed_html .= "<li class='rpr_item'>\n"; 
    751751                                                $feed_html .= "<p class='rpr_item_title'>\n"; 
    752                                                 $item['rpr_is_today'] ? $switch_content = '-' : $switch_content = '+'; 
     752                                                $item['rpr_is_today']&&$highlight_todays_news ? $switch_content = '-' : $switch_content = '+'; 
    753753 
    754754                                                $feed_html .= "<a class='rpr_expand_switch' href='#dummy' onClick=\"toggleItemVisibility('$dhtml_id'); if(this.innerHTML=='+'){this.innerHTML='-';}else{this.innerHTML='+';}\">$switch_content</a> "; 
     
    766766                                                $feed_html .= "<div class='rpr_popup_outer_div'>\n"; 
    767767                                                $class = 'rpr_popup_inner_div'; 
    768                                                 $item['rpr_is_today'] ? $class = 'rpr_popup_inner_div_expanded' : $class = 'rpr_popup_inner_div'; 
     768                                                $item['rpr_is_today']&&$highlight_todays_news ? $class = 'rpr_popup_inner_div_expanded' : $class = 'rpr_popup_inner_div'; 
    769769                                                $style = ''; 
    770                                                 //$item['rpr_is_today'] ? $style = 'z-index: 1000;' : $style = ''; 
    771                                                 $item['rpr_is_today'] ? $script= "changestyle('$dhtml_id','visible');" : $script = ''; 
     770                                                $item['rpr_is_today']&&$highlight_todays_news ? $script= "changestyle('$dhtml_id','visible');" : $script = ''; 
    772771                                                $feed_html .= "<div class='$class' style='$style' id='$dhtml_id'>\n"; 
    773                                                 //$feed_html .= "<script type=\"text/javascript\">$script</script>\n"; 
    774772                                                $feed_html .= "<p class='rpr_text'>{$item['rpr_author']} ({$feed['channel']['title']}) $display_date</p>\n"; 
    775773                                                $summary = strip_tags($item['rpr_content'], "<br><p><a><img><b><i>");