[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[13786]
From:       jervfors () users ! sourceforge ! net
Date:       2009-06-07 10:17:59
Message-ID: E1MDFRv-0005Xk-Hs () dn4whf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 13786
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13786&view=rev
Author:   jervfors
Date:     2009-06-07 10:17:59 +0000 (Sun, 07 Jun 2009)

Log Message:
-----------
Adding an example for older SquirrelMail versions.

Modified Paths:
--------------
    trunk/documentation/devel/devel.sgml

Modified: trunk/documentation/devel/devel.sgml
===================================================================
--- trunk/documentation/devel/devel.sgml	2009-06-04 06:30:32 UTC (rev 13785)
+++ trunk/documentation/devel/devel.sgml	2009-06-07 10:17:59 UTC (rev 13786)
@@ -2464,7 +2464,7 @@
 
 There is also a legacy version reporting mechanism that we would like plugin
 authors to implement, since we are still in a transition period between the
-older and newer reporting usages. The now deprecated reporting mechanism  is to
+older and newer reporting usages. The now deprecated reporting mechanism is to
 create a file called <tt/version/ in the plugin directory. That file should
 have only two lines: the first line should have the name of the plugin as
 named on the SquirrelMail web site (this is often a prettified version of the plugin
@@ -2487,7 +2487,6 @@
 
 FIXME: more here about how to secure exec() calls with escapeshellarg() and named \
pipes method vs exec()  
-
 <sect2>Storing sensitive data
 <p>
 If a plugin needs to store sensitive user configuration files or other such data,
@@ -2524,16 +2523,22 @@
 
 <sect2>Disallowing access for diabled plugins
 <p>
-
 In some cases, it is also prudent to make sure that the plugin doesn't perform
 its function when it is not enabled. Any functions or files that contain PHP
 code that is <tt/not/ wrapped inside a function can be protected from being
 executed when the plugin is not activated by adding code similar to this:
 
 <tscreen><verb>
+# Since SquirrelMail 1.5.1.
 if ( !is_plugin_enabled('my_plugin_name') ) {
     exit('The plugin my_plugin_name isn't enabled in the SquirrelMail \
configuration.');  }
+
+# In SquirrelMail 1.4 and 1.5.0.
+global $plugins;
+if ( !in_array('mypluginname', $plugins) ) {
+    exit('The plugin my_plugin_name isn't enabled in the SquirrelMail \
configuration.'); +}
 </verb></tscreen>
 
 Note, however, that sometimes <tt/other/ plugins can legitimately access a


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic