##
## static content
##
-static: htdocs/javascript/core.js htdocs/javascript@VERSION
+static: htdocs/javascript/core.js htdocs/javascript@VERSION htdocs/javascript/json2.js
htdocs/javascript/core.js:
cd htdocs/javascript/ && ln -s ../../core/htdocs/javascript/core.js
%@VERSION: % Makefile ChangeLog
cd $< && rm -f $(VERSION) && ln -sf . $(VERSION)
+htdocs/javascript/json2.js: DOWNLOAD_SRC = https://github.com/douglascrockford/JSON-js/raw/master/json2.js --no-check-certificate
+htdocs/javascript/json2.js:
+ @$(download)
+
##
## wiki
##
$this->assign('is_admin', may_update());
$this->assign('is_member', is_member());
}
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
+ $this->addJsLink('json2.js');
+ }
$this->addJsLink('jquery.xorg.js');
$this->addJsLink('overlib.js');
$this->addJsLink('core.js');
// Set the default page
$this->changeTpl('platal/index.tpl');
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
+ $this->addJsLink('json2.js');
+ }
$this->addJsLink('jquery.xorg.js');
$this->addJsLink('overlib.js');
$this->addJsLink('core.js');
function add_to_list_alias(User $user, $local_part, $domain, $type = 'alias')
{
- Platal::assert($user !== null);
+ Platal::assert($user !== null, 'User should not be null.');
XDB::execute('INSERT IGNORE INTO email_virtual (email, domain, redirect, type)
SELECT {?}, id, {?}, {?}
function delete_from_list_alias(User $user, $local_part, $domain, $type = 'alias')
{
- Platal::assert($user !== null);
+ Platal::assert($user !== null, 'User should not be null.');
XDB::execute('DELETE v
FROM email_virtual AS v
function update_list_alias(User $user, $former_email, $local_part, $domain, $type = 'alias')
{
- Platal::assert($user !== null);
+ Platal::assert($user !== null, 'User should not be null.');
XDB::execute('UPDATE email_virtual AS v
INNER JOIN email_virtual_domains AS d ON (v.domain = d.id)
static public function activate_storage(User $user, $storage)
{
- Platal::assert(in_array($storage, self::get_allowed_storages($user)));
+ Platal::assert(in_array($storage, self::get_allowed_storages($user)), 'Unknown storage.');
if (!self::is_active_storage($user, $storage)) {
global $globals;