Project

General

Profile

« Previous | Next » 

Revision 417

Added by doc almost 18 years ago

Updated some core files to allow the configuration of PHPMailer via the admin settings panel instead of config.php. PHPMailer related settings are now stored in the Website Baker database. The following settings can be configured:
SMTP-host, SMTP-authentification , SMTP-password and SMTP-username.

View differences:

trunk/CHANGELOG
1
Change Log
2
===============================================================================
3
Please note: This change log may not be accurate
4

  
5
$Id$
6

  
7
Legend:
8
+ = Added
9
- = Removed
10
# = Bugfix
11
! = Update/Change
12

  
13
------------------------------------- 2.7.0 -------------------------------------
14
21-Jan-2007 Matthias Gallas
15
#	Fixed issue in the search table entries of form modul
16
13-Jan-2007 Matthias Gallas
17
#	Fixed some bugs in rss.php
18
07-Jan-2007 Matthias Gallas
19
#	Fixed error when uninstalling the news modul
20
02-Jan-2007 Matthias Gallas
21
+   Added id keywords to all missing files
22
#	Fixed issue with Permissions for pages sections
23
27-Dec-2006 Matthias Gallas
24
#	Fixed form modul stores empty records
25
------------------------------------- 2.6.5 -------------------------------------
26
25-Dec-2006 Ryan Djurovich
27
!	Changed links to WB help website
28
24-Dec-2006 Matthias Gallas
29
#	Fixed some minor javascript errors in admin (thanks to pcwacht)
30
#	Fixed root_parent doesn't get updated when moving item in menu (#305)
31
!	Changed all copyright notices to include now 2007
32
23-Dec-2006 Matthias Gallas
33
#	Fixed IE allows to set a page as parent of itself (#320)
34
#	Fixed problem with Page Title has to be escaped (#287)
35
#	Fixed the possibility to call the index.php of the templates directly in the browser (#291)
36
21-Dec-2006 Matthias Gallas
37
#	Fixed missing message when adding a site without page title (#300)
38
21-Dec-2006 Ryan Djurovich
39
#	Fixed bug with captcha script (#346)
40
20-Dec-2006 Matthias Gallas
41
#	Fixed Return to Search Results Page (#365)
42
!	Set Version to 2.6.5
43
-	Removed Changeset 365 because this will be a part of WB 2.7.x
44
#	Fixed a little typo error in class.admin.php (#364)
45
26-Nov-2006 Ryan Djurovich
46
+	Added new script that could possibly be apart of 2.7.x as a replacement
47
	for having the pages directory 
48
17-Nov-2006 Matthias Gallas
49
#	Fixed fatal error in line 46 news/comment.php (thanks to eki)(#358)
50
15-Nov-2006 Matthias Gallas
51
#	Fixed again intropage doesn't work (#71)
52
20-Oct-2006 Matthias Gallas
53
+	Added phpmailer class (thanks to doc)
54
+	Added Remember-expanded-pages-in-admin (thanks to ephraimt)
55
+	Added List sorting in admin area (thanks to rsmith)
56
#	Fixed table width 100% are wrong displayed in container templates
57
	when IE is used (#350)
58
#	Fixed large space between menupoints in IE (#349)
59
#	Fixed Website description is not displayed when no page description
60
	available (#348)
61
#	Fixed group images in news modul cannot be stored (#342)
62
#	Fixed Typo in form/save_field.php (#341)
63
#	Fixed files in /pages/posts folder are not deleted (#340)
64
#	Fixed specialchars problem in the news modul (#339)
65
#	Fixed news modul stores empty records (#338)
66
#	Fixed Captcha didn't work in news comments (#337)
67
#	Fixed various php notices (#334)
68
+	Added new upgrade_function (thanks to kozmoz)
69
#	Fixed addons table isn't updated when a modul is updated (#332)
70
#	Fixed spelling errors in the signup2.php (#330)
71
#	Fixed MySQL 5.x missing default values for INT fields in all system
72
	and modules tables (#329)
73
#	Fixed installer does not insert admin user (#328)
74
+	Added support for getting page ID of page that referred search
75
	request (#327) (thanks to brofield)
76
#	Fixed search results generate invalid XHTML and notify warnings (#326)
77
Stefan Braunewell
78
#	Fixed Field 'last_reset' doesn't have a default value (#313)
79
+	Added get_post_escaped to wb class which automatically calls add_slashes
80
	on get_post output and used it in form/save_field.php
81
------------------------------------- 2.6.4 -------------------------------------
82
20-May-2006 Ryan Djurovich
83
#	Fixed security issues related to #237
84
#	Fixed typo in news save comment page (#282)
85
#	Fixed typo in news delete post page (#283)
86
!	Added multi-submission protection to form module (#119)
87
#	Added notice for when PHP Session Support appears to be disabled in installer,
88
	even if it is enabled and the problem actually lies in the users browser (#154)
89
19-May-2006 Ryan Djurovich
90
#	Fixed problem in forgotten login form where email field is too short (#207)
91
#	Fixed typo in forgotten login details email (#190)
92
15-May-2006 Stefan Braunewell
93
#	Fixed security issues (#237)
94
03-May-2006 Stefan Braunewell
95
#	Fixed problems with pre-2.6.0 modules in section list
96
#	Fixed e-mail bug caused by From: headers in internal mail function calls
97
	(#189)
98
#	E-mail validation in install script now accepts new top-level domains
99
	(#162)
100
#	Error status is now overwritten by next database query (#182)
101
#	Fixed obscure problem in htmlarea install script
102
------------------------------------- 2.6.3 -------------------------------------
103
19-Mar-2006 Stefan Braunewell
104
#	Fixed ticket #146: problems removing groups from viewers list of a page
105
16-Mar-2006 Stefan Braunewell
106
!	Changed link target selection. Now self, top and new. (Ticket #145)
107
#	Fixed ticket #143. Charset setting is now used in admin login and forgot
108
	password pages.
109
#	Some changes to the SQL code in the install script for improved 
110
	compatibility with new MySQL versions
111
#	Fixed ticket #134 - error on browsing media.
112
+	Improved backup module: new choice between full database or WB-related
113
	backup.
114
#	Fixed ticket #141 - admin now sees all folders in media
115
#	Fixed e-mail sending problems due to additional parameter in mail call.
116
#	Applied fix regarding ticket #138: new users now get deleted if
117
	sending e-mail fails.
118
#	Fixed ticket #137: Last Reset timer not reset in frontend forgotten 
119
	password process
120
#	Removed duplicate expression from modules/news/install.php which caused
121
	problems in installation
122

  
123
01-Mar-2006 Stefan Braunewell
124
#	Fixed ticket #68 - Safari problem with displaying all parents.
125
#	Fixed ticket #136 - mailing forgotten password in admin login screen leads 
126
	to fatal error.
127
!	Renamed tag [PROCESSTIME] to [PROCESS_TIME]
128
------------------------------------- 2.6.2 -------------------------------------
129
03-Feb-2006 Stefan Braunewell (very big special thanks to John and Alex)
130
#	Fixed ticket #104 - commas in form field descriptions not allowed.
131
#	Cookie REMEMBER_KEY wasn't cleared in account/logout 
132
	and expiration date is now set to time in the past.
133
#	Smart login not working.
134
!	Changed mail calls to new function $wb->mail.
135
#	Form: ticket 124 added captcha settings check 
136
#	Ticket 118 added formfield type to check for email/text 
137
#	Ticket 115 changed comparision /modules/form/view.php 
138
#	Added correct timecheck in form submissions
139
!	Changed captcha.php call to include timestamp
140
!	Changed the e-mail validation code and added a mail function to class wb.
141
!	Forgotten password: if sending of e-mail fails, restore old password.
142
	Ticket #110
143
!	Added more charset options. Ticket #102 - thanks to ruebenwurzel!
144
!	Character encoding setting also affects admin backend.
145
	Mentioned in ticket #102.
146
!	Reintroduced page languages setting. If switched to off, page
147
	languages are only used to determine the language file for the
148
	universal texts. If on, displayed page and menu are affected by
149
	the language session variable.
150
#	Fixed bugs in show_breadcrumbs code and added parameter "depth"
151
	to set the number of levels to be show.
152
#	Fixed a bug where access settings of registered and private pages
153
	were displayed incorrectly.
154
#	Fixed captcha being cached.
155
#	Added an exit call after every heading("Location:...")
156
	redirector to prevent unwanted execution of code.
157
#	Bug #122. Replaced empty field check by check that setting name is
158
	not "wb_version".
159
#	Replaced all remaining occurrences of '/media' by MEDIA_DIRECTORY - bug #108.
160
#	Fixed bug #99 and two additional instances of typo 
161
	catpcha instead of captcha.
162
#	Fixed some typos
163
#	Fixed some notices and warnings.
164
#	Fixed bug #105 - back buttons in addon detail pages not editable.
165
!	Replace 'admin' by 'wb' in all account pages. 
166
!/#	Moved print_success and print_error code to class.wb.php.
167
	Added correct parameters to these functions in account pages. 
168
------------------------------------- 2.6.1 -------------------------------------
169
12-Dec-2005 Ryan Djurovich
170
#	Fixed security vulnerability in class.login.php
171
#	Fixed typo in EN language file
172
#	Fixed captcha problems (when feature is disabled) in form module and sign-up
173
!	Added charset encoding to admin templates
174
!	Added extra code to check for selection of addon upon uninstalling
175
#	Fixed bugs in RSS news feeder
176
#	Fixed bug with PAGE_DESCRIPTION not being set on any page
177
------------------------------------- 2.6.0 -------------------------------------
178
28-Nov-2005 Ryan Djurovich
179
+	Added default charset option to (advanced) settings
180
#	Form module email fields now have email address validation
181
#	Fixed spacing in form submissions
182
27-Nov-2005 Ryan Djurovich
183
+	Added captcha verification to sign-up form
184
+	Added Captcha to News module
185
24-Nov-2005 Stefan Braunewell
186
!	Applied aportale's patch to use label instead of javascript toggle code
187
20-Nov-2005 Ryan Djurovich
188
!	News mod now hides read more link if no need for it (see ticket #56)
189
+	Added support for mailto: links in the menu link mod
190
#	Added direct-access redirection on some files (see ticket #37)
191
+	Added extra characters to convert.php (see ticket #64)
192
#	Fixed ticket #65 (last_reset check in account/forgot_form.php)
193
29-Sep-2005 Ryan Djurovich
194
!	Cleaned up form buttons in Settings
195
!	Moved some options into Advanced Settings
196
#	Semi-disabled "separate" page trash option
197
+	Created a backup module/tool for backing-up the database
198
	(thanks to John (pcwacht) for the original code)
199
+	Created new "blank template", which can be used in case where you don't
200
	want anything wrapping page-content.
201
19-Sep-2005 Ryan Djurovich
202
+	Added _license field for all add-ons to specify a license
203
!	Renamed _designed_for variables (for all addons) to _platform
204
+	Created addons table for faster internal referencing of installed addons
205
!	Fixed some links, including the "Help" button in Admin
206
#	Used nl2br to display body correctly when viewing form-submissions
207
15-Sep-2005 Stefan Braunewell
208
+	Added table module with columns 'name','type' and 'directory' as an
209
	index.
210
+	Added entry to settings table 'wb_version' which holds the version
211
	number and can be utilized in future upgrade scripts.
212
!	Added upgrade functionality also for templates and languages.
213
#/!	Template/modules installation now respects paths.
214
!	Moved updates from config.php to database.
215
	Created initialize.php (required by config.php) to read settings.
216
11-Sep-2005 Stefan Braunewell
217
!	HTMLArea is now a module instead of a core component. Files moved
218
	from "include" to "modules".
219
+	Implemented Installation of modules on top of an older version. This is 
220
	done via checking $module_version. Instead of install.php, upgrade.php
221
	is then called if it exists in the module package. 
222
	For module developers: $module_version and $new_module_version are 
223
	accessible in upgrade.php to find out what upgrade steps need to be taken.
224
!	Changed column names in mod_news_posts from short,long to content_short,
225
	content_long.
226
09-Sep-2005 Stefan Braunewell
227
+	Added new advanced setting "Rename Files On Upload". File extensions can be
228
	given so that respective files will have a ".txt" appended on media upload.
229
#	Fixed "None found" message bug when user has no top level page edit
230
	rights.
231
#	Fixed missing parent option 'none' - ticket #12 - and a minor scope bug.
232
+	Added breadcrumbs code. Call using $wb->breadcrumbs().
233
+	Added utf-8 character encoding meta tag into all stock templates.
234
#	Fixed bug when changing a page's parent
235
!	Changed the way blocks are treated. Added new frontend class attribute
236
	default_block_content that controls what is shown on pages such as
237
	search, login, etc. (Ticket #16)
238
+	Added support for WYSIWYG editor modules (wysiwygmod)
239
+	When trying to access a registered page, user is automatically redirected
240
	there on successful login.
241
#	Fixed various issues with system search (mainly related to stripslashes()
242
#	Removed stripslashes() in many places in the code. Added check for
243
	magic_quotes_gpc to new wb class method add_slashes(). Now database contest
244
	is independent of magic_quotes setting..
245
05-Sep-2005 Stefan Braunewell
246
#	Fixed bug concerning direct access of preferences page.
247
#	Reworked page visibility and menu item visibility code (frontend login
248
	problem).
249
#	Pages in link list in htmlarea popup are now correctly ordered.
250
#	Fixed bug where group with existing name can be added.
251
04-Sep-2005 Ryan Djurovich
252
+	Added and RSS newsfeed script to the News module
253
04-Sep-2005 Stefan Braunewell
254
!	Rewrote menu function. Parameters are now given as attributes to frontend class.
255
#	Fixed some occurrences of potential direct access path disclosure
256
#	Added directory check to browse.php to prevent xss exploit by trusted users.
257
!	Updated code to reflect move to Subversion repository system.
258
27-Aug-2005 Stefan Braunewell
259
#	Fixed bugs 4,5,6,8,9 in bug tracker
260
!	Removed 'USER_LANGUAGE' and 'GET_LANGUAGE' constants.
261
	A GET['lang'] now sets the session language variable.
262
26-Aug-2005 Stefan Braunewell
263
!	Moved redundant code into the new class functions. Created 
264
	'compatibility.php' for backward compatibility with
265
	modules and templates. Variables and functions can still be accessed
266
	in the old way.
267
!/+	Reorganized core frontend files, added new base class 'wb' from
268
	which 'admin' and the new 'frontend' class inherit. Moved all frontend
269
	function into new class. Completely rewrote core index.php.
270
	Now all variables and functions that are available to templates and
271
	modules are attributes and methods of the frontend and the wb classes
272
------------------------------------- 2.5.2 -------------------------------------
273
23-Jun-2005 Ryan Djurovich
274
!	create_access_file now creates all parent directories if needed
275
#	Fixed bug when moving page with subpages to another level
276
#	Fixed bug when saving "Settings" (in Admin) on Windows/IIS
277
#	Fixed bug where query was not setting error correctly in class.database.php
278
22-Jun-2005 Ryan Djurovich
279
#	Fixed bug where template permissions were not saved when a adding group
280
21-Jun-2005 Ryan Djurovich
281
#	Added htmlspecialchars for modifying WYSIWYG, news, etc. modules (Bug #78)
282
#	Fixed language problems in some area's of Admin. (Bug #70)
283
#	Added a space in website/page keywords (Bug #69)
284
#	Fixed bugs on settings2.php (Bug #52)
285
!	Links inserted with HTMLArea now use [wblink--PAGE_ID--] instead of raw URL
286
13-Jun-2005 Ryan Djurovich
287
#	Fixed bug (#88) with news module
288
!	Title of Administration login page now taken from language file (Bug #72)
289
#	Fixed redirection admin/home to admin/start on admin/index.php
290
#	Fixed bug with forgotten password page in admin (Bug #81)
291
25-Apr-2005 Ryan Djurovich
292
#	Fixed numerous bugs with module uninstallation
293
#	Fixed bug when uploading files in Administration -> Media
294
!	Installer no-longer requires you to accept the GNU GPL
295
------------------------------------- 2.5.1 -------------------------------------
296
16-Apr-2005 Ryan Djurovich
297
#	Fixed two bugs with account login/logout
298
------------------------------------- 2.5.1 -------------------------------------
299
15-Apr-2005 Ryan Djurovich
300
#	Fixed bug where non-english characters can get used in page filenames. Many
301
	measuers have been added (including a new file: wb/framework/convert.php),
302
	to prevent any possible errors that can occur in page filenames.
303
#	Fixed invalid meta tags in stock templates (meta tags were not closed)
304
#	Removed lines 401, 402, and 425 of wb/index.php - not needed
305
#	Fixed bug where search and account pages are shown in every block
306
	that is in a template
307
#	Fixed numerous bugs with media home directories feature
308
10-Apr-2005 Ryan Djurovich
309
#	Fixed bugs in account/login.php and logout.php where users
310
	gets redirected to /pages
311
------------------------------------- 2.5.0 -------------------------------------
312
08-Apr-2005 Ryan Djurovich
313
-	Removed section language feature
314
+	Added page language feature (replaces need for sections language feature)
315
#	Fixed bug where pages using menu_link module can have the URL changed
316
-	Page directory no longer stored in link field in pages table, it is now added
317
	when the page_link function is called - this makes changing the pages
318
	directory much easier and quicker
319
!	Pages with visibility of "none" are now no longer directly accessable
320
+	Added new visibility setting "hidden", acts exactly like none did previously
321
!	Template info file can now specify number of menu's available and relative names
322
!	Template info file can now specify number of blocks's available and relative names
323
------------------------------------- 2.4.3 -------------------------------------
324
07-Apr-2005 Ryan Djurovich
325
#	page_filename function has been rewritten using str_replace
326
	function, which should be faster and will allow characters
327
	from other languages into filenames
328
!	Created new media_filename function, which is now used
329
	by all media functions (create,upload,rename) to determine
330
	which characters should be removed from a desired filename
331
+	New button in Administration page list to view specific page
332
#	Updated the page_link function to now be compatible with menu link
333
	module when setting pages directory to root
334
#	Fixed bugs in search when using "Any Words" option
335
#	Fixed bug with news module when pages directory set to root
336
!	Changed URL of documentation website on Administration Start page
337
------------------------------------- 2.4.2 -------------------------------------
338
05-Apr-2005 Ryan Djurovich
339
#	Fixed bug where file could be renamed to nothing in Media
340
!	Optimised Media create folder, upload file, and rename functions
341
#	Fixed bug where stripslashes not run on news post titles in admin
342
05-Apr-2005 Stefan Braunewell
343
#	Fixed bug concerning usage of the private_sql variable
344
#	Fixed bug conerning sub-pages being displayed in menus incorrectly
345
------------------------------------- 2.4.1 -------------------------------------
346
04-Apr-2005 Ryan Djurovich
347
!	Pages with visibility of "none" are again directly accessable
348
#	Fixed bugs regarding renaming files and directories in Media section
349
!	When home folders disabled, all folders now visible in Media section
350
------------------------------------- 2.4.0 -------------------------------------
351
03-Apr-2005 Ryan Djurovich
352
-	Removed recently added visibility setting of "heading", and relative config vars
353
+	Added new "menu" field to pages table, and new setting "multiple menus"
354
	which replaces the need for the menu headings feature
355
+	Added links to top of groups and users sections, linking to each other
356
!	Change menu width in "Round" template to 170px (was 150px)
357
#	Change page "are you sure" deletion message to mention that it will delete
358
	all sub-pages as well
359
#	Fixed many bugs with news module when viewing posts by group
360
!	Pages with visibility of "none" are now no longer directly accessable
361
02-Apr-2005 Ryan Djurovich
362
-	Removed need to specify DB_URL when calling database class
363
#	Stopped fields without a type specified from being shown in form mod
364
#	Changed '/media' to MEDIA_DIRECTORY on HTMLArea popup windows
365
	for insert link and insert image
366
+	Added setting which allows you to specify the default WYSIWYG style
367
+	Added "Server Email" option, to specify what is used in "From" field when
368
	sending emails using the PHP mail function. Default is admins email address.
369
#	Search now excludes pages which have a visibility of none or heading
370
!	Pages are now given modified_when and modified_by when added
371
01-Apr-2005 Ryan Djurovich
372
+	Added option to News module to specify how many posts should be listed
373
	per page (by default it is set to unlimited, which functions like previous version)
374
#	Added stripslashes when display page titles in search
375
+	Page descriptions and last updated date now shown in search by default
376
30-Mar-2005 Ryan Djurovich
377
+	Added new feature for Media home folders, where a folder can be specified
378
	for a specific user or group of users only
379
!	Changed URL of Help button to http://www.websitebaker.org/docs/
380
+	Added new feature for "Page Trash" - two modes available: inline and separate
381
!	When pages are deleted, all sub-pages are now deleted (instead of being moved
382
	up a level)
383
29-Mar-2005 Ryan Djurovich
384
-	Removed Database Settings from Administration Settings (options will not be
385
	available in 3.x, so trying to match interface with WB 3.x plans
386
!	Changed the name of Path Settings to Filesystem Settings in Administration
387
	Settings, and removed ability to change path/url options - matching interface
388
	plans for WB 3.x
389
+	Added same options for OS and file permissions as installer to Settings
390
!	Sessions now named with APP_NAME.'_session_id' (e.g. default is wb_session_id)
391
28-Mar-2005 Ryan Djurovich
392
+	New functions available to templates to simplify creation of them. This aims
393
	to "future-proof" templates for WB 3.x plans.
394
!	Default templates updated to support some of the new functions
395
+	Added field to pages table "page_trail" which stores a list of the pages
396
	parents. This field was needed by the new page_menu function
397
+	Added option for page visibility "heading" to enabled support for multiple
398
	menu's. Also, this helps to "future-proof" templates for WB 3.x plans
399
+	Added option for page visibility "registered", which acts a little like
400
	private, but is still shown in the menu (although users need to log in to view
401
	the pages content)
402
+	Form module submissions now saved to database, and feature now added to
403
	limit number of submissions per hour to prevent spamming
404
+	New field for Form module: email. Allows you to specify their email in
405
	"from" field on module settings.
406
#	Fixed bug when displaying comments in News module (WB Bug #14)
407
+	New "under contruction" message if no pages exist
408
!	Cleaned-up wb/index.php
409
27-Mar-2005 Ryan Djurovich
410
+	Created advanced mkdir and chmod functions
411
#	Fixed bug in media where wrong file/folder is deleted
412
+	Complete overhall of installer - now only one step! It has been greatly
413
	simplified in many ways, has much better validation, reports error much more
414
	nicely, and automatically logs the user into the Administrations
415
+	Must now specify OS type - allows for customizable file permission settings
416
+	Sections can now have a language code assigned to them
417
+	Sections can now have a block name/id assigned to them
418
!	Home section of Administration renamed to Start, to save confusion with saying
419
	Homepage (because this term could either mean the main website or Home section
420
	in	Administration). Also, this aims to unify the interface with WB 3.x plans
421
!	Moved Users and Groups sections under Access section. This aims to unify the
422
	interface with WB 3.x plans, which help to unclutter the menu
423
!	Interface for Settings section has been imporved for usability purposes
424
#	Fixed HTMLArea where no scrollbar for "insert link" and "insert image" dialogs
425
	by placing media list inside an iframe
426
#	Fixed stripslashes problem for viewing news comments
427
!	Added code from Formesque module (an advanced version of the original Form
428
	module, modified by Rudolph Lartey from www.carbonect.com), and made further
429
	interface improvements for select box/checkbox group/radio group options.
430
#	Possibly fixed bugs where an S appears before file and dir modes
431
#	Fixed bug where users can be added with same emails (in Administration)
432
-	Removed support for PEAR, as it was deemed an unnecessary addition which only
433
	makes code more bulky, and removing it will decrease package size a lot
434
+	New "homepage redirect" option so first page is included and not redirected to
435
#	Fixed text not being shown when module uninstalled
436
!	Imporved interface for basic group permissions
437
26-Mar-2005 Stefan Braunewell
438
#	Fixed bug with front-end logins
439
#	Fixed bug when saving intro page 
440
+	Added check on sign-up if e-mail exists (thanks to P. Melief)
441
#	Fixed bugs concerning moving/deleting pages
442
#	Fixed list of parents in page settings
443
#	Fixed mkdir without mode parameter
444
#	Added a check on install to ensure PHP 4.1.x compatibility (thanks to Wanderer)
445
+	Added support for PAGES_DIRECTORY set to root
446
+	Search form now supports quotes (thanks to Manafta)
447
#	Fixed page section ordering
448
#	News items are displayed with name of poster instead of "Unknown"
449
#	Deletion confirmation popup window in media section now shows correct file name
450
------------------------------------- 2.3.1 -------------------------------------
451
03-Fed-2005 Ryan Djurovich
452
+	Now there is two types of "filesystem modes", one for directories and one
453
	for files. Having different settings is very common for most servers, so
454
	this addition should fix many problems people had with 2.3.0.
455
-	Removed filesystem mode options from installation
456
!	Removed duplicate text on installation step 3 for timezone
457
!	All "access files" for the news module now stored in pages/posts instead
458
	of a sub-dir relative to the page (this fixes many bugs)
459
#	Fixed major bugs when deleting pages with sub-pages
460
!	Removed the restrictions that prevent a user for changing a pages level
461
#	Fixed bug with "toggle" plus/minus in IE for pages list
462
#	Fixed some bugs where /pages was not replaced with PAGES_DIRECTORY constant
463
------------------------------------- 2.3.0 -------------------------------------
464
26-Jan-2005 Ryan Djurovich
465
#	Fixed bug in framework/functions.php that made root parent always equal 8
466
#	Added missing braces in lines 182 and 208 of admin/pages/settings2.php
467
#	Fixed SQL-query on line 172, placing a / after $old_link
468
#	Added eregi checks for PAGES_DIRECTORY on lines 140 and 150 of
469
	admin/pages/settings2.php
470
#	Added ordering cleaning to delete_post.php on line 53 for news module
471
!	GMT option is selected for "Default Timezone" in the installer, instead
472
	of the old "Please select" message (which had the same value as GMT)
473
28-Jan-2005 Ryan Djurovich
474
!	Ability to specify the chmod number when WB uploads files, etc.
475
!	Modified file headers (copyright/license notice) so they now look almost the
476
	same, independant of font. Also, it now covers copyright for 2005.
477
30-Jan-2005 Ryan Djurovich
478
#	Added code on wb/admin/pages/delete.php to remove sections from the sections
479
	table when a page is deleted.
480
+	New 'Smart Login' prevents users from using external password managers,
481
	and can be set to remember the users password using cookies.
482
!	SourceForge CVS module now called websitebaker2 (instead of just
483
	websitebaker). Also, all file versions have been reset.
484
01-Fed-2005 Ryan Djurovich
485
!	Added code to prevent from changing a pages level (it simply disables
486
	the select box), to prevent many possible bugs.
487
------------------------------------- 2.2.4 -------------------------------------
488
23-Dec-2004 Ryan Djurovich
489
!	Change 'EXACT_PHRASE' to 'EXACT_MATCH' on line 261 of wb/languages/EN.php
490
#	Fixed multi-language support in search
491
+	Added more detailed options to list of PHP error reporting level's
492
-	Removed ability to change language and PHP error reporting level
493
	on installation to make things easier for newbie's
494
+	Ability to select custom spacer for page filename's
495
!	Changed the way a language code is found on language installation
496
+	Added template permissions to groups
497
#	Fixed bug when trying to change email from Preferences (admin and frontend)
498
#	Fixed bug with auto-selection of "System Default" for Preferences
499
!	News module now use's WYSIWYG for modifying news posts
500
+	Ability to specify both the pages and media target directories
501
------------------------------------ 2.2.3-c ------------------------------------
502
22-Dec-2004 Ryan Djurovich
503
#	Fixed problem with DB password being reset if Settings saved in basic mode
504
------------------------------------ 2.2.3-b ------------------------------------
505
21-Dec-2004 Ryan Djurovich
506
#	Fixed minor bug on admin templates section
507
#	Fixed bug on rename.php and rename2.php in admin media section
508
------------------------------------- 2.2.3 -------------------------------------
509
20-Dec-2004 Ryan Djurovich
510
+	Added WB release version in Administration (top right corner)
511
!	New option to prevent users from adding level 0 pages
512
#	Fixed bug when deleting post's in News module
513
+	Added new field in pages table for "root" parent (level 0 parent), for
514
	extra flexability in creating templates
515
!	Round template now supports unlimited page levels
516
------------------------------------- 2.2.2 -------------------------------------
517
18-Dec-2004 Ryan Djurovich
518
+	New option under Search Settings for selecting custom template for search
519
+	New option when changing page settings to set the target
520
#	Fixed error when saving a user after editing
521
!	Users can now modify sub-page if they dont have permissions on the parent
522
------------------------------------- 2.2.1 -------------------------------------
523
15-Dec-2004 Ryan Djurovich
524
#	Fixed bug when changing password on preferences form (front-end)
525
#	Fixed bug when retrieving user details (administration)
526
#	Added check to see if module, template, or language is in use when deleting
527
#	Fixed up email that is sent to user from a submitted form
528
#	Fixed major problem with module permissions which stopped it from working
529
------------------------------------- 2.2.0 -------------------------------------
530
14-Dec-2004 (Correct date[s] unkown) Ryan Djurovich
531
+	Multiple-level page support
532
+	Multiple section's for pages (including interface)
533
!	Removed text created using two words on all areas
534
	(e.g. {Intro} {PAGE} is now {INTRO_PAGE})
535
	this is for better language support
536
+	Added Languages section
537
!	Moved Templates and Modules under Add-ons section
538
!	Changed name of "Default" template to "Round"
539
+	Added "All CSS" template
540
+	Added "Jump"
541
+	Added 
542
!	Modified "Box" template to support multiple page levels
543
+	Added "Menu Link" module
544
+	Added "News" module
545
+	Added "Code" module
546
+	Added "Form" module
547
+	Added "Wrapper" module
548
!	Changed name of "Normal Page" module to "WYSIWYG"
549
+	Created new admin wrapper script to ease module develpment
550
+	Media now automatically creates index.php file for every
551
	sub-folder made (for security purposes)
552
!	Change "Help" link in Administration menu so it now directs
553
	to the the new Website Baker documentation website found at:
554
	http://www.websitebaker.org/documentation
555
!	Password is now required to change email in preferences
556
+	User can now select custom Language and Date & Time Formats
557
+	Added search functionality, with three different "methods":
558
	1. Using all words  2. Using any words  3. Exact match
559
+	Added native MySQL database support
1
Change Log
2
===============================================================================
3
Please note: This change log may not be accurate
4

  
5
$Id$
6

  
7
Legend:
8
+ = Added
9
- = Removed
10
# = Bugfix
11
! = Update/Change
12

  
13
------------------------------------- 2.7.0 -------------------------------------
14
24-Jan-2007 Christian Sommer
15
!	Replaced some core files to allow configuration of wbmailer via admin settings panel
16
21-Jan-2007 Matthias Gallas
17
#	Fixed issue in the search table entries of form modul
18
13-Jan-2007 Matthias Gallas
19
#	Fixed some bugs in rss.php
20
07-Jan-2007 Matthias Gallas
21
#	Fixed error when uninstalling the news modul
22
02-Jan-2007 Matthias Gallas
23
+   Added id keywords to all missing files
24
#	Fixed issue with Permissions for pages sections
25
27-Dec-2006 Matthias Gallas
26
#	Fixed form modul stores empty records
27
------------------------------------- 2.6.5 -------------------------------------
28
25-Dec-2006 Ryan Djurovich
29
!	Changed links to WB help website
30
24-Dec-2006 Matthias Gallas
31
#	Fixed some minor javascript errors in admin (thanks to pcwacht)
32
#	Fixed root_parent doesn't get updated when moving item in menu (#305)
33
!	Changed all copyright notices to include now 2007
34
23-Dec-2006 Matthias Gallas
35
#	Fixed IE allows to set a page as parent of itself (#320)
36
#	Fixed problem with Page Title has to be escaped (#287)
37
#	Fixed the possibility to call the index.php of the templates directly in the browser (#291)
38
21-Dec-2006 Matthias Gallas
39
#	Fixed missing message when adding a site without page title (#300)
40
21-Dec-2006 Ryan Djurovich
41
#	Fixed bug with captcha script (#346)
42
20-Dec-2006 Matthias Gallas
43
#	Fixed Return to Search Results Page (#365)
44
!	Set Version to 2.6.5
45
-	Removed Changeset 365 because this will be a part of WB 2.7.x
46
#	Fixed a little typo error in class.admin.php (#364)
47
26-Nov-2006 Ryan Djurovich
48
+	Added new script that could possibly be apart of 2.7.x as a replacement
49
	for having the pages directory 
50
17-Nov-2006 Matthias Gallas
51
#	Fixed fatal error in line 46 news/comment.php (thanks to eki)(#358)
52
15-Nov-2006 Matthias Gallas
53
#	Fixed again intropage doesn't work (#71)
54
20-Oct-2006 Matthias Gallas
55
+	Added phpmailer class (thanks to doc)
56
+	Added Remember-expanded-pages-in-admin (thanks to ephraimt)
57
+	Added List sorting in admin area (thanks to rsmith)
58
#	Fixed table width 100% are wrong displayed in container templates
59
	when IE is used (#350)
60
#	Fixed large space between menupoints in IE (#349)
61
#	Fixed Website description is not displayed when no page description
62
	available (#348)
63
#	Fixed group images in news modul cannot be stored (#342)
64
#	Fixed Typo in form/save_field.php (#341)
65
#	Fixed files in /pages/posts folder are not deleted (#340)
66
#	Fixed specialchars problem in the news modul (#339)
67
#	Fixed news modul stores empty records (#338)
68
#	Fixed Captcha didn't work in news comments (#337)
69
#	Fixed various php notices (#334)
70
+	Added new upgrade_function (thanks to kozmoz)
71
#	Fixed addons table isn't updated when a modul is updated (#332)
72
#	Fixed spelling errors in the signup2.php (#330)
73
#	Fixed MySQL 5.x missing default values for INT fields in all system
74
	and modules tables (#329)
75
#	Fixed installer does not insert admin user (#328)
76
+	Added support for getting page ID of page that referred search
77
	request (#327) (thanks to brofield)
78
#	Fixed search results generate invalid XHTML and notify warnings (#326)
79
Stefan Braunewell
80
#	Fixed Field 'last_reset' doesn't have a default value (#313)
81
+	Added get_post_escaped to wb class which automatically calls add_slashes
82
	on get_post output and used it in form/save_field.php
83
------------------------------------- 2.6.4 -------------------------------------
84
20-May-2006 Ryan Djurovich
85
#	Fixed security issues related to #237
86
#	Fixed typo in news save comment page (#282)
87
#	Fixed typo in news delete post page (#283)
88
!	Added multi-submission protection to form module (#119)
89
#	Added notice for when PHP Session Support appears to be disabled in installer,
90
	even if it is enabled and the problem actually lies in the users browser (#154)
91
19-May-2006 Ryan Djurovich
92
#	Fixed problem in forgotten login form where email field is too short (#207)
93
#	Fixed typo in forgotten login details email (#190)
94
15-May-2006 Stefan Braunewell
95
#	Fixed security issues (#237)
96
03-May-2006 Stefan Braunewell
97
#	Fixed problems with pre-2.6.0 modules in section list
98
#	Fixed e-mail bug caused by From: headers in internal mail function calls
99
	(#189)
100
#	E-mail validation in install script now accepts new top-level domains
101
	(#162)
102
#	Error status is now overwritten by next database query (#182)
103
#	Fixed obscure problem in htmlarea install script
104
------------------------------------- 2.6.3 -------------------------------------
105
19-Mar-2006 Stefan Braunewell
106
#	Fixed ticket #146: problems removing groups from viewers list of a page
107
16-Mar-2006 Stefan Braunewell
108
!	Changed link target selection. Now self, top and new. (Ticket #145)
109
#	Fixed ticket #143. Charset setting is now used in admin login and forgot
110
	password pages.
111
#	Some changes to the SQL code in the install script for improved 
112
	compatibility with new MySQL versions
113
#	Fixed ticket #134 - error on browsing media.
114
+	Improved backup module: new choice between full database or WB-related
115
	backup.
116
#	Fixed ticket #141 - admin now sees all folders in media
117
#	Fixed e-mail sending problems due to additional parameter in mail call.
118
#	Applied fix regarding ticket #138: new users now get deleted if
119
	sending e-mail fails.
120
#	Fixed ticket #137: Last Reset timer not reset in frontend forgotten 
121
	password process
122
#	Removed duplicate expression from modules/news/install.php which caused
123
	problems in installation
124

  
125
01-Mar-2006 Stefan Braunewell
126
#	Fixed ticket #68 - Safari problem with displaying all parents.
127
#	Fixed ticket #136 - mailing forgotten password in admin login screen leads 
128
	to fatal error.
129
!	Renamed tag [PROCESSTIME] to [PROCESS_TIME]
130
------------------------------------- 2.6.2 -------------------------------------
131
03-Feb-2006 Stefan Braunewell (very big special thanks to John and Alex)
132
#	Fixed ticket #104 - commas in form field descriptions not allowed.
133
#	Cookie REMEMBER_KEY wasn't cleared in account/logout 
134
	and expiration date is now set to time in the past.
135
#	Smart login not working.
136
!	Changed mail calls to new function $wb->mail.
137
#	Form: ticket 124 added captcha settings check 
138
#	Ticket 118 added formfield type to check for email/text 
139
#	Ticket 115 changed comparision /modules/form/view.php 
140
#	Added correct timecheck in form submissions
141
!	Changed captcha.php call to include timestamp
142
!	Changed the e-mail validation code and added a mail function to class wb.
143
!	Forgotten password: if sending of e-mail fails, restore old password.
144
	Ticket #110
145
!	Added more charset options. Ticket #102 - thanks to ruebenwurzel!
146
!	Character encoding setting also affects admin backend.
147
	Mentioned in ticket #102.
148
!	Reintroduced page languages setting. If switched to off, page
149
	languages are only used to determine the language file for the
150
	universal texts. If on, displayed page and menu are affected by
151
	the language session variable.
152
#	Fixed bugs in show_breadcrumbs code and added parameter "depth"
153
	to set the number of levels to be show.
154
#	Fixed a bug where access settings of registered and private pages
155
	were displayed incorrectly.
156
#	Fixed captcha being cached.
157
#	Added an exit call after every heading("Location:...")
158
	redirector to prevent unwanted execution of code.
159
#	Bug #122. Replaced empty field check by check that setting name is
160
	not "wb_version".
161
#	Replaced all remaining occurrences of '/media' by MEDIA_DIRECTORY - bug #108.
162
#	Fixed bug #99 and two additional instances of typo 
163
	catpcha instead of captcha.
164
#	Fixed some typos
165
#	Fixed some notices and warnings.
166
#	Fixed bug #105 - back buttons in addon detail pages not editable.
167
!	Replace 'admin' by 'wb' in all account pages. 
168
!/#	Moved print_success and print_error code to class.wb.php.
169
	Added correct parameters to these functions in account pages. 
170
------------------------------------- 2.6.1 -------------------------------------
171
12-Dec-2005 Ryan Djurovich
172
#	Fixed security vulnerability in class.login.php
173
#	Fixed typo in EN language file
174
#	Fixed captcha problems (when feature is disabled) in form module and sign-up
175
!	Added charset encoding to admin templates
176
!	Added extra code to check for selection of addon upon uninstalling
177
#	Fixed bugs in RSS news feeder
178
#	Fixed bug with PAGE_DESCRIPTION not being set on any page
179
------------------------------------- 2.6.0 -------------------------------------
180
28-Nov-2005 Ryan Djurovich
181
+	Added default charset option to (advanced) settings
182
#	Form module email fields now have email address validation
183
#	Fixed spacing in form submissions
184
27-Nov-2005 Ryan Djurovich
185
+	Added captcha verification to sign-up form
186
+	Added Captcha to News module
187
24-Nov-2005 Stefan Braunewell
188
!	Applied aportale's patch to use label instead of javascript toggle code
189
20-Nov-2005 Ryan Djurovich
190
!	News mod now hides read more link if no need for it (see ticket #56)
191
+	Added support for mailto: links in the menu link mod
192
#	Added direct-access redirection on some files (see ticket #37)
193
+	Added extra characters to convert.php (see ticket #64)
194
#	Fixed ticket #65 (last_reset check in account/forgot_form.php)
195
29-Sep-2005 Ryan Djurovich
196
!	Cleaned up form buttons in Settings
197
!	Moved some options into Advanced Settings
198
#	Semi-disabled "separate" page trash option
199
+	Created a backup module/tool for backing-up the database
200
	(thanks to John (pcwacht) for the original code)
201
+	Created new "blank template", which can be used in case where you don't
202
	want anything wrapping page-content.
203
19-Sep-2005 Ryan Djurovich
204
+	Added _license field for all add-ons to specify a license
205
!	Renamed _designed_for variables (for all addons) to _platform
206
+	Created addons table for faster internal referencing of installed addons
207
!	Fixed some links, including the "Help" button in Admin
208
#	Used nl2br to display body correctly when viewing form-submissions
209
15-Sep-2005 Stefan Braunewell
210
+	Added table module with columns 'name','type' and 'directory' as an
211
	index.
212
+	Added entry to settings table 'wb_version' which holds the version
213
	number and can be utilized in future upgrade scripts.
214
!	Added upgrade functionality also for templates and languages.
215
#/!	Template/modules installation now respects paths.
216
!	Moved updates from config.php to database.
217
	Created initialize.php (required by config.php) to read settings.
218
11-Sep-2005 Stefan Braunewell
219
!	HTMLArea is now a module instead of a core component. Files moved
220
	from "include" to "modules".
221
+	Implemented Installation of modules on top of an older version. This is 
222
	done via checking $module_version. Instead of install.php, upgrade.php
223
	is then called if it exists in the module package. 
224
	For module developers: $module_version and $new_module_version are 
225
	accessible in upgrade.php to find out what upgrade steps need to be taken.
226
!	Changed column names in mod_news_posts from short,long to content_short,
227
	content_long.
228
09-Sep-2005 Stefan Braunewell
229
+	Added new advanced setting "Rename Files On Upload". File extensions can be
230
	given so that respective files will have a ".txt" appended on media upload.
231
#	Fixed "None found" message bug when user has no top level page edit
232
	rights.
233
#	Fixed missing parent option 'none' - ticket #12 - and a minor scope bug.
234
+	Added breadcrumbs code. Call using $wb->breadcrumbs().
235
+	Added utf-8 character encoding meta tag into all stock templates.
236
#	Fixed bug when changing a page's parent
237
!	Changed the way blocks are treated. Added new frontend class attribute
238
	default_block_content that controls what is shown on pages such as
239
	search, login, etc. (Ticket #16)
240
+	Added support for WYSIWYG editor modules (wysiwygmod)
241
+	When trying to access a registered page, user is automatically redirected
242
	there on successful login.
243
#	Fixed various issues with system search (mainly related to stripslashes()
244
#	Removed stripslashes() in many places in the code. Added check for
245
	magic_quotes_gpc to new wb class method add_slashes(). Now database contest
246
	is independent of magic_quotes setting..
247
05-Sep-2005 Stefan Braunewell
248
#	Fixed bug concerning direct access of preferences page.
249
#	Reworked page visibility and menu item visibility code (frontend login
250
	problem).
251
#	Pages in link list in htmlarea popup are now correctly ordered.
252
#	Fixed bug where group with existing name can be added.
253
04-Sep-2005 Ryan Djurovich
254
+	Added and RSS newsfeed script to the News module
255
04-Sep-2005 Stefan Braunewell
256
!	Rewrote menu function. Parameters are now given as attributes to frontend class.
257
#	Fixed some occurrences of potential direct access path disclosure
258
#	Added directory check to browse.php to prevent xss exploit by trusted users.
259
!	Updated code to reflect move to Subversion repository system.
260
27-Aug-2005 Stefan Braunewell
261
#	Fixed bugs 4,5,6,8,9 in bug tracker
262
!	Removed 'USER_LANGUAGE' and 'GET_LANGUAGE' constants.
263
	A GET['lang'] now sets the session language variable.
264
26-Aug-2005 Stefan Braunewell
265
!	Moved redundant code into the new class functions. Created 
266
	'compatibility.php' for backward compatibility with
267
	modules and templates. Variables and functions can still be accessed
268
	in the old way.
269
!/+	Reorganized core frontend files, added new base class 'wb' from
270
	which 'admin' and the new 'frontend' class inherit. Moved all frontend
271
	function into new class. Completely rewrote core index.php.
272
	Now all variables and functions that are available to templates and
273
	modules are attributes and methods of the frontend and the wb classes
274
------------------------------------- 2.5.2 -------------------------------------
275
23-Jun-2005 Ryan Djurovich
276
!	create_access_file now creates all parent directories if needed
277
#	Fixed bug when moving page with subpages to another level
278
#	Fixed bug when saving "Settings" (in Admin) on Windows/IIS
279
#	Fixed bug where query was not setting error correctly in class.database.php
280
22-Jun-2005 Ryan Djurovich
281
#	Fixed bug where template permissions were not saved when a adding group
282
21-Jun-2005 Ryan Djurovich
283
#	Added htmlspecialchars for modifying WYSIWYG, news, etc. modules (Bug #78)
284
#	Fixed language problems in some area's of Admin. (Bug #70)
285
#	Added a space in website/page keywords (Bug #69)
286
#	Fixed bugs on settings2.php (Bug #52)
287
!	Links inserted with HTMLArea now use [wblink--PAGE_ID--] instead of raw URL
288
13-Jun-2005 Ryan Djurovich
289
#	Fixed bug (#88) with news module
290
!	Title of Administration login page now taken from language file (Bug #72)
291
#	Fixed redirection admin/home to admin/start on admin/index.php
292
#	Fixed bug with forgotten password page in admin (Bug #81)
293
25-Apr-2005 Ryan Djurovich
294
#	Fixed numerous bugs with module uninstallation
295
#	Fixed bug when uploading files in Administration -> Media
296
!	Installer no-longer requires you to accept the GNU GPL
297
------------------------------------- 2.5.1 -------------------------------------
298
16-Apr-2005 Ryan Djurovich
299
#	Fixed two bugs with account login/logout
300
------------------------------------- 2.5.1 -------------------------------------
301
15-Apr-2005 Ryan Djurovich
302
#	Fixed bug where non-english characters can get used in page filenames. Many
303
	measuers have been added (including a new file: wb/framework/convert.php),
304
	to prevent any possible errors that can occur in page filenames.
305
#	Fixed invalid meta tags in stock templates (meta tags were not closed)
306
#	Removed lines 401, 402, and 425 of wb/index.php - not needed
307
#	Fixed bug where search and account pages are shown in every block
308
	that is in a template
309
#	Fixed numerous bugs with media home directories feature
310
10-Apr-2005 Ryan Djurovich
311
#	Fixed bugs in account/login.php and logout.php where users
312
	gets redirected to /pages
313
------------------------------------- 2.5.0 -------------------------------------
314
08-Apr-2005 Ryan Djurovich
315
-	Removed section language feature
316
+	Added page language feature (replaces need for sections language feature)
317
#	Fixed bug where pages using menu_link module can have the URL changed
318
-	Page directory no longer stored in link field in pages table, it is now added
319
	when the page_link function is called - this makes changing the pages
320
	directory much easier and quicker
321
!	Pages with visibility of "none" are now no longer directly accessable
322
+	Added new visibility setting "hidden", acts exactly like none did previously
323
!	Template info file can now specify number of menu's available and relative names
324
!	Template info file can now specify number of blocks's available and relative names
325
------------------------------------- 2.4.3 -------------------------------------
326
07-Apr-2005 Ryan Djurovich
327
#	page_filename function has been rewritten using str_replace
328
	function, which should be faster and will allow characters
329
	from other languages into filenames
330
!	Created new media_filename function, which is now used
331
	by all media functions (create,upload,rename) to determine
332
	which characters should be removed from a desired filename
333
+	New button in Administration page list to view specific page
334
#	Updated the page_link function to now be compatible with menu link
335
	module when setting pages directory to root
336
#	Fixed bugs in search when using "Any Words" option
337
#	Fixed bug with news module when pages directory set to root
338
!	Changed URL of documentation website on Administration Start page
339
------------------------------------- 2.4.2 -------------------------------------
340
05-Apr-2005 Ryan Djurovich
341
#	Fixed bug where file could be renamed to nothing in Media
342
!	Optimised Media create folder, upload file, and rename functions
343
#	Fixed bug where stripslashes not run on news post titles in admin
344
05-Apr-2005 Stefan Braunewell
345
#	Fixed bug concerning usage of the private_sql variable
346
#	Fixed bug conerning sub-pages being displayed in menus incorrectly
347
------------------------------------- 2.4.1 -------------------------------------
348
04-Apr-2005 Ryan Djurovich
349
!	Pages with visibility of "none" are again directly accessable
350
#	Fixed bugs regarding renaming files and directories in Media section
351
!	When home folders disabled, all folders now visible in Media section
352
------------------------------------- 2.4.0 -------------------------------------
353
03-Apr-2005 Ryan Djurovich
354
-	Removed recently added visibility setting of "heading", and relative config vars
355
+	Added new "menu" field to pages table, and new setting "multiple menus"
356
	which replaces the need for the menu headings feature
357
+	Added links to top of groups and users sections, linking to each other
358
!	Change menu width in "Round" template to 170px (was 150px)
359
#	Change page "are you sure" deletion message to mention that it will delete
360
	all sub-pages as well
361
#	Fixed many bugs with news module when viewing posts by group
362
!	Pages with visibility of "none" are now no longer directly accessable
363
02-Apr-2005 Ryan Djurovich
364
-	Removed need to specify DB_URL when calling database class
365
#	Stopped fields without a type specified from being shown in form mod
366
#	Changed '/media' to MEDIA_DIRECTORY on HTMLArea popup windows
367
	for insert link and insert image
368
+	Added setting which allows you to specify the default WYSIWYG style
369
+	Added "Server Email" option, to specify what is used in "From" field when
370
	sending emails using the PHP mail function. Default is admins email address.
371
#	Search now excludes pages which have a visibility of none or heading
372
!	Pages are now given modified_when and modified_by when added
373
01-Apr-2005 Ryan Djurovich
374
+	Added option to News module to specify how many posts should be listed
375
	per page (by default it is set to unlimited, which functions like previous version)
376
#	Added stripslashes when display page titles in search
377
+	Page descriptions and last updated date now shown in search by default
378
30-Mar-2005 Ryan Djurovich
379
+	Added new feature for Media home folders, where a folder can be specified
380
	for a specific user or group of users only
381
!	Changed URL of Help button to http://www.websitebaker.org/docs/
382
+	Added new feature for "Page Trash" - two modes available: inline and separate
383
!	When pages are deleted, all sub-pages are now deleted (instead of being moved
384
	up a level)
385
29-Mar-2005 Ryan Djurovich
386
-	Removed Database Settings from Administration Settings (options will not be
387
	available in 3.x, so trying to match interface with WB 3.x plans
388
!	Changed the name of Path Settings to Filesystem Settings in Administration
389
	Settings, and removed ability to change path/url options - matching interface
390
	plans for WB 3.x
391
+	Added same options for OS and file permissions as installer to Settings
392
!	Sessions now named with APP_NAME.'_session_id' (e.g. default is wb_session_id)
393
28-Mar-2005 Ryan Djurovich
394
+	New functions available to templates to simplify creation of them. This aims
395
	to "future-proof" templates for WB 3.x plans.
396
!	Default templates updated to support some of the new functions
397
+	Added field to pages table "page_trail" which stores a list of the pages
398
	parents. This field was needed by the new page_menu function
399
+	Added option for page visibility "heading" to enabled support for multiple
400
	menu's. Also, this helps to "future-proof" templates for WB 3.x plans
401
+	Added option for page visibility "registered", which acts a little like
402
	private, but is still shown in the menu (although users need to log in to view
403
	the pages content)
404
+	Form module submissions now saved to database, and feature now added to
405
	limit number of submissions per hour to prevent spamming
406
+	New field for Form module: email. Allows you to specify their email in
407
	"from" field on module settings.
408
#	Fixed bug when displaying comments in News module (WB Bug #14)
409
+	New "under contruction" message if no pages exist
410
!	Cleaned-up wb/index.php
411
27-Mar-2005 Ryan Djurovich
412
+	Created advanced mkdir and chmod functions
413
#	Fixed bug in media where wrong file/folder is deleted
414
+	Complete overhall of installer - now only one step! It has been greatly
415
	simplified in many ways, has much better validation, reports error much more
416
	nicely, and automatically logs the user into the Administrations
417
+	Must now specify OS type - allows for customizable file permission settings
418
+	Sections can now have a language code assigned to them
419
+	Sections can now have a block name/id assigned to them
420
!	Home section of Administration renamed to Start, to save confusion with saying
421
	Homepage (because this term could either mean the main website or Home section
422
	in	Administration). Also, this aims to unify the interface with WB 3.x plans
423
!	Moved Users and Groups sections under Access section. This aims to unify the
424
	interface with WB 3.x plans, which help to unclutter the menu
425
!	Interface for Settings section has been imporved for usability purposes
426
#	Fixed HTMLArea where no scrollbar for "insert link" and "insert image" dialogs
427
	by placing media list inside an iframe
428
#	Fixed stripslashes problem for viewing news comments
429
!	Added code from Formesque module (an advanced version of the original Form
430
	module, modified by Rudolph Lartey from www.carbonect.com), and made further
431
	interface improvements for select box/checkbox group/radio group options.
432
#	Possibly fixed bugs where an S appears before file and dir modes
433
#	Fixed bug where users can be added with same emails (in Administration)
434
-	Removed support for PEAR, as it was deemed an unnecessary addition which only
435
	makes code more bulky, and removing it will decrease package size a lot
436
+	New "homepage redirect" option so first page is included and not redirected to
437
#	Fixed text not being shown when module uninstalled
438
!	Imporved interface for basic group permissions
439
26-Mar-2005 Stefan Braunewell
440
#	Fixed bug with front-end logins
441
#	Fixed bug when saving intro page 
442
+	Added check on sign-up if e-mail exists (thanks to P. Melief)
443
#	Fixed bugs concerning moving/deleting pages
444
#	Fixed list of parents in page settings
445
#	Fixed mkdir without mode parameter
446
#	Added a check on install to ensure PHP 4.1.x compatibility (thanks to Wanderer)
447
+	Added support for PAGES_DIRECTORY set to root
448
+	Search form now supports quotes (thanks to Manafta)
449
#	Fixed page section ordering
450
#	News items are displayed with name of poster instead of "Unknown"
451
#	Deletion confirmation popup window in media section now shows correct file name
452
------------------------------------- 2.3.1 -------------------------------------
453
03-Fed-2005 Ryan Djurovich
454
+	Now there is two types of "filesystem modes", one for directories and one
455
	for files. Having different settings is very common for most servers, so
456
	this addition should fix many problems people had with 2.3.0.
457
-	Removed filesystem mode options from installation
458
!	Removed duplicate text on installation step 3 for timezone
459
!	All "access files" for the news module now stored in pages/posts instead
460
	of a sub-dir relative to the page (this fixes many bugs)
461
#	Fixed major bugs when deleting pages with sub-pages
462
!	Removed the restrictions that prevent a user for changing a pages level
463
#	Fixed bug with "toggle" plus/minus in IE for pages list
464
#	Fixed some bugs where /pages was not replaced with PAGES_DIRECTORY constant
465
------------------------------------- 2.3.0 -------------------------------------
466
26-Jan-2005 Ryan Djurovich
467
#	Fixed bug in framework/functions.php that made root parent always equal 8
468
#	Added missing braces in lines 182 and 208 of admin/pages/settings2.php
469
#	Fixed SQL-query on line 172, placing a / after $old_link
470
#	Added eregi checks for PAGES_DIRECTORY on lines 140 and 150 of
471
	admin/pages/settings2.php
472
#	Added ordering cleaning to delete_post.php on line 53 for news module
473
!	GMT option is selected for "Default Timezone" in the installer, instead
474
	of the old "Please select" message (which had the same value as GMT)
475
28-Jan-2005 Ryan Djurovich
476
!	Ability to specify the chmod number when WB uploads files, etc.
477
!	Modified file headers (copyright/license notice) so they now look almost the
478
	same, independant of font. Also, it now covers copyright for 2005.
479
30-Jan-2005 Ryan Djurovich
480
#	Added code on wb/admin/pages/delete.php to remove sections from the sections
481
	table when a page is deleted.
482
+	New 'Smart Login' prevents users from using external password managers,
483
	and can be set to remember the users password using cookies.
484
!	SourceForge CVS module now called websitebaker2 (instead of just
485
	websitebaker). Also, all file versions have been reset.
486
01-Fed-2005 Ryan Djurovich
487
!	Added code to prevent from changing a pages level (it simply disables
488
	the select box), to prevent many possible bugs.
489
------------------------------------- 2.2.4 -------------------------------------
490
23-Dec-2004 Ryan Djurovich
491
!	Change 'EXACT_PHRASE' to 'EXACT_MATCH' on line 261 of wb/languages/EN.php
492
#	Fixed multi-language support in search
493
+	Added more detailed options to list of PHP error reporting level's
494
-	Removed ability to change language and PHP error reporting level
495
	on installation to make things easier for newbie's
496
+	Ability to select custom spacer for page filename's
497
!	Changed the way a language code is found on language installation
498
+	Added template permissions to groups
499
#	Fixed bug when trying to change email from Preferences (admin and frontend)
500
#	Fixed bug with auto-selection of "System Default" for Preferences
501
!	News module now use's WYSIWYG for modifying news posts
502
+	Ability to specify both the pages and media target directories
503
------------------------------------ 2.2.3-c ------------------------------------
504
22-Dec-2004 Ryan Djurovich
505
#	Fixed problem with DB password being reset if Settings saved in basic mode
506
------------------------------------ 2.2.3-b ------------------------------------
507
21-Dec-2004 Ryan Djurovich
508
#	Fixed minor bug on admin templates section
509
#	Fixed bug on rename.php and rename2.php in admin media section
510
------------------------------------- 2.2.3 -------------------------------------
511
20-Dec-2004 Ryan Djurovich
512
+	Added WB release version in Administration (top right corner)
513
!	New option to prevent users from adding level 0 pages
514
#	Fixed bug when deleting post's in News module
515
+	Added new field in pages table for "root" parent (level 0 parent), for
516
	extra flexability in creating templates
517
!	Round template now supports unlimited page levels
518
------------------------------------- 2.2.2 -------------------------------------
519
18-Dec-2004 Ryan Djurovich
520
+	New option under Search Settings for selecting custom template for search
521
+	New option when changing page settings to set the target
522
#	Fixed error when saving a user after editing
523
!	Users can now modify sub-page if they dont have permissions on the parent
524
------------------------------------- 2.2.1 -------------------------------------
525
15-Dec-2004 Ryan Djurovich
526
#	Fixed bug when changing password on preferences form (front-end)
527
#	Fixed bug when retrieving user details (administration)
528
#	Added check to see if module, template, or language is in use when deleting
529
#	Fixed up email that is sent to user from a submitted form
530
#	Fixed major problem with module permissions which stopped it from working
531
------------------------------------- 2.2.0 -------------------------------------
532
14-Dec-2004 (Correct date[s] unkown) Ryan Djurovich
533
+	Multiple-level page support
534
+	Multiple section's for pages (including interface)
535
!	Removed text created using two words on all areas
536
	(e.g. {Intro} {PAGE} is now {INTRO_PAGE})
537
	this is for better language support
538
+	Added Languages section
539
!	Moved Templates and Modules under Add-ons section
540
!	Changed name of "Default" template to "Round"
541
+	Added "All CSS" template
542
+	Added "Jump"
543
+	Added 
544
!	Modified "Box" template to support multiple page levels
545
+	Added "Menu Link" module
546
+	Added "News" module
547
+	Added "Code" module
548
+	Added "Form" module
549
+	Added "Wrapper" module
550
!	Changed name of "Normal Page" module to "WYSIWYG"
551
+	Created new admin wrapper script to ease module develpment
552
+	Media now automatically creates index.php file for every
553
	sub-folder made (for security purposes)
554
!	Change "Help" link in Administration menu so it now directs
555
	to the the new Website Baker documentation website found at:
556
	http://www.websitebaker.org/documentation
557
!	Password is now required to change email in preferences
558
+	User can now select custom Language and Date & Time Formats
559
+	Added search functionality, with three different "methods":
560
	1. Using all words  2. Using any words  3. Exact match
561
+	Added native MySQL database support
trunk/wb/install/save.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2007, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Start a session
27
if(!defined('SESSION_STARTED')) {
28
	session_name('wb_session_id');
29
	session_start();
30
	define('SESSION_STARTED', true);
31
}
32

  
33
// Function to set error
34
function set_error($message) {
35
	global $_POST;
36
	if(isset($message) AND $message != '') {
37
		// Copy values entered into session so user doesn't have to re-enter everything
38
		if(isset($_POST['website_title'])) {
39
			$_SESSION['wb_url'] = $_POST['wb_url'];
40
			$_SESSION['wb_path'] = $_POST['wb_path'];
41
			$_SESSION['default_timezone'] = $_POST['default_timezone'];
42
			if(!isset($_POST['operating_system'])) {
43
				$_SESSION['operating_system'] = 'linux';
44
			} else {
45
				$_SESSION['operating_system'] = $_POST['operating_system'];
46
			}
47
			if(!isset($_POST['world_writeable'])) {
48
				$_SESSION['world_writeable'] = false;
49
			} else {
50
				$_SESSION['world_writeable'] = true;
51
			}
52
			$_SESSION['database_host'] = $_POST['database_host'];
53
			$_SESSION['database_username'] = $_POST['database_username'];
54
			$_SESSION['database_password'] = $_POST['database_password'];
55
			$_SESSION['database_name'] = $_POST['database_name'];
56
			$_SESSION['table_prefix'] = $_POST['table_prefix'];
57
			if(!isset($_POST['install_tables'])) {
58
				$_SESSION['install_tables'] = false;
59
			} else {
60
				$_SESSION['install_tables'] = true;
61
			}
62
			$_SESSION['website_title'] = $_POST['website_title'];
63
			$_SESSION['admin_username'] = $_POST['admin_username'];
64
			$_SESSION['admin_email'] = $_POST['admin_email'];
65
			$_SESSION['admin_password'] = $_POST['admin_password'];
66

  
67
			if(!isset($_POST['outgoing_mails'])) {
68
				$_SESSION['outgoing_mails'] = 'php';
69
			} else {
70
				$_SESSION['outgoing_mails'] = $_POST['outgoing_mails'];
71
			}
72
			$_SESSION['smtp_server'] = $_POST['smtp_server'];
73

  
74
		}
75
		// Set the message
76
		$_SESSION['message'] = $message;
77
		// Specify that session support is enabled
78
		$_SESSION['session_support'] = '<font class="good">Enabled</font>';
79
		// Redirect to first page again and exit
80
		header('Location: index.php?sessions_checked=true');
81
		exit();
82
	}
83
}
84

  
85
// Dummy class to allow modules' install scripts to call $admin->print_error
86
class admin_dummy
87
{
88
	var $error='';
89
	function print_error($message)
90
	{
91
		$this->error=$message;
92
	}
93
}
94

  
95
// Function to workout what the default permissions are for files created by the webserver
96
function default_file_mode($temp_dir) {
97
	$v = explode(".",PHP_VERSION);
98
	$v = $v[0].$v[1];
99
	if($v > 41 AND is_writable($temp_dir)) {
100
		$filename = $temp_dir.'/test_permissions.txt';
101
		$handle = fopen($filename, 'w');
102
		fwrite($handle, 'This file is to get the default file permissions');
103
		fclose($handle);
104
		$default_file_mode = '0'.substr(sprintf('%o', fileperms($filename)), -3);
105
		unlink($filename);
106
	} else {
107
		$default_file_mode = '0777';
108
	}
109
	return $default_file_mode;
110
}
111

  
112
// Function to workout what the default permissions are for directories created by the webserver
113
function default_dir_mode($temp_dir) {
114
	$v = explode(".",PHP_VERSION);
115
	$v = $v[0].$v[1];
116
	if($v > 41 AND is_writable($temp_dir)) {
117
		$dirname = $temp_dir.'/test_permissions/';
118
		mkdir($dirname);
119
		$default_dir_mode = '0'.substr(sprintf('%o', fileperms($dirname)), -3);
120
		rmdir($dirname);
121
	} else {
122
		$default_dir_mode = '0777';
123
	}
124
	return $default_dir_mode;
125
}
126

  
127
function add_slashes($input) {
128
		if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) {
129
			return $input;
130
		}
131
		$output = addslashes($input);
132
		return $output;
133
	}
134

  
135
// Begin check to see if form was even submitted
136
// Set error if no post vars found
137
if(!isset($_POST['website_title'])) {
138
	set_error('Please fill-in the form below');
139
}
140
// End check to see if form was even submitted
141

  
142
// Begin path and timezone details code
143

  
144
// Check if user has entered the installation url
145
if(!isset($_POST['wb_url']) OR $_POST['wb_url'] == '') {
146
	set_error('Please enter an absolute URL');
147
} else {
148
	$wb_url = $_POST['wb_url'];
149
}
150
// Remove any slashes at the end of the URL
151
if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
152
	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
153
}
154
if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
155
	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
156
}
157
if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
158
	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
159
}
160
if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
161
	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
162
}
163
// Get the default time zone
164
if(!isset($_POST['default_timezone']) OR !is_numeric($_POST['default_timezone'])) {
165
	set_error('Please select a valid default timezone');
166
} else {
167
	$default_timezone = $_POST['default_timezone']*60*60;
168
}
169
// End path and timezone details code
170

  
171
// Begin operating system specific code
172
// Get operating system
173
if(!isset($_POST['operating_system']) OR $_POST['operating_system'] != 'linux' AND $_POST['operating_system'] != 'windows') {
174
	set_error('Please select a valid operating system');
175
} else {
176
	$operating_system = $_POST['operating_system'];
177
}
178
// Work-out file permissions
179
if($operating_system == 'windows') {
180
	$file_mode = '0777';
181
	$dir_mode = '0777';
182
} elseif(isset($_POST['world_writeable']) AND $_POST['world_writeable'] == 'true') {
183
	$file_mode = '0777';
184
	$dir_mode = '0777';
185
} else {
186
	$file_mode = default_file_mode('../temp');
187
	$dir_mode = default_dir_mode('../temp');
188
}
189
// End operating system specific code
190

  
191
// Begin database details code
192
// Check if user has entered a database host
193
if(!isset($_POST['database_host']) OR $_POST['database_host'] == '') {
194
	set_error('Please enter a database host name');
195
} else {
196
	$database_host = $_POST['database_host'];
197
}
198
// Check if user has entered a database username
199
if(!isset($_POST['database_username']) OR $_POST['database_username'] == '') {
200
	set_error('Please enter a database username');
201
} else {
202
	$database_username = $_POST['database_username'];
203
}
204
// Check if user has entered a database password
205
if(!isset($_POST['database_password'])) {
206
	set_error('Please enter a database password');
207
} else {
208
	$database_password = $_POST['database_password'];
209
}
210
// Check if user has entered a database name
211
if(!isset($_POST['database_name']) OR $_POST['database_name'] == '') {
212
	set_error('Please enter a database name');
213
} else {
214
	$database_name = $_POST['database_name'];
215
}
216
// Get table prefix
217
$table_prefix = $_POST['table_prefix'];
218
// Find out if the user wants to install tables and data
219
if(isset($_POST['install_tables']) AND $_POST['install_tables'] == 'true') {
220
	$install_tables = true;
221
} else {
222
	$install_tables = false;
223
}
224
// End database details code
225

  
226
// Begin website title code
227
// Get website title
228
if(!isset($_POST['website_title']) OR $_POST['website_title'] == '') {
229
	set_error('Please enter a website title');
230
} else {
231
	$website_title = add_slashes($_POST['website_title']);
232
}
233
// End website title code
234

  
235
// Begin admin user details code
236
// Get admin username
237
if(!isset($_POST['admin_username']) OR $_POST['admin_username'] == '') {
238
	set_error('Please enter a username for the Administrator account');
239
} else {
240
	$admin_username = $_POST['admin_username'];
241
}
242
// Get admin email and validate it
243
if(!isset($_POST['admin_email']) OR $_POST['admin_email'] == '') {
244
	set_error('Please enter an email for the Administrator account');
245
} else {
246
	if(eregi("^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$", $_POST['admin_email'])) {
247
		$admin_email = $_POST['admin_email'];
248
	} else {
249
		set_error('Please enter a valid email address for the Administrator account');
250
	}
251
}
252
// Get the two admin passwords entered, and check that they match
253
if(!isset($_POST['admin_password']) OR $_POST['admin_password'] == '') {
254
	set_error('Please enter a password for the Administrator account');
255
} else {
256
	$admin_password = $_POST['admin_password'];
257
}
258
if(!isset($_POST['admin_repassword']) OR $_POST['admin_repassword'] == '') {
259
	set_error('Please make sure you re-enter the password for the Administrator account');
260
} else {
261
	$admin_repassword = $_POST['admin_repassword'];
262
}
263
if($admin_password != $admin_repassword) {
264
	set_error('Sorry, the two Administrator account passwords you entered do not match');
265
}
266
// End admin user details code
267

  
268
// Get the SMTP server settings and check if valid
269
$smtp_server_used = "mail.example.com";
270
if(isset($_POST['outgoing_mails']) AND $_POST['outgoing_mails']=="smtp") {
271
	if($_POST['smtp_server'] == "" || $_POST['smtp_server'] == "mail.example.com") {
272
		set_error('Please define the SMTP host (Step 7) of your domain or choose option PHP mail().');
273
	} else {
274
		$smtp_server_used = $_POST['smtp_server'];
275
	}
276
}
277

  
278
// Create SMTP server output string for the config.php file
279
if($smtp_server_used == "mail.example.com") {
280
	$smtp_server_used = "// define('WBMAILER_SMTP_HOST', '" .$smtp_server_used ."');\n";
281
} else {
282
	$smtp_server_used = "define('WBMAILER_SMTP_HOST', '" .$smtp_server_used ."');\n";
283
}   
284
// End SMTP server settings
285

  
286
// Try and write settings to config file
287
$config_content = "" .
288
"<?php\n".
289
"\n".
290
"define('DB_TYPE', 'mysql');\n".
291
"define('DB_HOST', '$database_host');\n".
292
"define('DB_USERNAME', '$database_username');\n".
293
"define('DB_PASSWORD', '$database_password');\n".
294
"define('DB_NAME', '$database_name');\n".
295
"define('TABLE_PREFIX', '$table_prefix');\n".
296
"\n".
297
"define('WB_PATH', dirname(__FILE__));\n".
298
"define('WB_URL', '$wb_url');\n".
299
"define('ADMIN_PATH', WB_PATH.'/admin');\n".
300
"define('ADMIN_URL', '$wb_url/admin');\n".
301
"\n".
302
"// some mail provider do not deliver mails send via PHP mail() function as SMTP authentification is missing\n".
303
"// in that case activate SMTP for outgoing mails: un-comment next line and specify SMTP host of your domain\n".
304
$smtp_server_used.
305
"\n".
306
"require_once(WB_PATH.'/framework/initialize.php');\n".
307
"\n".
308
"?>";
309

  
310
$config_filename = '../config.php';
311

  
312
// Check if the file exists and is writable first.
313
if(file_exists($config_filename) AND is_writable($config_filename)) {
314
	if(!$handle = fopen($config_filename, 'w')) {
315
		set_error("Cannot open the configuration file ($config_filename)");
316
	} else {
317
		if (fwrite($handle, $config_content) === FALSE) {
318
			set_error("Cannot write to the configuration file ($config_filename)");
319
		}
320
		// Close file
321
		fclose($handle);
322
	}
323
} else {
324
	set_error("The configuration file $config_filename is not writable. Change its permissions so it is, then re-run step 4.");
325
}
326

  
327
// Define configuration vars
328
define('DB_TYPE', 'mysql');
329
define('DB_HOST', $database_host);
330
define('DB_USERNAME', $database_username);
331
define('DB_PASSWORD', $database_password);
332
define('DB_NAME', $database_name);
333
define('TABLE_PREFIX', $table_prefix);
334
define('WB_PATH', str_replace(array('/install','\install'), '',dirname(__FILE__)));
335
define('WB_URL', $wb_url);
336
define('ADMIN_PATH', WB_PATH.'/admin');
337
define('ADMIN_URL', $wb_url.'/admin');
338

  
339
// Check if the user has entered a correct path
340
if(!file_exists(WB_PATH.'/framework/class.admin.php')) {
341
	set_error('It appears the Absolute path that you entered is incorrect');
342
}
343

  
344
// Try connecting to database	
345
if(!mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD)) {
346
	set_error('Database host name, username and/or password incorrect. MySQL Error:<br />'.mysql_error());
347
}
348

  
349
// Try to create the database
350
mysql_query('CREATE DATABASE '.$database_name);
351

  
352
// Close the mysql connection
353
mysql_close();
354

  
355
// Include WB functions file
356
require_once(WB_PATH.'/framework/functions.php');
357

  
358
// Re-connect to the database, this time using in-build database class
359
require_once(WB_PATH.'/framework/class.login.php');
360
$database=new database();
361

  
362
// Check if we should install tables
363
if($install_tables == true) {
364
	
365
	// Remove tables if they exist
366

  
367
	// Pages table
368
	$pages = "DROP TABLE IF EXISTS `".TABLE_PREFIX."pages`";
369
	$database->query($pages);
370
	// Sections table
371
	$sections = "DROP TABLE IF EXISTS `".TABLE_PREFIX."sections`";
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff