Implementation of the Quota API for servers keeping quota information in a custom SQL database.
Driver must be configured in imp/config/servers.php. Parameters supported:
phptype -- Database type to connect to hostspec -- Database host username -- User name for DB connection password -- Password for DB connection database -- Database name query_quota -- SQL query which returns single row/column with user quota (in bytes). %u is replaced with current user name, %U with the user name without the domain part, %d with the domain. query_used -- SQL query which returns single row/column with user used space (in bytes). Placeholders are the same like in query_quota.
Example how to reuse Horde's global SQL configuration:
$Horde: imp/lib/Quota/sql.php,v 1.6.2.5 2009/02/17 17:13:51 chuck Exp $
Copyright 2006-2007 Tomas Simonaitis <haden@homelan.lt> Copyright 2006-2009 The Horde Project (http://www.horde.org/)
See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
Located in /lib/Quota/sql.php (line 44)
IMP_Quota | --IMP_Quota_sql
State of SQL connection.
SQL connection object.
Inherited from IMP_Quota
IMP_Quota::$_params
Returns quota information.
Connects to the database
Inherited From IMP_Quota
IMP_Quota::IMP_Quota()
IMP_Quota::factory()
IMP_Quota::getMessages()
IMP_Quota::getQuota()
IMP_Quota::singleton()
Documentation generated on Sun, 30 Jan 2011 05:28:18 +0000 by phpDocumentor 1.4.3