Changeset 1088

Show
Ignore:
Timestamp:
09/02/06 23:35:06 (4 years ago)
Author:
max-horvath
Message:

"2006-09-02 Max Horvath <max.horvath@…>

  • Installation script checks for PHP session extension (fixes #139)
  • Removed \"Call-time pass-by-reference has been deprecated\" warnings (fixes #239)
  • Revert changes of FCKeditor implementation (fixes #240)
  • Fix of FCKeditor implementation, now also supports FCKeditor 2.3+ (fixes #145)
  • Hotspots/Nodes are sorted case-insensitive now (fixes #109)
  • Fix #141
  • templates/sites/index.tpl: fix wrong user count (fixes #236)
  • Added more trash mail services to the black list (fixes #149)"
Location:
trunk/wifidog-auth
Files:
1 removed
17 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/CHANGELOG

    r1087 r1088  
     12006-09-02 Max Horváth <max.horvath@maxspot.de> 
     2        * Installation script checks for PHP session extension (fixes #139) 
     3        * Removed "Call-time pass-by-reference has been deprecated" warnings 
     4          (fixes #239) 
     5        * Revert changes of FCKeditor implementation (fixes #240) 
     6        * Fix of FCKeditor implementation, now also supports FCKeditor 2.3+ 
     7          (fixes #145) 
     8        * Hotspots/Nodes are sorted case-insensitive now (fixes #109) 
     9        * Fix #141 
     10        * templates/sites/index.tpl: fix wrong user count (fixes #236) 
     11        * Added more trash mail services to the black list (fixes #149) 
     12 
    1132006-09-01 Benoit Grégoire  <bock@step.polymtl.ca> 
    2         * Fix #189, #173,  
     14        * Fix #189, #173, 
    315 
    4162006-09-01 Benoit Grégoire  <bock@step.polymtl.ca> 
    517        * Content.php:  Improve handling of simple but persistent content. 
    6          
     18 
    7192006-08-31 Benoit Grégoire  <bock@step.polymtl.ca> 
    8         * Server.php:  Make sure getCurrentServer returns the default server if the hostname isn't recognised. 
     20        * Server.php:  Make sure getCurrentServer returns the default server if the 
     21          hostname isn't recognised. 
    922        * Content manager: 
    10                 -Allow deleting simple (trivial) but persistent content 
    11                 -Remove the sponsor info field from Content Metadata.  Best practices is now to use the project info field to show this information. 
    12         * Add the necessary schema constraints to allow manually deleting networks, nodes and users.  Be carefull, removing any of theses will remove all traces of connection statistics as well.  You've been warned. 
     23                - Allow deleting simple (trivial) but persistent content 
     24                - Remove the sponsor info field from Content Metadata.  Best practices 
     25                  is now to use the project info field to show this information. 
     26        * Add the necessary schema constraints to allow manually deleting networks, 
     27          nodes and users.  Be carefull, removing any of theses will remove all 
     28          traces of connection statistics as well.  You've been warned. 
    1329        * Do not display the network in the login interface if there is only one. 
    14         * Add a pseudo-random content ordering mode.  Pick content elements randomly, but do not display the same content twice untill all content has been seen. 
    15         * Allow setting a title but not displaying it (very usefull for reusable content) 
    16          
     30        * Add a pseudo-random content ordering mode.  Pick content elements 
     31          randomly, but do not display the same content twice untill all content 
     32          has been seen. 
     33        * Allow setting a title but not displaying it (very usefull for reusable 
     34          content) 
     35 
    17362006-08-29 Max Horváth <max.horvath@maxspot.de> 
    1837        * Cleaned up PHPdoc tags 
     
    3150 
    32512006-08-27 Benoit Grégoire  <bock@step.polymtl.ca> 
    33         * clickthrough.php, HyperLink.php:  Implement working hyperlink clickthrough tracking (no reporting yet). 
    34           Works for Langstring, FlickrPhotoStream, Picture, RssAggregator and their subclasses. 
    35         * Make HTMLeditor inherit from Langstring.  Allowed a massive reduction of line count and will stop the codebases from needlessly drifting apart. 
    36         * Do not log content displayed as metadata, and log their clickthrough as the parent's. 
     52        * clickthrough.php, HyperLink.php:  Implement working hyperlink 
     53          clickthrough tracking (no reporting yet). 
     54          Works for Langstring, FlickrPhotoStream, Picture, RssAggregator and their 
     55          subclasses. 
     56        * Make HTMLeditor inherit from Langstring.  Allowed a massive reduction of 
     57          line count and will stop the codebases from needlessly drifting apart. 
     58        * Do not log content displayed as metadata, and log their clickthrough as 
     59          the parent's. 
    3760 
    38612006-08-27 François Proulx <francois.proulx@gmail.com> 
    3962        * Updated French translations 
    40         * Now using Sprintf formatted strings in some Smarty templates (see example in templates/sites/index.tpl). 
     63        * Now using Sprintf formatted strings in some Smarty templates (see 
     64          example in templates/sites/index.tpl). 
    4165        * Integrated back the SQL profiling functions 
    4266 
     
    49732006-07-05 Benoit Grégoire  <bock@step.polymtl.ca> 
    5074        * Fix #175. 
    51         * Fix the "Registration Log" and "User registration report" reports giving incorrect statistics 
    52         * Allow disabling EventLogging class in config.php, to make SQL debuging possible (The class was traping errors before AbstractDb could output them) 
    53         * Make EVENT_LOGGING default to false for now, as it turns out EventLogging was the cause of the 
    54         Spurious PEAR output ("Runtime Notice: ") we've been seeing.  That is probably only because we don't 
    55         understand how to properly control it's logging level. 
     75        * Fix the "Registration Log" and "User registration report" reports giving 
     76          incorrect statistics 
     77        * Allow disabling EventLogging class in config.php, to make SQL debuging 
     78          possible (The class was traping errors before AbstractDb could 
     79          output them) 
     80        * Make EVENT_LOGGING default to false for now, as it turns out EventLogging 
     81          was the cause of the Spurious PEAR output ("Runtime Notice: ") we've 
     82          been seeing.  That is probably only because we don't understand how to 
     83          properly control it's logging level. 
    5684 
    57852006-06-18 François Proulx <francois.proulx@gmail.com> 
    58         * Added creation_date , last_update_date support to File content (with proper HTTP caching handling) 
     86        * Added creation_date , last_update_date support to File content (with 
     87          proper HTTP caching handling) 
    5988        * Added hyperlinks URL support in Picture content 
    6089        * Fixed constants in Flickr Content 
     
    71100 
    721012006-06-08 Benoit Grégoire  <bock@step.polymtl.ca> 
    73         * Completely refactor the look and html of the content manager, statistics and most object's administrative interfaces. 
    74         Should be much simpler and clearer now. 
    75         No refactoring of the editing flow has been done yet. 
     102        * Completely refactor the look and html of the content manager, statistics 
     103          and most object's administrative interfaces. 
     104          Should be much simpler and clearer now. 
     105          No refactoring of the editing flow has been done yet. 
    76106        * Spell check the french translation, and add a few of the missing strings. 
    77107 
     
    80110 
    811112006-05-26 François Proulx <francois.proulx@gmail.com> 
    82         * Added Japanese translation .po file (Thanks to taedu AT ninjin-net DOT net) 
     112        * Added Japanese translation .po file 
     113          (Thanks to taedu AT ninjin-net DOT net) 
    83114 
    841152006-05-24 François Proulx <francois.proulx@gmail.com> 
     
    90121 
    911222006-05-23 Benoit Grégoire  <bock@step.polymtl.ca> 
    92         * config.php:  Disable USE_CACHE_LITE, it's definitely not stable, and causes very hard to track down problems with Internet Explorer. 
     123        * config.php:  Disable USE_CACHE_LITE, it's definitely not stable, and 
     124          causes very hard to track down problems with Internet Explorer. 
    93125 
    941262006-05-22 François Proulx <francois.proulx@gmail.com> 
     
    124156 
    1251572006-05-20 François Proulx <francois.proulx@gmail.com> 
    126         * Various stylesheet improvements, started working on Île Sans Fil network specific theme pack 
     158        * Various stylesheet improvements, started working on Île Sans Fil network 
     159          specific theme pack 
    127160        * Fixed a few layout bugs 
    128161 
    1291622006-05-20 Benoit Grégoire  <bock@step.polymtl.ca> 
    130         * USE_BASE_NON_SSL_PATH for hotspot map, else internet explorer whines endlessly 
     163        * USE_BASE_NON_SSL_PATH for hotspot map, else internet explorer whines 
     164          endlessly 
    131165 
    1321662006-05-20 Benoit Grégoire  <bock@step.polymtl.ca> 
    133         * index.tpl:  Fix link to the map not being displayed at a hotspot, even when you are logged in.  There needs to be much better logick before we export such things to smarty templates. 
     167        * index.tpl:  Fix link to the map not being displayed at a hotspot, even 
     168          when you are logged in.  There needs to be much better logick before we 
     169          export such things to smarty templates. 
    134170 
    1351712006-05-20 François Proulx <francois.proulx@gmail.com> 
    136172        * Added /wifidog/contrib and /wifidog/contrib/xslt directories 
    137         * Posted Île Sans Fil XSLT example stylesheet for converting the hotspot_status page 
     173        * Posted Île Sans Fil XSLT example stylesheet for converting the 
     174          hotspot_status page 
    138175                * Browser view 
    139176                * PDA view (by Jean-Pierre Lessard <jplprog@videotron.ca>) 
    140177                * Simply use in this manner : 
    141                 http://wifidog-server.org/hotspot_status.php?format=XML&xslt=http://wifidog-server.org/contrib/xslt/hotspot_status_browser.xsl 
     178                  http://wifidog-server.org/hotspot_status.php?format=XML&xslt=http://wifidog-server.org/contrib/xslt/hotspot_status_browser.xsl 
    142179 
    1431802006-05-20 Benoit Grégoire  <bock@step.polymtl.ca> 
    144         * page.php:  Fix bugs in various files preventing the system from working from the command line. 
     181        * page.php:  Fix bugs in various files preventing the system from working 
     182          from the command line. 
    145183 
    1461842006-05-20 Benoit Grégoire  <bock@step.polymtl.ca> 
    147         * More install script fixes:  Phlickr wouldn't install, and the permissions of wifidog/tmp/smarty/cache weren't checked. 
     185        * More install script fixes:  Phlickr wouldn't install, and the permissions 
     186          of wifidog/tmp/smarty/cache weren't checked. 
    148187 
    1491882006-05-20 Benoit Grégoire  <bock@step.polymtl.ca> 
     
    151190 
    1521912006-05-18 Benoit Grégoire  <bock@step.polymtl.ca> 
    153         * Fix loging form incorrectly attempting to validate the password, preventing many existing 
    154         accounts from logging-in. 
    155         * Interim commit, begin simplifying the html ans stylesheets, and re-doing the general look. 
    156         This is incomplete, this commit was done to fix the problem above. 
    157         * install.php:  Fix path problems, make shel command errors visible.  Update magpie and smarty url to latest versions (note that this won't 
    158         automatically update an existing install).  Didn't touch phlickr as I didn't know the implications 
    159         * Add interactive scripts in sql/ to easily backup and restore a wifidog auth server database. 
     192        * Fix loging form incorrectly attempting to validate the password, 
     193          preventing many existing accounts from logging-in. 
     194        * Interim commit, begin simplifying the html ans stylesheets, and re-doing 
     195          the general look. 
     196          This is incomplete, this commit was done to fix the problem above. 
     197        * install.php:  Fix path problems, make shel command errors visible.  Update 
     198          magpie and smarty url to latest versions (note that this won't 
     199          automatically update an existing install).  Didn't touch phlickr as I 
     200          didn't know the implications 
     201        * Add interactive scripts in sql/ to easily backup and restore a wifidog 
     202          auth server database. 
    160203 
    1612042006-05-10 François Proulx <francois.proulx@gmail.com> 
     
    163206 
    1642072006-05-10 François Proulx <francois.proulx@gmail.com> 
    165         * Added sweetTitles tooltips script, now if you need to add tooltips simply add the 'title' attribute to you html <a>, <attr>, <accroym> tags 
     208        * Added sweetTitles tooltips script, now if you need to add tooltips simply 
     209          add the 'title' attribute to you html <a>, <attr>, <accroym> tags 
    166210        * Fixed usort bug in MainUI 
    167211        * Fixed download (wget) in install.php 
    168212 
    1692132006-05-09 Benoit Grégoire  <bock@step.polymtl.ca> 
    170         * Working (if slightly basic) theme manager.  You can pick the theme in the network configuration. 
    171         To add your own theme, read wifidog/media/network_theme_packs/README.txt 
     214        * Working (if slightly basic) theme manager.  You can pick the theme in the 
     215          network configuration. 
     216          To add your own theme, read wifidog/media/network_theme_packs/README.txt 
    172217        * Cleanup and document the wifidog directory structure 
    173218        * Minor HTML corrections for content types 
    174         * Completely rip out the old local_content system, and a bunch of obsolete defines and config variables. 
     219        * Completely rip out the old local_content system, and a bunch of obsolete 
     220          defines and config variables. 
    175221        * Get rid of PHP generated stylesheets 
    176222 
    1772232006-05-09 Benoit Grégoire  <bock@step.polymtl.ca> 
    178224        * Finish content assignation system 
    179         * Content ordering is now global (network, nodes and everywhere content cand now be in mixed order). 
     225        * Content ordering is now global (network, nodes and everywhere content cand 
     226          now be in mixed order). 
    180227        * Implement 'everywhere' content 
    181228        * Change MainUI::apendContent to MainUI::addContent 
     
    185232 
    1862332006-04-28 Benoit Grégoire  <bock@step.polymtl.ca> 
    187         * wifidog/login/index.php: Correctly use DEFAULT_NODE_ID from config.php instead of hardcoded 'default' 
     234        * wifidog/login/index.php: Correctly use DEFAULT_NODE_ID from config.php 
     235          instead of hardcoded 'default' 
    188236 
    1892372006-04-28 François Proulx <francois.proulx@gmail.com> 
     
    202250 
    2032512006-04-24 Benoit Grégoire  <bock@step.polymtl.ca> 
    204         * Major system locale handling overhaull.  Hopefully abstract out the UTF8 problems once and for all, 
    205         allowing everyone to define them the same way.  Fix a few bugs along the way. 
    206         Should also be a little faster. 
     252        * Major system locale handling overhaull.  Hopefully abstract out the UTF8 
     253          problems once and for all, allowing everyone to define them the same way. 
     254          Fix a few bugs along the way. Should also be a little faster. 
    207255 
    2082562006-04-24 Benoit Grégoire  <bock@step.polymtl.ca> 
    209         * Revert Rob's SYSTEM_PATH change.  Sorry about that.  The devs spent hours to finally get the PATH 
    210          stuff consistent and fixing the countless bugs that this process introduced. 
    211          Maybe some links still need to use BASE_URL_PATH instead of BASE_SSL_PATH, 
    212         (or vice-versa) but it was on purpose that SYSTEM_PATH was not made available to Smarty. 
    213         We already have 3 defines to be used for links and html refs, that's enough 
    214          BASE_SSL_PATH should be used to enter SSL mode (if available) 
    215          BASE_NON_SSL_PATH should be used to break out of SSL mode of when we 
    216          explicitely do not want someting to be referenced over http 
    217          BASE_URL_PATH should be used in all other cases to avoid needless SSL warning 
     257        * Revert Rob's SYSTEM_PATH change.  Sorry about that.  The devs spent hours 
     258          to finally get the PATH stuff consistent and fixing the countless bugs 
     259          that this process introduced. 
     260          Maybe some links still need to use BASE_URL_PATH instead of BASE_SSL_PATH, 
     261          (or vice-versa) but it was on purpose that SYSTEM_PATH was not made 
     262          available to Smarty. 
     263          We already have 3 defines to be used for links and html refs, that's 
     264          enough BASE_SSL_PATH should be used to enter SSL mode (if available) 
     265          BASE_NON_SSL_PATH should be used to break out of SSL mode of when we 
     266          explicitely do not want someting to be referenced over http 
     267          BASE_URL_PATH should be used in all other cases to avoid needless 
     268          SSL warning 
    218269 
    2192702006-04-17 Rob Janes <janes.rob@gmail.com> 
     
    221272        * help text (untranslated). 
    222273        * EVENT_LOGGING enabling/disabling flag. 
    223         * use SYSTEM_PATH instead of BASE_URL_PATH and BASE_SSL_PATH where ever appropriate. 
    224         * standardize Smarty variables for Network and User info by adding assignSmartyValues($smarty, $self) to Network and User. 
     274        * use SYSTEM_PATH instead of BASE_URL_PATH and BASE_SSL_PATH where ever 
     275          appropriate. 
     276        * standardize Smarty variables for Network and User info by adding 
     277          assignSmartyValues($smarty, $self) to Network and User. 
    225278        * change_password only allowed if logged in. 
    226279        * non-superadmin can only use change_password to change their own password. 
    227         * superadmin can use change_password to change any user password by entering in their password for the old password. 
     280        * superadmin can use change_password to change any user password by 
     281          entering in their password for the old password. 
    228282        * page_header div defined and positioned in MainUI 
    229283 
    2302842006-04-04 Benoit Grégoire  <bock@step.polymtl.ca> 
    231         * /classes/Content/IFrame/IFrame.php: Change a few methods from private to protected as the private methods broke IFrameRest 
     285        * /classes/Content/IFrame/IFrame.php: Change a few methods from private 
     286          to protected as the private methods broke IFrameRest 
    232287 
    2332882006-04-01 François Proulx <francois.proulx@gmail.com> 
     
    235290 
    2362912006-03-31 Benoit Grégoire  <bock@step.polymtl.ca> 
    237         * dump_initial_data_postgres.sh:  Add the content_available_display_pages table to the dump, can someone re-generate the initial data from a working install 
     292        * dump_initial_data_postgres.sh:  Add the content_available_display_pages 
     293          table to the dump, can someone re-generate the initial data from a 
     294          working install 
    238295        * Remove the ?> tags from all the classes. 
    239296 
     
    252309        * First step in massive simplification of CSS and templates 
    253310        * Implement the new main CSS structure 
    254         * Implement working content assignation interface and content ordering for both network and nodes. 
    255         * Display of content according to assignation work on 'portal' and 'login'.  'everywhere' not yet implemented 
     311        * Implement working content assignation interface and content ordering for 
     312          both network and nodes. 
     313        * Display of content according to assignation work on 'portal' and 'login'. 
     314          'everywhere' not yet implemented 
    256315        * Get rid of some ISF specific interface elements 
    257         * Finally replace the overly complicated start button by a "Use the Internet" link that will not 
    258          get you out of your working tab 
     316        * Finally replace the overly complicated start button by a 
     317          "Use the Internet" link that will not get you out of your working tab 
    259318        * Fix #118 
    260319 
    2613202006-03-26 Benoit Grégoire  <bock@step.polymtl.ca> 
    262         * init_php.php: Fix stripslashes_cb() so it actually works, this means the aust server should work properly with auth servers with magic quotes turned on. 
    263         This is still not recommended however. 
     321        * init_php.php: Fix stripslashes_cb() so it actually works, this means the 
     322          auth server should work properly with auth servers with magic quotes 
     323          turned on. 
     324          This is still not recommended however. 
    264325        * Remove some spurious error ouptut on logout. 
    265326        * Remove potential error in network id parsing 
     
    2673282006-03-22 François Proulx <francois.proulx@gmail.com> 
    268329        * Fixed Google Maps URLs bug 
    269         * Since Google Maps does not provide Javascript over SSL (it does but the certificate does not match) 
    270           the code path to the map does not use SSL, but the outgoing URLs do. 
     330        * Since Google Maps does not provide Javascript over SSL (it does but the 
     331          certificate does not match) the code path to the map does not use SSL, but 
     332          the outgoing URLs do. 
    271333        * Removed lost echo in Locale.php 
    272334 
    2733352006-03-21 Benoit Grégoire  <bock@step.polymtl.ca> 
    274         * login/index.php: Remove huge security hole introduced by stylistic changes in the file. 
    275         A user could login to any hotspot by simply filling a blank form because of a gratuitous 
    276         change from empty to is_null everywhere.  Remove escaping or REQUEST parameters in non SQL 
    277          related code, as this would lead to double unescaping down the line.  Remove logic dependent 
    278           on encapsulated side effects of object method call. 
     336        * login/index.php: Remove huge security hole introduced by stylistic 
     337          changes in the file. A user could login to any hotspot by simply filling 
     338          a blank form because of a gratuitous change from empty to is_null 
     339          everywhere.  Remove escaping or REQUEST parameters in non SQL 
     340          related code, as this would lead to double unescaping down the line. 
     341          Remove logic dependent on encapsulated side effects of object method call. 
    279342 
    2803432006-03-19 François Proulx <francois.proulx@gmail.com> 
  • trunk/wifidog-auth/INSTALL

    r1082 r1088  
    1414- Magpierss (http://magpierss.sourceforge.net/) (Required for RSS support. RSS 
    1515  support must be manually disabled if you do not install it) 
    16 - FCKeditor 2.2 (http://www.fckeditor.net/) (Required if you want to edit 
     16- FCKeditor 2.3+ (http://www.fckeditor.net/) (Required if you want to edit 
    1717  content with a HTML text editor aka WYSIWYG editor) 
    1818- FPDF 1.53+ (http://www.fpdf.org/) (Required if you want to export the node 
  • trunk/wifidog-auth/wifidog/classes/Content/ContentGroup/ContentGroup.php

    r1085 r1088  
    730730    } 
    731731 
    732     /** Delete this Content from the database 
    733     */ 
     732    /** 
     733     * Delete this Content from the database 
     734     */ 
    734735    public function delete(& $errmsg) { 
    735736        if ($this->isPersistent() == false) { 
     
    738739            } 
    739740        } 
    740         return parent :: delete($errmsg); 
    741     } 
     741        return parent::delete($errmsg); 
     742    } 
     743 
    742744    /** Reloads the object from the database.  Should normally be called after a set operation. 
    743745    * This function is private because calling it from a subclass will call the 
  • trunk/wifidog-auth/wifidog/classes/Content/ContentGroup/ContentGroupElement.php

    r1087 r1088  
    273273        $html .= "<fieldset class='admin_element_group'>\n"; 
    274274                $html .= "<legend>". sprintf(_("%s %d display order and location"), get_class($this), $this->getDisplayOrder())."</legend>\n"; 
    275          
     275 
    276276        $allowed_node_rows = null; 
    277277                $html .= "<ul class='admin_element_list'>\n"; 
     
    319319        $html .= "</li'>\n"; 
    320320        $html .= "</ul>\n"; 
    321          
     321 
    322322        $html .= "</li>\n"; 
    323323        $html .= "</fieldset>\n"; 
    324324        $html .= "</li>\n"; 
    325          
     325 
    326326        /* displayed_content_id */ 
    327327        $html .= "<li class='admin_element_item_container'>\n"; 
     
    535535        if ($this->isPersistent() == false && !empty ($this->content_group_element_row['displayed_content_id'])) { 
    536536            $displayed_content = self::getObject($this->content_group_element_row['displayed_content_id']); 
    537             $displayed_content->delete(& $errmsg); 
    538             parent::delete(& $errmsg); 
     537            $displayed_content->delete($errmsg); 
     538            parent::delete($errmsg); 
    539539        } 
    540540    } 
  • trunk/wifidog-auth/wifidog/classes/Content/EmbeddedContent/EmbeddedContent.php

    r1070 r1088  
    412412        } 
    413413 
    414         return parent :: delete($errmsg); 
     414        return parent::delete($errmsg); 
    415415    } 
    416416 
  • trunk/wifidog-auth/wifidog/classes/Content/HTMLeditor/HTMLeditor.php

    r1080 r1088  
    5757 * @copyright  2005-2006 Max Horvath, maxspot GmbH 
    5858 */ 
    59 class HTMLeditor extends Langstring 
     59class HTMLeditor extends Content 
    6060{ 
    6161 
     
    9898            $this->_FCKeditorAvailable = true; 
    9999        } 
     100    } 
     101 
     102    /** 
     103     * Return string in the language requested by the user. 
     104     * 
     105     * @return string UTF-8 string of content. 
     106     * 
     107     * @access private 
     108     */ 
     109    private function getString() 
     110    { 
     111        // Init values 
     112        $_retval = null; 
     113        $_row = null; 
     114        $_useCache = false; 
     115        $_cachedData = null; 
     116 
     117        // Create new cache objects 
     118        $_cacheLanguage = new Cache('langstrings_' . $this->id . '_substring_' . substr(Locale::getCurrentLocale()->getId(), 0, 2) . '_string', $this->id); 
     119        $_cache = new Cache('langstrings_' . $this->id . '_substring__string', $this->id); 
     120 
     121        // Check if caching has been enabled. 
     122        if ($_cacheLanguage->isCachingEnabled) { 
     123            $_cachedData = $_cacheLanguage->getCachedData(); 
     124 
     125            if ($_cachedData) { 
     126                // Return cached data. 
     127                $_useCache = true; 
     128                $_retval = $_cachedData; 
     129            } else { 
     130                // Language specific cached data has not been found. 
     131                // Try to get language independent cached data. 
     132                $_cachedData = $_cache->getCachedData(); 
     133 
     134                if ($_cachedData) { 
     135                    // Return cached data. 
     136                    $_useCache = true; 
     137                    $_retval = $_cachedData; 
     138                } 
     139            } 
     140        } 
     141 
     142        if (!$_useCache) { 
     143            // Get string in the prefered language of the user 
     144            $_sql = "SELECT value, locales_id, \n"; 
     145            $_sql .= Locale::getSqlCaseStringSelect(Locale::getCurrentLocale()->getId()); 
     146            $_sql .= " as score FROM content_langstring_entries WHERE content_langstring_entries.langstrings_id = '{$this->id}' AND value!='' ORDER BY score LIMIT 1"; 
     147            $this->mBd->execSqlUniqueRes($_sql, $_row, false); 
     148 
     149            if ($_row == null) { 
     150                // String has not been found 
     151                $_retval = "(Empty string)"; 
     152            } else { 
     153                // String has been found 
     154                $_retval = $_row['value']; 
     155 
     156                // Check if caching has been enabled. 
     157                if ($_cache->isCachingEnabled) { 
     158                    // Save data into cache, because it wasn't saved into cache before. 
     159                    $_cache->saveCachedData($_retval); 
     160                } 
     161            } 
     162        } 
     163 
     164        return $_retval; 
     165    } 
     166 
     167    /** 
     168     * Adds the string associated with the locale. 
     169     * 
     170     * @param string $string             String to be added 
     171     * @param string $locale             Locale of string (i.e. 'fr_CA') - can 
     172     *                                   be NULL 
     173     * @param bool   $allow_empty_string Defines if string may be empty 
     174     * 
     175     * @return bool True if string has been added, otherwise false. 
     176     * 
     177     * @access private 
     178     */ 
     179    private function addString($string, $locale, $allow_empty_string = false) 
     180    { 
     181        // Init values 
     182        $_retval = false; 
     183        $_id = 'NULL'; 
     184        $_idSQL = $_id; 
     185 
     186        if ($locale) { 
     187            // Set locale of string 
     188            $_language = new Locale($locale); 
     189 
     190            $_id = $_language->GetId(); 
     191            $_idSQL = "'" . $_id . "'"; 
     192        } 
     193 
     194        if ($allow_empty_string || ($string != null && $string != '')) { 
     195            // Save string in database 
     196            $string = $this->mBd->escapeString($string); 
     197            $this->mBd->execSqlUpdate("INSERT INTO content_langstring_entries (langstring_entries_id, langstrings_id, locales_id, value) VALUES ('" . get_guid() . "', '$this->id', $_idSQL , '$string')", FALSE); 
     198 
     199            // Create new cache object. 
     200            $_cache = new Cache('langstrings_' . $this->id . '_substring_' .  $_id . '_string', $this->id); 
     201 
     202            // Check if caching has been enabled. 
     203            if ($_cache->isCachingEnabled) { 
     204                // Remove old cached data. 
     205                $_cache->eraseCachedData(); 
     206 
     207                // Save data into cache. 
     208                $_cache->saveCachedData($string); 
     209            } 
     210 
     211            $_retval = true; 
     212        } 
     213 
     214        return $_retval; 
     215    } 
     216 
     217    /** 
     218     * Updates the string associated with the locale. 
     219     * 
     220     * @param string $string String to be updated. 
     221     * @param string $locale Locale of string (i.e. 'fr_CA') - can be NULL. 
     222     * 
     223     * @return bool True if string has been updated, otherwise false. 
     224     * 
     225     * @access private 
     226     */ 
     227    private function UpdateString($string, $locale) 
     228    { 
     229        // Init values 
     230        $_retval = false; 
     231        $_id = 'NULL'; 
     232        $_row = null; 
     233 
     234        if ($locale) { 
     235            // Set locale of string 
     236            $_language = new Locale($locale); 
     237 
     238            $_id = $_language->GetId(); 
     239            $_idSQL = "'" . $_id . "'"; 
     240        } 
     241 
     242        if ($string != null && $string != '') { 
     243            $string = $this->mBd->escapeString($string); 
     244 
     245            // If the update returns 0 (no update), try inserting the record 
     246            $this->mBd->execSqlUniqueRes("SELECT * FROM content_langstring_entries WHERE locales_id = $_idSQL AND langstrings_id = '$this->id'", $_row, false); 
     247 
     248            if ($_row != null) { 
     249                $this->mBd->execSqlUpdate("UPDATE content_langstring_entries SET value = '$string' WHERE langstrings_id = '$this->id' AND locales_id = $_idSQL", false); 
     250 
     251                // Create new cache object. 
     252                $_cache = new Cache('langstrings_' . $this->id . '_substring_' .  $_id . '_string', $this->id); 
     253 
     254                // Check if caching has been enabled. 
     255                if ($_cache->isCachingEnabled) { 
     256                    // Remove old cached data. 
     257                    $_cache->eraseCachedData(); 
     258 
     259                    // Save data into cache. 
     260                    $_cache->saveCachedData($string); 
     261                } 
     262            } else { 
     263                $this->addString($string, $locale); 
     264            } 
     265 
     266            $_retval = true; 
     267        } 
     268        return $_retval; 
    100269    } 
    101270 
     
    118287            $_html = ''; 
    119288            $_languages = new LocaleList(); 
    120                         $html .= "<ul class='admin_element_list'>\n"; 
     289                        $_html .= "<ul class='admin_element_list'>\n"; 
    121290 
    122291            $_html .= "<li class='admin_element_item_container content_html_editor'>\n"; 
     
    223392        // Check FCKeditor support 
    224393        if ($this->_FCKeditorAvailable) { 
    225             return parent::processAdminUI(); 
    226         } 
    227     } 
     394            // Init values 
     395            $_result = null; 
     396 
     397            if ($this->isOwner(User::getCurrentUser()) || User::getCurrentUser()->isSuperAdmin()) { 
     398                parent::processAdminUI(); 
     399 
     400                $_form_select = new FormSelectGenerator(); 
     401 
     402                $_sql = "SELECT * FROM content_langstring_entries WHERE content_langstring_entries.langstrings_id = '$this->id'"; 
     403                $this->mBd->execSql($_sql, $_result, FALSE); 
     404 
     405                if ($_result != null) { 
     406                    while (list($_key, $_value) = each($_result)) { 
     407                        $_language = $_form_select->getResult("langstrings_" . $this->id . "_substring_" . $_value["langstring_entries_id"] . "_language", 'Langstring::AfficherInterfaceAdmin'); 
     408 
     409                        if (empty ($_language)) { 
     410                            $_language = ''; 
     411                            $_languageSQL = 'NULL'; 
     412                        } else { 
     413                            $_languageSQL = "'" . $_language . "'"; 
     414                        } 
     415 
     416                        if (!empty ($_REQUEST["langstrings_" . $this->id . "_substring_" . $_value["langstring_entries_id"] . "_erase"]) && $_REQUEST["langstrings_" . $this->id . "_substring_" . $_value["langstring_entries_id"] . "_erase"] == true) { 
     417                            $this->mBd->execSqlUpdate("DELETE FROM content_langstring_entries WHERE langstrings_id = '$this->id' AND langstring_entries_id='" . $_value["langstring_entries_id"] . "'", FALSE); 
     418 
     419                            // Create new cache object. 
     420                            $_cache = new Cache('langstrings_' . $this->id . '_substring_' .  $_language . '_string', $this->id); 
     421 
     422                            // Check if caching has been enabled. 
     423                            if ($_cache->isCachingEnabled) { 
     424                                // Remove old cached data. 
     425                                $_cache->eraseCachedData(); 
     426                            } 
     427                        } else { 
     428                            // Strip HTML tags! 
     429                            $string = $_REQUEST["langstrings_" . $this->id . "_substring_" . $_value["langstring_entries_id"] . "_string"]; 
     430                            $string = $this->mBd->escapeString(strip_tags($string, self::ALLOWED_HTML_TAGS)); 
     431 
     432                            // If PEAR::HTML_Safe is available strips down all potentially dangerous content 
     433                            $_HtmlSafe = new HtmlSafe(); 
     434 
     435                            if ($_HtmlSafe->isHtmlSafeEnabled) { 
     436                                $string = $_HtmlSafe->parseHtml($string); 
     437                            } 
     438 
     439                            $this->mBd->execSqlUpdate("UPDATE content_langstring_entries SET locales_id = " . $_languageSQL . " , value = '$string' WHERE langstrings_id = '$this->id' AND langstring_entries_id='" . $_value["langstring_entries_id"] . "'", FALSE); 
     440 
     441                            // Create new cache object. 
     442                            $_cache = new Cache('langstrings_' . $this->id . '_substring_' .  $_language . '_string', $this->id); 
     443 
     444                            // Check if caching has been enabled. 
     445                            if ($_cache->isCachingEnabled) { 
     446                                // Remove old cached data. 
     447                                $_cache->eraseCachedData(); 
     448 
     449                                // Save data into cache. 
     450                                $_cache->saveCachedData($string); 
     451                            } 
     452                        } 
     453                    } 
     454                } 
     455 
     456                $_new_substring_name = "langstrings_" . $this->id . "_substring_new_string"; 
     457                $_new_substring_submit_name = "langstrings_" . $this->id . "_add_new_entry"; 
     458                if ((isset ($_REQUEST[$_new_substring_submit_name]) && $_REQUEST[$_new_substring_submit_name] == true) || !empty ($_REQUEST[$_new_substring_name])) { 
     459                    $_language = $_form_select->getResult("langstrings_" . $this->id . "_substring_new_language", 'Langstring::AfficherInterfaceAdmin'); 
     460 
     461                    if (empty($_language)) { 
     462                        $_language = null; 
     463                    } 
     464 
     465                    $this->addString($_REQUEST[$_new_substring_name], $_language, true); 
     466                } 
     467            } 
     468        } 
     469    } 
     470 
     471    /** 
     472     * Retreives the user interface of this object. Anything that overrides 
     473     * this method should call the parent method with it's output at the 
     474     * END of processing. 
     475     * 
     476     * @param string $subclass_admin_interface HTML content of the interface 
     477     *                                         element of a children. 
     478     * 
     479     * @return string The HTML fragment for this interface. 
     480     * 
     481     * @access public 
     482     */ 
     483    public function getUserUI($subclass_user_interface = null) 
     484    { 
     485        // Init values 
     486        $_html = ""; 
     487 
     488        $_html .= "<div class='user_ui_container ".get_class($this)."'>\n"; 
     489        $_html .= "<div class='langstring'>\n"; 
     490 
     491        // Check FCKeditor support 
     492        if ($this->_FCKeditorAvailable) { 
     493            $_html .= $this->getString(); 
     494        } else { 
     495            $_html .= _("FCKeditor is not installed"); 
     496        } 
     497 
     498        $_html .= $subclass_user_interface; 
     499        $_html .= "</div>\n"; 
     500        $_html .= "</div>\n"; 
     501 
     502        return parent::getUserUI($_html); 
     503    } 
     504 
     505    /** 
     506     * Reloads the object from the database. Should normally be called after 
     507     * a set operation. This function is private because calling it from a 
     508     * subclass will call the constructor from the wrong scope. 
     509     * 
     510     * @return void 
     511     * 
     512     * @access private 
     513     */ 
     514    private function refresh() 
     515    { 
     516        $this->__construct($this->id); 
     517    } 
     518 
     519    /** 
     520     * Deletes a HTMLeditor object 
     521     * 
     522     * @param string $errmsg Reference to error message 
     523     * 
     524     * @return bool True if deletion was successful 
     525     * 
     526     * @access public 
     527     * @internal Persistent content will not be deleted 
     528     */ 
     529    public function delete(& $errmsg) { 
     530        // Init values. 
     531        $_retval = false; 
     532 
     533        if ($this->isPersistent()) { 
     534            $errmsg = _("Content is persistent (you must make it non persistent before you can delete it)"); 
     535        } else { 
     536            global $db; 
     537 
     538            if ($this->isOwner(User::getCurrentUser()) || User::getCurrentUser()->isSuperAdmin()) { 
     539                $_sql = "DELETE FROM content WHERE content_id='$this->id'"; 
     540                $db->execSqlUpdate($_sql, false); 
     541                $_retval = true; 
     542 
     543                // Create new cache object. 
     544                $_cache = new Cache('all', $this->id); 
     545 
     546                // Check if caching has been enabled. 
     547                if ($_cache->isCachingEnabled) { 
     548                    // Remove old cached data. 
     549                    $_cache->eraseCachedGroupData(); 
     550                } 
     551            } else { 
     552                $errmsg = _("Access denied (not owner of content)"); 
     553            } 
     554        } 
     555 
     556        return $_retval; 
     557    } 
     558 
    228559} 
    229560 
     
    235566 * End: 
    236567 */ 
    237  
    238  
  • trunk/wifidog-auth/wifidog/classes/Mail.php

    r1084 r1088  
    7171           "mytrashmail.com", "simplicato.net", "sneakemail.com", "sofort-mail.de", 
    7272           "spamcon.org", "spamex.com", "spamgourmet.com", "spamhole.com", 
    73            "spammotel.com", "trash-mail.de", "woodyland.org" 
     73           "spammotel.com", "trash-mail.de", "woodyland.org", "dumpmail.de", 
     74           "antispam24.de", "nervmich.net", "spamday.com", "throwaway.de" 
    7475           ); 
    7576 
  • trunk/wifidog-auth/wifidog/classes/Node.php

    r1083 r1088  
    235235                $html = ''; 
    236236                $name = "{$user_prefix}"; 
    237                 $sql = "SELECT node_id, name, node_deployment_status, is_splash_only_node from nodes WHERE 1=1 $sql_additional_where ORDER BY node_id"; 
     237                $sql = "SELECT node_id, name, node_deployment_status, is_splash_only_node from nodes WHERE 1=1 $sql_additional_where ORDER BY lower(node_id)"; 
    238238                $node_rows = null; 
    239239                $db->execSql($sql, $node_rows, false); 
     
    815815        $_data = Content::getLinkedContentUI("node_" . $hashed_node_id . "_content", "node_has_content", "node_id", $this->id, "portal"); 
    816816        $html .= InterfaceElements::generateAdminSectionContainer("node_content", $_title, $_data); 
    817   
     817 
    818818                // Name 
    819819                $_title = _("Name"); 
     
    14531453        } 
    14541454 
    1455         /** Check if an node exists */ 
    1456         private function nodeExists($id) 
    1457         { 
    1458                 global $db; 
     1455        /** 
     1456         * Checks if an node exists 
     1457         * 
     1458         * @param string $id Id of node to be checked 
     1459         * 
     1460         * @return bool True if node exists, else false 
     1461         * 
     1462         * @static 
     1463         * @access private 
     1464         */ 
     1465        private static function nodeExists($id) 
     1466        { 
     1467            // Define globals 
     1468                global $db; 
     1469 
     1470                // Init values 
    14591471                $retval = false; 
     1472 
    14601473                $id_str = $db->escapeString($id); 
    14611474                $sql = "SELECT * FROM nodes WHERE node_id='{$id_str}'"; 
    14621475                $row = null; 
    14631476                $db->execSqlUniqueRes($sql, $row, false); 
    1464                 if ($row != null) 
    1465                 { 
     1477 
     1478                if ($row != null) { 
    14661479                        $retval = true; 
    14671480                } 
     1481 
    14681482                return $retval; 
    14691483        } 
  • trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListHTML.php

    r1082 r1088  
    133133 
    134134        // Query the database, sorting by node name 
    135         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY name", $this->_nodes, false); 
     135        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY lower(name)", $this->_nodes, false); 
    136136    } 
    137137 
  • trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListJiWireCSV.php

    r1073 r1088  
    100100 
    101101        // Query the database, sorting by node name 
    102         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY name", $this->_nodes, false); 
     102        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY lower(name)", $this->_nodes, false); 
    103103    } 
    104104 
  • trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListRSS.php

    r1031 r1088  
    107107 
    108108        // Query the database, sorting by node name 
    109         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY name", $this->_nodes, false); 
     109        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY lower(name)", $this->_nodes, false); 
    110110    } 
    111111 
  • trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListXML.php

    r1031 r1088  
    106106 
    107107        // Query the database, sorting by node name 
    108         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY name", $this->_nodes, false); 
     108        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY lower(name)", $this->_nodes, false); 
    109109    } 
    110110 
  • trunk/wifidog-auth/wifidog/classes/Statistics.php

    r1087 r1088  
    394394            $sql_join = " JOIN node_stakeholders ON (nodes.node_id=node_stakeholders.node_id AND user_id='$user_id') "; 
    395395        } 
    396         $sql = "SELECT nodes.node_id, nodes.name from nodes $sql_join WHERE 1=1 ORDER BY node_id"; 
     396        $sql = "SELECT nodes.node_id, nodes.name from nodes $sql_join WHERE 1=1 ORDER BY lower(node_id)"; 
    397397        $node_rows = null; 
    398398        $db->execSql($sql, $node_rows, false); 
     
    599599            $html .= "<div class='admin_element_tools'><input type='checkbox' name='$key' $checked /></div>\n"; 
    600600            $html .= "<div class='admin_element_label'>$name</div>\n"; 
    601              
     601 
    602602                $html .= "</li>\n"; 
    603603                } 
  • trunk/wifidog-auth/wifidog/install.php

    r1038 r1088  
    242242        'note' => 'Required for RADIUS support' 
    243243    ), 
     244    'session' => array ( 
     245        'needed' => 1, 
     246        'available' => 0, 
     247        'message' => '<B>session</B> extention is missing', 
     248        'note' => 'Required for core auth-server' 
     249    ), 
    244250    'xmlrpc' => array ( 
    245251        'needed' => 0, 
     
    404410function execVerbose($command, & $output, & $return_var) { 
    405411    print "$command"; 
    406     $retval = exec($command.'  2>&1', & $output, & $return_var);  
     412    $retval = exec($command.'  2>&1', & $output, & $return_var); 
    407413    if ($return_var != 0) { 
    408414        print "<p style='color:red'>Error:</em>  Command did not complete successfully  (returned $return_var): <br/>\n"; 
  • trunk/wifidog-auth/wifidog/js/HTMLeditor.js

    r938 r1088  
    4242 
    4343// WiFiDOG skin 
    44 FCKConfig.SkinPath = FCKConfig.BasePath + '../../../content/HTMLeditor/'; 
     44FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/'; 
    4545 
    4646// Path to our CSS defenitions 
    47 FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../../../local_content/common/stylesheet.css'; 
     47FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../../../media/base_theme/stylesheet.css'; 
     48 
     49// Preload images 
     50FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; 
    4851 
    4952// Don't show script sources in source mode 
  • trunk/wifidog-auth/wifidog/node_list.php

    r1031 r1088  
    9191} 
    9292 
     93// Check if ordering should ignore uppper and lower case 
     94if ($sort_by_param == "name" || $sort_by_param == "node_id") { 
     95    $sort_by_param = "lower(" . $sort_by_param . ")"; 
     96} 
     97 
    9398// Sort according to above instructions 
    9499if ($sort_by_using_sql === true) 
  • trunk/wifidog-auth/wifidog/templates/sites/index.tpl

    r1079 r1088  
    7070*} 
    7171        <p> 
    72                 {if $networkNumOnlineUsers == 1} 
     72                {if $networkNumValidUsers == 1} 
    7373                        {"The %s network currently has one valid user."|_|sprintf:$networkName} 
    7474                {else}