2 Dec 2002 15:35
Updating plugins to work with 1.3.x: How to check for the version?
Alexandros Vellis <avel <at> noc.uoa.gr>
2002-12-02 14:35:58 GMT
2002-12-02 14:35:58 GMT
I am trying to get avelsieve (SIEVE mail filters) and ldapuserdata (LDAP
prefs backend) to work with 1.3.x (latest CVS). I've figured out the
SM_PATH stuff and the changes in the include directories. Also the LDAP
prefs backend needs a bit more work to make it look and work nice with
the new changes.
Now to my question. I'd like the plugin to work with 1.2.x as well as
1.3.x. Is checking for the $version defined in functions/strings.php
enough? In other words, does this look good to you? :
if (strstr($version, "1.3")) { /* or something to that effect */
/* new way */
include_once (SM_PATH . "include/....");
} elseif (strstr($version, "1.2")) {
/* old way */
chdir (..);
include_once ("../functions/....");
}
Any comments or suggestions would be appreciated!
Cheers,
--
--
Alexandros Vellis University of Athens
avel <at> noc.uoa.gr Network Operations Centre
http://www.noc.uoa.gr/~avel/
Public Key: http://www.noc.uoa.gr/~avel/gpgkey.asc
(Continue reading)


RSS Feed