1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<?php
/**
* SquirrelMail Quick Save Plugin
* Copyright (c) 2001-2002 Ray Black <allah@accessnode.net>
* Copyright (c) 2003-2007 Paul Lesniewski <paul@squirrelmail.org>
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* @package plugins
* @subpackage quicksave
*
*/
/**
* Initialize this plugin (load config values)
*
* @return boolean FALSE if no configuration file could be loaded, TRUE otherwise
*
*/
function quicksave_init()
{
if (!@include_once (SM_PATH . 'plugins/quicksave/config.php'))
if (!@include_once (SM_PATH . 'plugins/quicksave/config.sample.php'))
return FALSE;
return TRUE;
}
/**
* Validate that this plugin is configured correctly
*
* @return boolean Whether or not there was a
* configuration error for this plugin.
*
*/
function quicksave_check_configuration_do()
{
// only need to do this pre-1.5.2, as 1.5.2 will make this
// check for us automatically
//
if (!check_sm_version(1, 5, 2))
{
// try to find Compatibility, and then that it is v2.0.7+
//
if (function_exists('check_plugin_version')
&& check_plugin_version('compatibility', 2, 0, 7, TRUE))
return FALSE;
// something went wrong
//
do_err('Quick Save plugin requires the Compatibility plugin version 2.0.7+', FALSE);
return TRUE;
}
}
|