R5.5 Change Log

5.5

(12.08.2016) Revision:3400 -> RC2 (Release Notes)


- Release Candidate - As work on WackoWiki 5.5 is still underway, this is an incomplete list of changes.

1. Actions

  • toc: allow missing heading levels in table of content
  • fixed inconsistent use of alias 'page' for 'for' / 'root' in actions -> use page= from now on 
  • topics: allow user to edit his forum posts per default
  • include: hide edit link in include if user has no rights to edit the included page
  • menu: fixed broken setting with system=1 (guests)
  • files: fixed false reference for files_cache, added parameter track (default off)
  • removed
    • permalinkproxy
    • permalink

2. Configuration

  1. disabled registration by default in config

2.1. primary config

  1. added
    • hashid_seed
  2. removed
    • header_action
    • footer_action
    • classes_path
    • action_path -> ACTION_DIR
    • formatter_path -> FORMATTER_DIR
    • handler_path -> HANDLER_DIR
    • theme_path -> THEME_DIR
    • upload_path -> UPLOAD_DIR_GLOBAL
    • upload_path_per_page -> UPLOAD_DIR_PER_PAGE
    • upload_path_backup -> UPLOAD_DIR_BACKUP
    • cache_dir -> CACHE_DIR

2.2. secondary config

  1. renamed
    • session_expiration -> session_length
    • x_csp -> csp
  2. new 
    • allow_persistent_cookie
    • allowed_languages
    • footer_tags
    • link_target
    • sorting_comments
    • ext_bad_behavior
    • approve_new_user
    • enable_referrers
    • menu_items
    • hide_article_header
    • enable_captcha
    • list_count
    • noreply_email
    • noreferrer
    • nofollow
  3. removed
    • x_frame_option
    • session_encrypt_cookie
    • allow_swfobject
    • revisions_hide_cancel
    • session_prefix
    • cookie_prefix
    • date_precise_format -> date_format and time_format_seconds
    • date_macro_format -> date_format and time_format
    • phpmailer

2.3. user settings

  1. new 
    • sorting_comments
    • notify_minor_edit
    • notify_page
    • notify_comment
    • menu_items
  2. renamed
    • changes_count -> list_count
  3. removed
    • revisions_count -> list_count

2.4. constants

  1. new 
    • RECOVERY_MODE
    • LINK_PAGE
    • LINK_FILE
    • DAYSECS
    • CONFIG_DIR
    • CONFIG_FILE
    • CONFIG_DEFAULTS
    • SITE_LOCK
    • AP_LOCK
    • ACTION_DIR
    • FORMATTER_DIR
    • HANDLER_DIR
    • IMAGE_DIR
    • THEME_DIR
    • UPLOAD_GLOBAL_DIR
    • UPLOAD_PER_PAGE_DIR
    • UPLOAD_BACKUP_DIR
    • XML_DIR
    • CACHE_DIR
    • CACHE_CONFIG_DIR
    • CACHE_FEED_DIR
    • CACHE_PAGE_DIR
    • CACHE_SQL_DIR
    • SITEMAP_XML
  2. renamed
    • TRAN_DONTCHANGE -> TRANSLIT_DONTCHANGE
    • TRAN_LOWERCASE -> TRANSLIT_LOWERCASE
    • TRAN_LOAD -> TRANSLIT_LOAD
    • TRAN_DONTLOAD -> TRANSLIT_DONTLOAD
    • ACTIONS4DIFF -> ACTION4DIFF
  3. removed
    • SQL_NULLDATE
    • CSP_CUSTOM -> csp_custom.conf

3. Core

  • major refactoring of init system
  • new session handler
  • URI router
  • new template engine
  • fixed missing slash in LIKE condition to clone, backup or rename cluster
  • using password_hash() and password_verify() API 
  • replaced the error prone use of KiB for upload quota with Bytes
  • public registration moderation by admin
  • added auth and form form token
  • give all forms unique names
  • $_REQUEST allows only $_GET and $_POST
  • add config option: 'allow_persistent_cookie'
  • file:attachment.ext loads now the local file before the global file
    • it tries to load the local file first and only if there is none, it loads the global file
    • to force the global file with the same name use file:/attachment.ext
  • added option to write sitemap only once in a given period
  • Captcha works again out of the box 
  • set <META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW"> for meta pages like page index, recent changes
  • fixed broken moderator notification
  • switched diff mode for notify_watcher email to source diff
  • fixed DEFAULT value error in save_revision function (STRICT_TRANS_TABLES SQL mode)
  • invalidate cache for pages with form tokens like login and registration: $this->disable_cache = true; in no_cache($client_only = false)
  • removed deprecated X-Frame-Options in favor of the frame-ancestors directive from the CSP Level 2 specification
  • saves now also page lang with revision
  • unset PHP default_charset for page cache to avoid encoding disagrees ini_set('default_charset', NULL);
  • reimplemented target="_blank" as a user option for external links
  • set link to ((user:UserName UserName)) via config['users_page'] in link() function
  • set link to ((group:GroupName GroupName)) via config['groups_page'] in link() function
  • implemented file link tracking file:we_track_reference_like_we_do_for_links.txt
  • separate email address for sending emails noreply_email, Send From / No-reply address e.g. noreply@example.com

3.1. Methods


  • added function
    • validate_email($email_address)
    • validate_form_token($form_name)
    • affected_rows($dblink, $results)
    • can_upload() – checks if user has all rights required to upload files
    • update_link_table()
    • set_user_trail($size = 5)
    • get_user_trail($titles = false, $separator = ' > ', $linking = true, $size)
    • binary_multiples_factor ($size, $prefix = true)
    • load_file_usage($file_id, $for = '')
    • set_cookie($name, $value, $days = 0, $persistent = false, $secure = 0, $httponly = 1)
    • user_link($user_name, $account_lang = '', $linking = true, $add_icon = true)
    • group_link($group_name, $group_lang = '', $linking = true, $add_icon = true)
    • notify_moderator($page_id, $tag, $title, $user_name)
    • notify_watcher($page_id, $comment_on_id, $tag, $title, $page_body = '', $user_id, $user_name, $is_revision)
    • get_list_count($max, $default = 50)
    • show_pagination($pagination = '')
    • write_sitemap($write_site_map = false, $update = false)
    • autocomplete_off()
  • modified function
    • no_cache($client_only = true) – added option to disable also server cache for a page, default false (required for form tokens)
    • form_open($form_name = '', [])
  • renamed function
    • get_translation() -> _t()
    • user_is_owne()r -> is_owner()
    • load_recently_deleted() -> load_deleted()
    • load_recently_changed() -> load_changed()
    • load_recently_comment() -> load_comment()
    • get_time_string_formatted() -> get_time_formatted()
    • set_session_cookie() -> set_cookie()
    • set_persistent_cookie() -> set_cookie()
    • header() -> theme_header()
    • footer() -> theme_footer()
  • removed function
    • get_page_time_formatted() -> get_time_formatted($this->page['modified'])

3.2. Classes


  • added class
    • ... plus add a short explanation
  • renamed class
    • RSS -> Feed

3.3. Folders

  • renamed folders
    • actions -> action
    • classes -> class
    • formatters -> formatter
    • handlers -> handler
    • icons -> icon
    • images -> image
    • modules -> module
    • themes -> theme

3.4. URI router

foo://example.com:8042/over/there?name=ferret#nose
\_/   \______________/\_________/ \_________/ \__/
 |           |            |           |        |
scheme     authority     path        query   fragment
 |     ___________________|__
/ \   /                      \
urn:example:animal:ferret:nose


config/router.conf

// whole idea is to take URI path, _GET/_PUT/_SERVER data and other
// meta-data, then process rules in this file sequentially, which
// results in dispatched handler to process query,
// and all arguments extracted from URI for furher usage by those handlers
// (e.g. you can extract parts of URI to _GET vars, etc.)


// 'language' guide:
// every line of code consists of regex which matched against URI, and
// actions, all separated by whitespace. there are no possibility to
// include whitespace in regex or action.
// regex will be matched against URI, on success all actions executed, on failure - we go for next regex.
// lines without regex is continuations for same regex, and will be executed sequentially if regex matched.

// every single action can succeed or fail. if any one fails - all
// variable assignments made by THIS line (even before failed action) is
// discarded, and we go to next line.

// two control action exist (all action line must succeed for them to act!)
//	_next!		-- jump to next regex (skip next action lines with empty regex)
//	_ok!		-- search terminated with success
// if no _ok! executed ever - search fails and 404 emitted

// that's all on control flow.

// main regex:
// http://php.net/manual/en/reference.pcre.pattern.syntax.php -- usual php preg_* regex syntax apply, including
// delimiters and options after trailing delimiter.
// convenience macros (defined by 'define' line, or supplied by wackowiki) expanded before matching.
// used as {macro} - to be referenced as $1-vars then, or {var=macro} - for inline assignment.
// macros cannot be used in ~-regexes

// VARIABLES:
//	$0..$9	- fields matched by main regex. $0 is complete match, $1 and later - corresponding (...) parts
//	$a..$j	- as $0..$9 but set by sub-matched (by ~ operator) patterns 
//	Gname	- _GET[name]
//	Pname	- _PUT[name]
//	Sname	- _SERVER[name]
//	others	- local variables
// predefined vars:
//	_tls		- 1 or 0, tls session
//	_uri		- parsed URI (it is matched against main regex, but can be changed by assignment)
//	_method		- _SERVER[REQUEST_METHOD]
//	_rewrite	- 1 or 0, mod_rewrite active
// usage of undefined variables considered a failure (if not masked by @ in VALUE expansion, see later)

// ACTIONS:
// similar format used for all actions (not all fields apply for every action, and just ignored):
//		VARIABLE[:FUNCTION]operatorVALUE

// value is a string, with expanded variables. expansions:
//	$0 .. $9 / $a .. $j -- see above
//	${name}
//	@$... format can be used to mask undefined variable error
//	$$ - replaced by $
//	$@ - replaced by @

// assignments:
// 	FUNCTIONs can be used: tolower | toupper | int
//	var=$1
//	var:tolower=$1
//	var?=$2				-- assign if not set
//	var!				== var=1
//	dbg=$1,$2,$3		-- Ut::dbg printer ;)

// pattern matching:
//	var~/regex/i			-- sets $a..$j on success
//	var!~/regex/i
//	var~hashid:[1-9]		-- hashid expansion, into $a...
//	var!~hashid:[1-9]

// comparisons:
//	FUNCTIONS can be used: int -- both args converted to int before comparison
//	var==12    var!=12    var:int<12    var>12    var<=12    var>=12

// others:
// var?					-- isset
// var-					-- unset

//define	{method}	name|name|name		// predefined by wackowiki
define		{hashid}	[0-9a-zA-Z]+
define		{i}			[0-9]+
define		{h}			[0-9a-fA-F]+
define		{a}			[0-9a-zA-Z]+
define		{w}			[\w]+
define		{}			[^/]*
define		{*}			.*?
define		{**}		.*

//`^{hashid}$`						$1~hashid:2 Gone=$a Gtwo=$b all=$0+${Gone} _ok! _tls!=0 _method~/g(e)t/i BIN:tolower=$b Pln=${_line}
//									desc=$0 term:tolower=MyMethod term!= Gmethod=show _ok!
//`^{hashid}/{Op=*}/{Mode=**}$`
//									Op!~/^diff$/i &next!
//									$1~hashid:2 Gone=$a Gtwo=$b Gmethod:tolower=${Op} _ok! // test

`^`
		SPATH_INFO!= _uri=${SPATH_INFO} _next!		// if PATH_INFO available - use it
		_rewrite==0 _uri=@${Gpage} Gpage-			// when rewrite mode is off - replace _uri by page _GET variable

`^/*{_uri=*}/*$`	// trim _uri of beginning & trailing slashes
`^index\.(php|html)$`									_uri=

'^'												route=static age=30 static=${_uri}

`^robots\.txt$`										_ok!
`^sitemap\.xml$`									_ok! age=0 

`^(theme/{}/css|theme/_common|admin/style)/{}$`			_ok!	// css
`^image/(wikiedit/)?{}$`								_ok!	// icons
`^theme/default/icon/{}$`								_ok!	// icons
`^js/(lang/)?{}$`									_ok!	// js
`^files/global/{}$`									_ok!	// global uploads
`^setup/(image|css)/{}$`								_ok! unlock=1	// setup inlines
`^xml/{}$`											_ok! age=0	// feeds

'^'												_ok! _install!=0 route=install unlock=1
												session=1 age- static-

`^\.freecap$`										_ok! route=freecap

'^'												engine=1 route=wacko

`^admin\.php$`										_ok! route=admin

`^{}(/.*)?$`
		$1~hashid:2 page=$ax$b method=Hashid _ok!
		// $1~hashid:2 Gpage_id=$a Gversion_id=$b page= method=show redirect=301 _ok!

//`^{i}rev{i}$`
//		page=$1x$2 method=Hashid redirect=301 _ok!

//`^{page=}$`
//		method=show _ok!

`^(|{page=**}/){method}(/.*?)?$`i
		method:tolower=$3 _ok!

// catch-all
`{page=**}`
		method=show _ok!

4. Database

  1. added table auth_token
  2. added table file_link
  3. renamed field session_expiration to session_length in table user_setting
  4. renamed parent to parent_id in category table
  5. updated default values for standard_handlers in config table
  6. increased name to CHAR(40) in cache table
  7. renamed session_time to last_visit in user table
  8. added field user_ip VARCHAR(40) to user table
  9. renamed moderator to moderator_id in usergroup table
  10. added primary key referrer_id to referrer table
  11. added field sorting_comments to user_setting table
  12. renamed field changes_count to list_count in user_setting table -> default number of records per page in lists
  13. removed field revisions_count in user_setting table
  14. added field description to category table
  15. increased password to VARCHAR(255) in user table
  16. renamed field lang to page_lang in page and revision table
  17. renamed field lang to category_lang in category table
  18. renamed field lang to cache_lang in cache table
  19. renamed field lang to menu_lang in menu table
  20. renamed field lang to tag_lang in tag table
  21. renamed field lang to file_lang in file table
  22. renamed field lang to user_lang in user_setting table
  23. added field account_lang to user table
  24. added field group_lang to usergroup table
  25. removed field salt from user table, but remains in upgraded installation
  26. added field account_status to user table
  27. added field menu_items in user_setting table
  28. changed field title to VARCHAR(250) in page and revision table
  29. added field version_id to page table
  30. changed field edit_note to VARCHAR(200) in page and revision table
  31. added field page_size INT(10) to page and revision table
  32. renamed table link to page_link
  33. renamed field description to category_description in category table
  34. renamed table upload to file
  35. renamed field upload_id to file_id in file table

5. Installer

  • added option to select only a subset of the available languages with multilanguage on 
  • set noindex true for all default pages except for Home and Admin page
  • removed old unused secondary config settings
  • use version_compare() scheme for upgrade, e.g. version_compare('5.5.rc', '5.5.beta2')
  • fixed DEFAULT values errors for columns 'body_r' and 'body_toc' (STRICT_TRANS_TABLES SQL mode)
  • added missing default values in table creation scripts
  • checks if database version is lower then 5.6.4 and sets engine to MyISAM if necessary

6. Formatters

  • removed redundant anchor <a name="[p|h]1249-1">
  • use new HTML5 <mark> tag for ??highlight text?? syntax
  • added support for SVG files
  • removed double nested pre tag if highlighter class is used
  • implemented ACTION4DIFF, sets allowed actions in DIFF
  • added option to add rel= noreferrer and nofollow to external links
  • added anchor link to headings

7. Handlers

  1. show: fixed broken redirect after editing a page comment with active paging
  2. renamed ms to wordprocessor
  3. diff: added a link to switch directly between full and simple diff
  4. referrers: added anchor for internal links
  5. _comments: toggle setting that allows users to list comments either with the most recent OR the oldest comment at the top of the list of page comments
  6. upload: added missing file path for local file in preview link
  7. allowed Admin to fix e.g. typos in comments of other users
  8. properties: show keywords with related categories in page properties
  9. remove: updates menu array in session after deleting a related page
  10. show: moved page title (H1) from theme header to show handler
    • to suppress the page title you can set hide_article_header true in your action or theme
  11. added option to turn external referrers off or to show them only to Administrators, off by default
  12. added attachments handler
  13. added filemeta handler

8. WikiEdit

9. Admin panel (BETA)

  1. now you must be logged as Admin in the first place to access the admin panel
  2. recovery password login (in case of db corruption) -> requirers to set RECOVERY_MODE to 1
  3. fixed broken groups management
  4. backup & restore:
    1. fixed broken processing of default values with '' and 'timestamp'
    2. uses now the DEFAULT keyword to restore empty values
    3. fixed broken backup and restore for cluster
  5. fixed Admin Panel sets mode_rewrite allways on 
  6. added AP Module to convert MyIsam to InnoDB / XtraDB
  7. added AP Module for Bad Behavior extension
  8. added AP Module for User approval
  9. loads separate lang files for Admin panel

10. Extensions

  1. added Bad Behavior extension

11. Themes

  1. replaced GIF with PNG/SVG icons
  2. HTML5 Migration
  3. removed smooth scrolling JavaScript functions in default.js
  4. default: use reverse hierarchy order in titles
  5. default: bookmarks as dropdown
  6. moved theme icons to default.css
  7. moved wiki link icons to wacko.css

12. Translations

13. Packages

added


updated


removed

  • SWFObject

Note that the changelog is usually incomplete, for a complete list of changes that went into R5.5, you can browse the Mercurial log, the Bug Tracker Log and ToDo list.