Changeset 1088
- Timestamp:
- 09/02/06 23:35:06 (4 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 1 removed
- 17 modified
-
CHANGELOG (modified) (15 diffs)
-
INSTALL (modified) (1 diff)
-
wifidog/classes/Content/ContentGroup/ContentGroup.php (modified) (2 diffs)
-
wifidog/classes/Content/ContentGroup/ContentGroupElement.php (modified) (3 diffs)
-
wifidog/classes/Content/EmbeddedContent/EmbeddedContent.php (modified) (1 diff)
-
wifidog/classes/Content/HTMLeditor/HTMLeditor.php (modified) (5 diffs)
-
wifidog/classes/Mail.php (modified) (1 diff)
-
wifidog/classes/Node.php (modified) (3 diffs)
-
wifidog/classes/NodeLists/NodeListHTML.php (modified) (1 diff)
-
wifidog/classes/NodeLists/NodeListJiWireCSV.php (modified) (1 diff)
-
wifidog/classes/NodeLists/NodeListRSS.php (modified) (1 diff)
-
wifidog/classes/NodeLists/NodeListXML.php (modified) (1 diff)
-
wifidog/classes/Statistics.php (modified) (2 diffs)
-
wifidog/content/HTMLeditor (deleted)
-
wifidog/install.php (modified) (2 diffs)
-
wifidog/js/HTMLeditor.js (modified) (1 diff)
-
wifidog/node_list.php (modified) (1 diff)
-
wifidog/templates/sites/index.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/CHANGELOG
r1087 r1088 1 2006-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 1 13 2006-09-01 Benoit Grégoire <bock@step.polymtl.ca> 2 * Fix #189, #173, 14 * Fix #189, #173, 3 15 4 16 2006-09-01 Benoit Grégoire <bock@step.polymtl.ca> 5 17 * Content.php: Improve handling of simple but persistent content. 6 18 7 19 2006-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. 9 22 * 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. 13 29 * 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 17 36 2006-08-29 Max Horváth <max.horvath@maxspot.de> 18 37 * Cleaned up PHPdoc tags … … 31 50 32 51 2006-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. 37 60 38 61 2006-08-27 François Proulx <francois.proulx@gmail.com> 39 62 * 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). 41 65 * Integrated back the SQL profiling functions 42 66 … … 49 73 2006-07-05 Benoit Grégoire <bock@step.polymtl.ca> 50 74 * 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. 56 84 57 85 2006-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) 59 88 * Added hyperlinks URL support in Picture content 60 89 * Fixed constants in Flickr Content … … 71 100 72 101 2006-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. 76 106 * Spell check the french translation, and add a few of the missing strings. 77 107 … … 80 110 81 111 2006-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) 83 114 84 115 2006-05-24 François Proulx <francois.proulx@gmail.com> … … 90 121 91 122 2006-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. 93 125 94 126 2006-05-22 François Proulx <francois.proulx@gmail.com> … … 124 156 125 157 2006-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 127 160 * Fixed a few layout bugs 128 161 129 162 2006-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 131 165 132 166 2006-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. 134 170 135 171 2006-05-20 François Proulx <francois.proulx@gmail.com> 136 172 * 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 138 175 * Browser view 139 176 * PDA view (by Jean-Pierre Lessard <jplprog@videotron.ca>) 140 177 * 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.xsl178 http://wifidog-server.org/hotspot_status.php?format=XML&xslt=http://wifidog-server.org/contrib/xslt/hotspot_status_browser.xsl 142 179 143 180 2006-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. 145 183 146 184 2006-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. 148 187 149 188 2006-05-20 Benoit Grégoire <bock@step.polymtl.ca> … … 151 190 152 191 2006-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. 160 203 161 204 2006-05-10 François Proulx <francois.proulx@gmail.com> … … 163 206 164 207 2006-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 166 210 * Fixed usort bug in MainUI 167 211 * Fixed download (wget) in install.php 168 212 169 213 2006-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 172 217 * Cleanup and document the wifidog directory structure 173 218 * 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. 175 221 * Get rid of PHP generated stylesheets 176 222 177 223 2006-05-09 Benoit Grégoire <bock@step.polymtl.ca> 178 224 * 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). 180 227 * Implement 'everywhere' content 181 228 * Change MainUI::apendContent to MainUI::addContent … … 185 232 186 233 2006-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' 188 236 189 237 2006-04-28 François Proulx <francois.proulx@gmail.com> … … 202 250 203 251 2006-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. 207 255 208 256 2006-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 218 269 219 270 2006-04-17 Rob Janes <janes.rob@gmail.com> … … 221 272 * help text (untranslated). 222 273 * 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. 225 278 * change_password only allowed if logged in. 226 279 * 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. 228 282 * page_header div defined and positioned in MainUI 229 283 230 284 2006-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 232 287 233 288 2006-04-01 François Proulx <francois.proulx@gmail.com> … … 235 290 236 291 2006-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 238 295 * Remove the ?> tags from all the classes. 239 296 … … 252 309 * First step in massive simplification of CSS and templates 253 310 * 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 256 315 * Get rid of some ISF specific interface elements 257 * Finally replace the overly complicated start button by a "Use the Internet" link that will not258 get you out of your working tab316 * Finally replace the overly complicated start button by a 317 "Use the Internet" link that will not get you out of your working tab 259 318 * Fix #118 260 319 261 320 2006-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. 264 325 * Remove some spurious error ouptut on logout. 265 326 * Remove potential error in network id parsing … … 267 328 2006-03-22 François Proulx <francois.proulx@gmail.com> 268 329 * 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. 271 333 * Removed lost echo in Locale.php 272 334 273 335 2006-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. 279 342 280 343 2006-03-19 François Proulx <francois.proulx@gmail.com> -
trunk/wifidog-auth/INSTALL
r1082 r1088 14 14 - Magpierss (http://magpierss.sourceforge.net/) (Required for RSS support. RSS 15 15 support must be manually disabled if you do not install it) 16 - FCKeditor 2. 2(http://www.fckeditor.net/) (Required if you want to edit16 - FCKeditor 2.3+ (http://www.fckeditor.net/) (Required if you want to edit 17 17 content with a HTML text editor aka WYSIWYG editor) 18 18 - 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 730 730 } 731 731 732 /** Delete this Content from the database 733 */ 732 /** 733 * Delete this Content from the database 734 */ 734 735 public function delete(& $errmsg) { 735 736 if ($this->isPersistent() == false) { … … 738 739 } 739 740 } 740 return parent :: delete($errmsg); 741 } 741 return parent::delete($errmsg); 742 } 743 742 744 /** Reloads the object from the database. Should normally be called after a set operation. 743 745 * This function is private because calling it from a subclass will call the -
trunk/wifidog-auth/wifidog/classes/Content/ContentGroup/ContentGroupElement.php
r1087 r1088 273 273 $html .= "<fieldset class='admin_element_group'>\n"; 274 274 $html .= "<legend>". sprintf(_("%s %d display order and location"), get_class($this), $this->getDisplayOrder())."</legend>\n"; 275 275 276 276 $allowed_node_rows = null; 277 277 $html .= "<ul class='admin_element_list'>\n"; … … 319 319 $html .= "</li'>\n"; 320 320 $html .= "</ul>\n"; 321 321 322 322 $html .= "</li>\n"; 323 323 $html .= "</fieldset>\n"; 324 324 $html .= "</li>\n"; 325 325 326 326 /* displayed_content_id */ 327 327 $html .= "<li class='admin_element_item_container'>\n"; … … 535 535 if ($this->isPersistent() == false && !empty ($this->content_group_element_row['displayed_content_id'])) { 536 536 $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); 539 539 } 540 540 } -
trunk/wifidog-auth/wifidog/classes/Content/EmbeddedContent/EmbeddedContent.php
r1070 r1088 412 412 } 413 413 414 return parent ::delete($errmsg);414 return parent::delete($errmsg); 415 415 } 416 416 -
trunk/wifidog-auth/wifidog/classes/Content/HTMLeditor/HTMLeditor.php
r1080 r1088 57 57 * @copyright 2005-2006 Max Horvath, maxspot GmbH 58 58 */ 59 class HTMLeditor extends Langstring59 class HTMLeditor extends Content 60 60 { 61 61 … … 98 98 $this->_FCKeditorAvailable = true; 99 99 } 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; 100 269 } 101 270 … … 118 287 $_html = ''; 119 288 $_languages = new LocaleList(); 120 $ html .= "<ul class='admin_element_list'>\n";289 $_html .= "<ul class='admin_element_list'>\n"; 121 290 122 291 $_html .= "<li class='admin_element_item_container content_html_editor'>\n"; … … 223 392 // Check FCKeditor support 224 393 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 228 559 } 229 560 … … 235 566 * End: 236 567 */ 237 238 -
trunk/wifidog-auth/wifidog/classes/Mail.php
r1084 r1088 71 71 "mytrashmail.com", "simplicato.net", "sneakemail.com", "sofort-mail.de", 72 72 "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" 74 75 ); 75 76 -
trunk/wifidog-auth/wifidog/classes/Node.php
r1083 r1088 235 235 $html = ''; 236 236 $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)"; 238 238 $node_rows = null; 239 239 $db->execSql($sql, $node_rows, false); … … 815 815 $_data = Content::getLinkedContentUI("node_" . $hashed_node_id . "_content", "node_has_content", "node_id", $this->id, "portal"); 816 816 $html .= InterfaceElements::generateAdminSectionContainer("node_content", $_title, $_data); 817 817 818 818 // Name 819 819 $_title = _("Name"); … … 1453 1453 } 1454 1454 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 1459 1471 $retval = false; 1472 1460 1473 $id_str = $db->escapeString($id); 1461 1474 $sql = "SELECT * FROM nodes WHERE node_id='{$id_str}'"; 1462 1475 $row = null; 1463 1476 $db->execSqlUniqueRes($sql, $row, false); 1464 if ($row != null) 1465 {1477 1478 if ($row != null) { 1466 1479 $retval = true; 1467 1480 } 1481 1468 1482 return $retval; 1469 1483 } -
trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListHTML.php
r1082 r1088 133 133 134 134 // 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); 136 136 } 137 137 -
trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListJiWireCSV.php
r1073 r1088 100 100 101 101 // 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); 103 103 } 104 104 -
trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListRSS.php
r1031 r1088 107 107 108 108 // 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); 110 110 } 111 111 -
trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListXML.php
r1031 r1088 106 106 107 107 // 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); 109 109 } 110 110 -
trunk/wifidog-auth/wifidog/classes/Statistics.php
r1087 r1088 394 394 $sql_join = " JOIN node_stakeholders ON (nodes.node_id=node_stakeholders.node_id AND user_id='$user_id') "; 395 395 } 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)"; 397 397 $node_rows = null; 398 398 $db->execSql($sql, $node_rows, false); … … 599 599 $html .= "<div class='admin_element_tools'><input type='checkbox' name='$key' $checked /></div>\n"; 600 600 $html .= "<div class='admin_element_label'>$name</div>\n"; 601 601 602 602 $html .= "</li>\n"; 603 603 } -
trunk/wifidog-auth/wifidog/install.php
r1038 r1088 242 242 'note' => 'Required for RADIUS support' 243 243 ), 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 ), 244 250 'xmlrpc' => array ( 245 251 'needed' => 0, … … 404 410 function execVerbose($command, & $output, & $return_var) { 405 411 print "$command"; 406 $retval = exec($command.' 2>&1', & $output, & $return_var); 412 $retval = exec($command.' 2>&1', & $output, & $return_var); 407 413 if ($return_var != 0) { 408 414 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 42 42 43 43 // WiFiDOG skin 44 FCKConfig.SkinPath = FCKConfig.BasePath + ' ../../../content/HTMLeditor/';44 FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/'; 45 45 46 46 // Path to our CSS defenitions 47 FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../../../local_content/common/stylesheet.css'; 47 FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../../../media/base_theme/stylesheet.css'; 48 49 // Preload images 50 FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; 48 51 49 52 // Don't show script sources in source mode -
trunk/wifidog-auth/wifidog/node_list.php
r1031 r1088 91 91 } 92 92 93 // Check if ordering should ignore uppper and lower case 94 if ($sort_by_param == "name" || $sort_by_param == "node_id") { 95 $sort_by_param = "lower(" . $sort_by_param . ")"; 96 } 97 93 98 // Sort according to above instructions 94 99 if ($sort_by_using_sql === true) -
trunk/wifidog-auth/wifidog/templates/sites/index.tpl
r1079 r1088 70 70 *} 71 71 <p> 72 {if $networkNum OnlineUsers == 1}72 {if $networkNumValidUsers == 1} 73 73 {"The %s network currently has one valid user."|_|sprintf:$networkName} 74 74 {else}
