diff options
author | Christoph Burschka | 2014-01-17 16:10:10 +0100 |
---|---|---|
committer | Christoph Burschka | 2014-01-17 16:10:10 +0100 |
commit | 045012f9b7619d441d8c5b5800519cb7ac6891b6 (patch) | |
tree | 4db383cb85c40b1fdc1b4b8c4413950d9134cedf /plugins/session/install.php | |
parent | Apparently that didn't need to be encoded. (diff) | |
download | ejabberd-auth-php-045012f9b7619d441d8c5b5800519cb7ac6891b6.tar.gz |
Okay, the last patch was actually rubbish.
It turns out that you can't hope to bootstrap more
than one PHP-based software without messing stuff
up, particularly because they rely on global variables
without exception. If it is risky and unpredictable for
different systems, it is completely impossible with multiple
instances of the same.
Therefore, the ability to use multiple plugins (and the
accompanying config.php structure) has been removed. The
only plugin that can be used in conjunction with another
is session.
Diffstat (limited to 'plugins/session/install.php')
-rw-r--r-- | plugins/session/install.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/session/install.php b/plugins/session/install.php new file mode 100644 index 0000000..29771b3 --- /dev/null +++ b/plugins/session/install.php @@ -0,0 +1,19 @@ +<?php + +define('ROOT', __DIR__ . '/../../'); + +require_once ROOT . 'plugins/session/session.module'; +require_once ROOT . 'config.php'; + +$db = session_db($config['session']['mysql']); + +$db->exec(sprintf(<<<SQL +CREATE TABLE `%s` ( + username VARCHAR(255), + secret VARCHAR(40), + created INT, + PRIMARY KEY(username, secret), + INDEX(created) +); +SQL +, $config['session']['mysql']['tablename'])); |