This provides a pure PHP implementation of the gettext functions.
This should help get laconica running on shared hosting environments where PHP's gettext module may not be installed.
Also gets us one step closer to running on Mac OS X 10.5 with Apple's preinstalled PHP, which doesn't provide an easy way to add modules.
Source: http://savannah.nongnu.org/projects/php-gettext
Copyright (c) 2005 Steven Armstrong <sa at c-area dot ch>
GPLv2 or later
The logic in _sn_to_path() doesn't make sense when not running via a remote server.
Default to the empty string if running from the command line and ['server']['path']
is not set manually in config.php
For Example, let's say 'alias' was an alias for the group 'group'.
Previously, if you went to '/group/group' it'd work, but '/group/alias' it'd say "No Such Group".
This was untrue.
Now it checks aliases when it can't find a group with a given name.
If it finds one it redirects you to the original group.
http://laconi.ca/trac/ticket/1563
OpenSearch description info is now sent with correct Content-Type: application/opensearchdescription+xml instead of text/html.
If $config['openid']['enabled'] is set to false, OpenID is removed from
the navigation and direct accesses to OpenID login pages redirect to the
login page.
If OpenID is enabled, $config['site']['openidonly'] is ignored, i.e.
OpenID is required to go OpenID-only.
N is defined in the DB_DataObject class, which this class kind of extends. So to keep a consistent interface for consumers, we need to have N defined here.
The reason for this is that table 'file' column 'url' is a VARCHAR(255) in MySQL and it silently truncates URLs longer than 255 characters, breaking the url.
The proper fix for this is to improve this column, making its type TEXT, but there are no database changes for 0.8.x, so this is the next best thing for data integrity. A migration script for 0.9.x could be written to audit the database checking for redirects and updating these urls to their proper canonical url.
IE7+ will ask for this (opensearch/people and opensearch/notice) on every page access, and as the content is not sensitive, returning it is better than a 307 redirect.
bug on line 381 referred to non existant variable, and caused a php notice and potentially would create a misconfigured config.php database type setting.