Changeset 1181
- Timestamp:
- 02/24/07 06:06:13 (6 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 2 modified
-
CHANGELOG (modified) (41 diffs)
-
wifidog/include/common.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/CHANGELOG
r1180 r1181 1 2007-02-24 Max Horvath <max.horvath@freenet.de> 2 * Fix ticket #300: SYSTEM_PATH not being respected in config.php. 3 1 4 2007-02-07 Damien Raude-Morvan <drazzib@drazzib.com> 2 * Fix ticket #298 : php-ldap module is lowercase in Dependencies array, update Dependencies::check() calls. 5 * Fix ticket #298 : php-ldap module is lowercase in Dependencies array, 6 update Dependencies::check() calls. 3 7 4 8 2007-02-05 Damien Raude-Morvan <drazzib@drazzib.com> 5 * Try to fix ticket #295 and #297 by including parent class (Content.php) in File.php. 6 * ... and remove unnecessary include of Avatar content type in User.php : All contents types are included by Content.php getAvailableContentTypes() call. 9 * Try to fix ticket #295 and #297 by including parent class (Content.php) in 10 File.php. 11 * ... and remove unnecessary include of Avatar content type in User.php: All 12 contents types are included by Content.php getAvailableContentTypes() call. 7 13 8 14 2007-01-28 François Proulx <francois.proulx@gmail.com> 9 15 * First iteration of user profiles completed. 10 16 * Need to improve Avatar admin UI 11 17 12 18 2007-01-19 Benoit Grégoire <bock@step.polymtl.ca> 13 19 * dump_initial_data_postgres.sh: Initial node wasn't setup correctly. 14 20 * INSTALL: Fix some obsolete instructions for database backup and restore 15 21 16 22 2007-01-18 Benoit Grégoire <bock@step.polymtl.ca> 17 23 * Updated french translation curtesy of http://zapquebec.org 18 24 19 25 2007-01-16 François Proulx <francois.proulx@gmail.com> 20 26 * ContentTypeFilter : Now supports filters stored in the DB, backward compatible … … 30 36 * It is now possible for an administrator to manually validate or lock-out a user 31 37 * Add new SimpleString content type 32 * SmartyWifidog.php: Fix #282 with a slightly dirty workround to the chicken and the egg smarty variables assignment problem. 38 * SmartyWifidog.php: Fix #282 with a slightly dirty workround to the chicken and the egg smarty variables assignment problem. 33 39 We now extend the fetch method and do our assignment there instead of in the constructor. 34 40 35 41 2007-01-15 Benoit Grégoire <bock@step.polymtl.ca> 36 42 * Sync initial schema and translations … … 40 46 * Dependencies.php, AuthenticatorRadius.php: Fix bug #287 (Dependencies not being detected properly) 41 47 * Content.php: Make hasDisplayableMetadata() consider Authors, and make it a bit faster. 42 48 43 49 2007-01-13 Benoit Grégoire <bock@step.polymtl.ca> 44 50 * Content.php: Add setUserUIMainDisplayContent() and setUserUIMainInteractionArea() 45 51 to simplify writing subclasses and port all content subclasses to the new API. 46 * Content.php: Add a new callcack method, isTextualContent(), to be used by 52 * Content.php: Add a new callcack method, isTextualContent(), to be used by 47 53 ContentFilters. Indicates that the content is suitable to store plain text. 48 * ContentGroup.php: No longer warn about empty ContentGroup in getUserUI(), 54 * ContentGroup.php: No longer warn about empty ContentGroup in getUserUI(), 49 55 as this may now be perfectly normal if all content has expired. 50 56 * Rework the classes and css for user_ui_main_outer, isSimpleContent has been 51 57 eliminated and hasDisplayableMetadata is now defined is metadata is available. 52 This should allow better HTML consistency and simpler CSS, and be closer to what 58 This should allow better HTML consistency and simpler CSS, and be closer to what 53 59 people expect by default. Content without metadata will display without 54 60 borders or background, and without margins when inside another content. 55 * smarty.resource.string.php: Add a setter function, 61 * smarty.resource.string.php: Add a setter function, 56 62 smarty_resource_string_add_string() that must be used before calling the smarty 57 63 function. Using the name as the the template was far to brittle. This makes 58 64 the SmartyTemplate content much more reliable, and quite possibly faster. 59 * ShoutBox: A very basic but already extensible implementation of the 60 shoutbox use case. Shows the last five shouts. Can connect to another web 65 * ShoutBox: A very basic but already extensible implementation of the 66 shoutbox use case. Shows the last five shouts. Can connect to another web 61 67 site through a javascript extension. 62 * SimpleSmartyTemplate: Add a simple version of the SmartyTemplate content 68 * SimpleSmartyTemplate: Add a simple version of the SmartyTemplate content 63 69 type 64 70 65 71 2007-01-03 Benoit Grégoire <bock@step.polymtl.ca> 66 72 * FormSelectGenerator.php: Fix incorrect $this reference in isPresent(). The bug would only manifest … … 73 79 * Cache.php: Performance optimization when caching is disabled. 74 80 * Fix bug where num online users in the portal was broken. 75 81 76 82 2007-01-02 François Proulx <francois.proulx@gmail.com> 77 83 * Updated the SQL schema initial schema 78 84 79 85 2006-12-31 Benoit Grégoire <bock@step.polymtl.ca> 80 86 * More Smarty cleanup 81 * Content.php: Bugfix: metadata wasn't deleted along with the rest of the 87 * Content.php: Bugfix: metadata wasn't deleted along with the rest of the 82 88 content upon deletion. 83 89 84 90 2006-12-30 Benoit Grégoire <bock@step.polymtl.ca> 85 91 * install.php: Move path verification to the first page, and make it clearer. Fix PHP warnings. 86 92 * wifidog/include/smarty.resource.string.php: A smarty resource plugin to parse a smarty template from a string 87 * SmartyTemplate: Very basic but functionnal commit of the new Smarty content type. 93 * SmartyTemplate: Very basic but functionnal commit of the new Smarty content type. 88 94 IMPORTANT NOTE: This will eventually obsolete IFrameRest, which will be removed. 89 95 * Continue cleaning-up/standardizing Smarty variable usage. 90 96 91 97 2006-12-12 Benoit Grégoire <bock@step.polymtl.ca> 92 98 * Fix all PHP 5.2 compatibility issues I could find. This needs further testing … … 96 102 97 103 2006-12-12 Benoit Grégoire <bock@step.polymtl.ca> 98 * install.php, Dependencies.php: Centralize Dependency detection (next is to centralize 104 * install.php, Dependencies.php: Centralize Dependency detection (next is to centralize 99 105 dependency installation code). 100 106 * config.php: Remove more obsolete config directives. … … 103 109 * install.php: Fix a few problems caused by obsolete magpierss detection code. 104 110 * install.php, config.php: Remove the obsolete PHLICKR_SUPPORT option. 105 111 106 112 2006-11-30 Benoit Grégoire <bock@step.polymtl.ca> 107 113 * schema_validate.php: Mute annoying ob_flush() notices. 108 114 * Node.php: Add missing default parameter to getSelectNodeUI() 109 * get_stylesheet: Fix date calculations that broke download. 110 115 * get_stylesheet: Fix date calculations that broke download. 116 111 117 2006-11-29 Benoit Grégoire <bock@step.polymtl.ca> 112 118 Sync with my main developpement environement: 113 119 * Performance optimization pass: Collect a few low hagning fruits 114 by implementing basic instance caching for classes Server, Network, Nodes, Content and User. 115 It's no replacement for a real ORM, but is cuts way down on duplicate SQL queries and 120 by implementing basic instance caching for classes Server, Network, Nodes, Content and User. 121 It's no replacement for a real ORM, but is cuts way down on duplicate SQL queries and 116 122 object instanciation for a single request. 117 123 * Langstring.php: Slight performance optimization for admin interface, support for proper modification date. … … 122 128 * Node.php, Utils.php: Sort by case insensitive name, and show gateway id in node selectors 123 129 * BannerAdGroup.php: Support group constraint of image size for all images in the group. 124 * ContentReport.php: Finish basic content reporting. 125 Note that for content that displayed before the logging fixes commited 2006-11-14, the display count will be underestimated: 130 * ContentReport.php: Finish basic content reporting. 131 Note that for content that displayed before the logging fixes commited 2006-11-14, the display count will be underestimated: 126 132 Display before then was only counted once per user per node. Also File clickthrough wasn't logged (includes hyperlinked pictures). 127 133 * Content.php: Implement a Key-Value Pair infrastructure. In the future, this will often allow adding new content types without 128 134 having to modify the schema. See the Content class documentation. 129 135 * Fix various small UI issues. 130 136 131 137 2006-11-29 Benoit Grégoire <bock@step.polymtl.ca> 132 138 * common.php: Fix the value of SESS_NODE_ID_VAR, it got overwritten by SESS_GW_ID_VAR. 133 139 Caused problems with logout. 134 140 135 141 2006-11-27 Benoit Grégoire <bock@step.polymtl.ca> 136 * Try to fix #270: 142 * Try to fix #270: 137 143 * DateTime.php: Rename class to DateTimeWD because of the stunt they pulled in PHP 5.2 138 144 * Content and derived classes: Make all constructors protected. … … 140 146 2006-11-26 Benoit Grégoire <bock@step.polymtl.ca> 141 147 * lost_username.tpl, lost_password.tpl, resend_validation.tpl: Fix #259 by commenting out 142 all Javascript. I hate removing outside contributions, but the lost_username, 143 lost password and re-send validation email have been broken for months and no one 148 all Javascript. I hate removing outside contributions, but the lost_username, 149 lost password and re-send validation email have been broken for months and no one 144 150 stepped-in to fix it. 145 151 146 152 2006-11-23 Benoit Grégoire <bock@step.polymtl.ca> 147 153 * Fix bug in node creation … … 149 155 * Clarify error messages and description for the geocoder. 150 156 * Make the google-map locator for nodes use the network center coordinates. 151 This change makes it usable when you didn't use the geocoder first. 157 This change makes it usable when you didn't use the geocoder first. 152 158 * Show the gateway id in the technical nodelist. 153 159 154 160 2006-11-22 Benoit Grégoire <bock@step.polymtl.ca> 155 161 * Fix minor problems with template using obsolete constants 156 162 * Delete a bunch of unused templates 157 163 158 164 2006-11-22 Benoit Grégoire <bock@step.polymtl.ca> 159 165 * Fix broken auth 160 166 * Fix broken portal when called from gateway 161 167 162 168 2006-11-22 Benoit Grégoire <bock@step.polymtl.ca> 163 169 * Major schema update (this one is going to make your database grind for a while, sorry 164 170 about that...) 165 Fix a long standing design problem with the node table, where the ID could be changed. 171 Fix a long standing design problem with the node table, where the ID could be changed. 166 172 This caused performance problems when replacing gateways, and caused problems when 167 173 exporting data to other systems. Among other things, it will allow us to finally 168 174 finish the JiWire output. 169 175 * Stylesheet.php: New content type. Takes advantage of two pass content display to create stylesheets to be used only at a specific node, or with a specific content. 170 176 171 177 2006-11-21 Benoit Grégoire <bock@step.polymtl.ca> 172 178 * Change schema update method. Will now do one transaction … … 175 181 starting over when there is a problem. 176 182 Fixes schema update problems with the last commit 177 183 178 184 2006-11-21 Benoit Grégoire <bock@step.polymtl.ca> 179 185 * RssAggregator.php: At long last, sync with FeedPressReview 2.0 180 186 http://projects.coeus.ca/feedpressreview/ (formerly rsspressreview) and 181 187 make most of it's features directly available from the web interface. 182 This gives us: 188 This gives us: 183 189 -Now based on SimplePie http://simplepie.org/ (magpie was no longuer maintained) 184 190 -Now unobtrusively displays almost all item and feed metadata … … 189 195 -More real-estate efficient, and improved UI 190 196 The admin interface is now also more real-estate efficient (uses the hover help code commited by François that no one used yet). 191 197 192 198 Warning: This changes the dependencies of the auth server. Your RSS feeds will be disabled untill you re-run the install script. 193 199 * gw_message.php: Fix validation period not being displayed. … … 202 208 * File.php: Clickthrough weren't logged, DOH! 203 209 * User.php: Error message on validation expired didn't properly output the validation grace time. 204 * Statistics.php: Fix #271: Getting statistics for a single MAC address was broken. 210 * Statistics.php: Fix #271: Getting statistics for a single MAC address was broken. 205 211 * NodeListXML.php: Small patch by Josephus to add the number of online users 206 212 * Improve CPU usage of the content manager 207 213 * AbstractDb: Fix query time not being displayed in debug mode if profiling was turned off. 208 214 Add total execution time statistics. 209 * Fix logging of content clickthrough and display. Unique users and node data is reliable for existing data. 215 * Fix logging of content clickthrough and display. Unique users and node data is reliable for existing data. 210 216 Number of prints is underestimated (repeat prints for the same user, same content at same node didn't get counted) 211 for data before this patch. 217 for data before this patch. 212 218 Same with number of clickthrough for File content types and derivatives (picture, etc.). 213 219 * ContentReport.php: Add content report (does not support most options yet, but still very usefull). 214 220 215 221 2006-11-13 Benoit Grégoire <bock@step.polymtl.ca> 216 222 * Make the MainUI, SmartyWifidog and Session and AbstractDb classes singletons 217 * Implement two pass content display. All Content can now implement a prepareGetUserUI(), allowing them to interact with MainUI and other Content before display. 218 Allow creating content such as stylesheets, feed accumulators, etc. 223 * Implement two pass content display. All Content can now implement a prepareGetUserUI(), allowing them to interact with MainUI and other Content before display. 224 Allow creating content such as stylesheets, feed accumulators, etc. 219 225 * SmartyWifidog.php Turn on security, begin preparing for standardisation of Smarty variables 220 226 * New Content type: Stylesheet. Allows specific nodes, or even specific content groups to have custom stylesheets. … … 223 229 2006-11-11 Benoit Grégoire <bock@step.polymtl.ca> 224 230 * Authenticator.php: Critical: Fix SQL query syntax in acctStart() 225 231 226 232 2006-11-07 Benoit Grégoire <bock@step.polymtl.ca> 227 233 * install.php: Fix password generation I inadvertently broke. Remove misleading info about SSL 228 234 229 235 2006-11-07 Benoit Grégoire <bock@step.polymtl.ca> 230 * install.php: Put an end of line after the password, make it easier to read. 236 * install.php: Put an end of line after the password, make it easier to read. 231 237 Make the install script check the permissions of lib/smarty/plugins directory to avoid smarty errors 232 238 * Statistics.php: A little gift for France wireless: Make aggregate statistics available across networks 233 239 234 240 2006-11-07 Benoit Grégoire <bock@step.polymtl.ca> 235 241 * Fix # 268, #269 as well as greg's problems by moving all token and registration date arithmetics 236 to the database, and standardize on SQL-standard CURRENT_TIMESTAMP. 237 Fixes operational problems when PHP and PostGres don't have the same timezone 238 (which appears to be the case on Fedora by default). 242 to the database, and standardize on SQL-standard CURRENT_TIMESTAMP. 243 Fixes operational problems when PHP and PostGres don't have the same timezone 244 (which appears to be the case on Fedora by default). 239 245 Note that the page.php script still has PHP date arithmetics, but at least should be self-consistent. 240 246 … … 251 257 * Some documentation updates for content filters 252 258 * Content.php: Add isNotContentType() method. 253 259 254 260 2006-09-07 Benoit Grégoire <bock@step.polymtl.ca> 255 261 * Access to the Content manager was broken for normal users, again. … … 319 325 * Sync schemas 320 326 321 2006-09-03 Max Horváth <max.horvath@ maxspot.de>327 2006-09-03 Max Horváth <max.horvath@freenet.de> 322 328 * The term SPLASH_ONLY_USER displayed to people visiting the portal has been 323 329 replaced by the more meaningful term "anonymous user" (fixes #106) … … 333 339 * Show descriptive status of node (fixes #241) 334 340 335 2006-09-02 Max Horváth <max.horvath@ maxspot.de>341 2006-09-02 Max Horváth <max.horvath@freenet.de> 336 342 * Installation script checks for PHP session extension (fixes #139) 337 343 * Removed "Call-time pass-by-reference has been deprecated" warnings … … 369 375 content) 370 376 371 2006-08-29 Max Horváth <max.horvath@ maxspot.de>377 2006-08-29 Max Horváth <max.horvath@freenet.de> 372 378 * Cleaned up PHPdoc tags 373 379 * Updated german translation … … 379 385 * Fix #225 (For both nodes and networks) 380 386 381 2006-08-28 Max Horváth <max.horvath@ maxspot.de>387 2006-08-28 Max Horváth <max.horvath@freenet.de> 382 388 * Integrated KML node list export 383 389 * Integrated PDF node list export … … 694 700 * Cleaned up a bunch of stale TODOs 695 701 696 2006-03-16 Max Horváth <max.horvath@ maxspot.de>702 2006-03-16 Max Horváth <max.horvath@freenet.de> 697 703 * updated language files (new german strings have already been translated) 698 704 * added LDAP authentication … … 716 722 * incoming_outgoing_swap.php: Delete file, closes #85 717 723 718 2006-03-09 Max Horváth <max.horvath@ maxspot.de>724 2006-03-09 Max Horváth <max.horvath@freenet.de> 719 725 * fixed small bug in the InterfaceElements class 720 726 * fixed PHP notices in portal/index.php and Locale class … … 724 730 template if a user calls the portal from a hotspot or not 725 731 726 2006-03-08 Max Horváth <max.horvath@ maxspot.de>732 2006-03-08 Max Horváth <max.horvath@freenet.de> 727 733 * fixed small bug where clicking on the start button at the portal page 728 734 didn't open the wifidog portal, but the requested page … … 730 736 * updated PHPdoc generating script 731 737 732 2006-03-07 Max Horváth <max.horvath@ maxspot.de>738 2006-03-07 Max Horváth <max.horvath@freenet.de> 733 739 * init_php.php now does a 100% strict check for variable types of 734 740 elements to be processed when magic_quotes are turned on … … 754 760 * on node administration page owners have less rights than admins 755 761 756 2006-03-02 Max Horváth <max.horvath@ maxspot.de>762 2006-03-02 Max Horváth <max.horvath@freenet.de> 757 763 * converted PNGs to GIFs because Internet Explorer cannot handle alpha 758 764 transparency of PNGs 759 765 760 2006-02-28 Max Horváth <max.horvath@ maxspot.de>766 2006-02-28 Max Horváth <max.horvath@freenet.de> 761 767 * the content selector for an owner could produce notices 762 768 * the button add existing content in the content manager will only be shown … … 793 799 * class MainUI now also delivers $isOwner variable for Smarty 794 800 795 2006-02-26 Max Horváth <max.horvath@ maxspot.de>801 2006-02-26 Max Horváth <max.horvath@freenet.de> 796 802 * Hotspots map page now uses a direct Javascript call for the link 797 803 "Show me on the map" (resulting in the browser not jumping to the top of … … 807 813 * RSS feed of hotspot status page now gets announced in browser 808 814 809 2006-02-25 Max Horváth <max.horvath@ maxspot.de>815 2006-02-25 Max Horváth <max.horvath@freenet.de> 810 816 * fixed undefined variable bugs in statistic classes (use of date_from and 811 817 date_to), variables were processed directly from request, without any … … 867 873 * Hotspots map page now uses a Smarty template to render HTML page 868 874 869 2006-02-21 Max Horváth <max.horvath@ maxspot.de>875 2006-02-21 Max Horváth <max.horvath@freenet.de> 870 876 * fixed access restriction for HTMLeditor in templates folder 871 877 * fixed XML error in HTMLeditors CSS and HTML templates … … 877 883 deployed/operational nodes for 5 minutes) 878 884 879 2006-02-17 Max Horváth <max.horvath@ maxspot.de>885 2006-02-17 Max Horváth <max.horvath@freenet.de> 880 886 * refactored lost username site - now it also includes the help toolbox 881 887 * lost username page now focuses input field automaticly (like on login or … … 889 895 automaticly (like on login or signup page) 890 896 891 2006-02-16 Max Horváth <max.horvath@ maxspot.de>897 2006-02-16 Max Horváth <max.horvath@freenet.de> 892 898 * added full PHPdoc documentation to Mail class 893 899 * added more temporary-email-address-providers to the black-list … … 899 905 translation file generation 900 906 901 2006-02-15 Max Horváth <max.horvath@ maxspot.de>907 2006-02-15 Max Horváth <max.horvath@freenet.de> 902 908 * Login site now uses a Smarty template to render HTML page 903 909 904 2006-02-14 Max Horváth <max.horvath@ maxspot.de>910 2006-02-14 Max Horváth <max.horvath@freenet.de> 905 911 * converted Session class to PHP5 style 906 912 * moved code used used to init PHP into wifidog/include/init_php.php … … 932 938 file 933 939 934 2006-02-04 Max Horváth <max.horvath@ maxspot.de>940 2006-02-04 Max Horváth <max.horvath@freenet.de> 935 941 * MainUI class now uses Smarty templates to render HTML pages 936 942 * display of debug messages by using $_REQUEST['debug_request'] on any … … 963 969 more meaningfull output 964 970 965 2006-01-29 Max Horváth <max.horvath@ maxspot.de>971 2006-01-29 Max Horváth <max.horvath@freenet.de> 966 972 * WiFiDog now detects APC PHP cache and eAccelerator PHP cache and disables 967 973 both PHP caches, because WiFiDog currently doesn't run with either of … … 978 984 * fixed error messages not displaying technical support e-mail address 979 985 980 2006-01-25 Max Horváth <max.horvath@ maxspot.de>986 2006-01-25 Max Horváth <max.horvath@freenet.de> 981 987 * a notice message regarding timezones was being displayed when running PHP 982 988 5.1.0+ due to rewritten date functions of PHP. There is a new config flag … … 992 998 cannot be found for some reason. 993 999 994 2006-01-23 Max Horváth <max.horvath@ maxspot.de>1000 2006-01-23 Max Horváth <max.horvath@freenet.de> 995 1001 * Removed compiled PHPdoc documentation 996 1002 * moved createDoc.sh to "doc" directory, documentation can be generated on … … 1019 1025 refresh() subr, tweaked language 1020 1026 1021 2006-01-09 Max Horváth <max.horvath@ maxspot.de>1027 2006-01-09 Max Horváth <max.horvath@freenet.de> 1022 1028 * createDoc.sh: added description of how to install requirements 1023 1029 … … 1069 1075 * Tested the new Phlickr package, which fixes URL on Flickr 1070 1076 1071 2005-12-28 Max Horváth <max.horvath@ maxspot.de>1077 2005-12-28 Max Horváth <max.horvath@freenet.de> 1072 1078 * Removed BASEPATH define from source - resulting in a better 1073 1079 require-overview … … 1090 1096 * Synched SQL for CVS schema 29 --> 33 1091 1097 1092 2005-12-26 Max Horváth <max.horvath@ maxspot.de>1098 2005-12-26 Max Horváth <max.horvath@freenet.de> 1093 1099 * added new headers to every source file 1094 1100 * converted file to represent a tab as four (4) spaces … … 1099 1105 * added caching support to content classes Langstring and TrivialLangstring 1100 1106 1101 2005-12-15 Max Horváth <max.horvath@ maxspot.de>1107 2005-12-15 Max Horváth <max.horvath@freenet.de> 1102 1108 * fixed bug in dependencies class when gettext support for PHP is not 1103 1109 available 1104 1110 1105 2005-12-14 Max Horváth <max.horvath@ maxspot.de>1111 2005-12-14 Max Horváth <max.horvath@freenet.de> 1106 1112 * fixed bug in config.php:59 ... was unable to select DB server 1107 1113 1108 2005-12-08 Max Horváth <max.horvath@ maxspot.de>1114 2005-12-08 Max Horváth <max.horvath@freenet.de> 1109 1115 * added FCKeditor to the supported libraries 1110 1116 * added new content type: HTMLeditor … … 1116 1122 caching class 1117 1123 1118 2005-12-06 Max Horváth <max.horvath@ maxspot.de>1124 2005-12-06 Max Horváth <max.horvath@freenet.de> 1119 1125 * fixed SQL bug when calling the "report configuration" page as a node owner 1120 1126 … … 1122 1128 * Crunched the Google Maps Div block for better display on small screens 1123 1129 1124 2005-12-05 Max Horváth <max.horvath@ maxspot.de>1130 2005-12-05 Max Horváth <max.horvath@freenet.de> 1125 1131 * fixed bug when calling the preview version of a login page 1126 1132 … … 1138 1144 * EventLogging class initial checkin 1139 1145 1140 2005-11-14 Max Horváth <max.horvath@ maxspot.de>1146 2005-11-14 Max Horváth <max.horvath@freenet.de> 1141 1147 * fixed path to included classes 1142 1148 Guys, please check the paths to included files twice next time you're … … 1166 1172 * Fixed online users link to statistics 1167 1173 1168 2005-11-01 Max Horváth <max.horvath@ maxspot.de>1174 2005-11-01 Max Horváth <max.horvath@freenet.de> 1169 1175 * added german translation 1170 1176 * modified gen.sh to include geocoder and statistics classes for the -
trunk/wifidog-auth/wifidog/include/common.php
r1175 r1181 1 1 <?php 2 3 2 4 3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ … … 47 46 */ 48 47 require_once ('init_php.php'); 48 49 /** 50 * Include configuration file 51 */ 52 53 function cmnSearchParentDirectories($dirname, $searchfor) 54 { 55 $pieces = explode(DIRECTORY_SEPARATOR, $dirname); 56 $is_absolute = substr($dirname, 0, 1) === DIRECTORY_SEPARATOR ? 1 : 0; 57 58 for ($i = count($pieces); $i > $is_absolute; $i--) { 59 $filename = implode(DIRECTORY_SEPARATOR, array_merge(array_slice($pieces, 0, $i), array ($searchfor))); 60 61 if (file_exists($filename)) { 62 return $filename; 63 } 64 } 65 66 return false; 67 } 68 69 function cmnRequireConfig($config_file = 'config.php') 70 { 71 global $AVAIL_LOCALE_ARRAY; // so that nobody has to change their custom config.php 72 73 $config_path = cmnSearchParentDirectories(dirname(__FILE__), $config_file); 74 75 if (!empty ($config_path)) { 76 require_once ($config_path); 77 } 78 } 79 80 cmnRequireConfig(); 81 49 82 /** 50 83 * Include path detection code … … 52 85 require_once ('path_defines_base.php'); 53 86 54 /**55 * Include configuration file56 */57 /** search parent directory hierarchy for a file */58 function cmnSearchParentDirectories($dirname, $searchfor) {59 $pieces = explode(DIRECTORY_SEPARATOR, $dirname);60 $is_absolute = substr($dirname, 0, 1) === DIRECTORY_SEPARATOR ? 1 : 0;61 62 for ($i = count($pieces); $i > $is_absolute; $i--) {63 $filename = implode(DIRECTORY_SEPARATOR, array_merge(array_slice($pieces, 0, $i), array (64 $searchfor65 )));66 if (file_exists($filename))67 return $filename;68 }69 70 return false;71 }72 function cmnRequireConfig($config_file = 'config.php') {73 global $AVAIL_LOCALE_ARRAY; // so that nobody has to change their custom config.php74 $config_path = cmnSearchParentDirectories(dirname(__FILE__), $config_file);75 if (!empty ($config_path))76 require_once ($config_path);77 }78 cmnRequireConfig();79 87 /** 80 88 * Load required classes … … 82 90 require_once ('classes/AbstractDb.php'); 83 91 AbstractDb::getObject();//This is here so we get reliable SQL vs PHP profiling 84 92 85 93 require_once ('classes/Locale.php'); 86 94 require_once ('classes/Dependencies.php'); … … 92 100 'print' => new PrintChannel(new HTMLFormatter(), 'warning,notice', null, true), 'debug' => new PrintChannel(new HTMLCommentsFormatter(), '=debug', null, false))); 93 101 } 102 94 103 /** 95 104 * Filter super globals
