Removed PHP 4 compatibility, moved the plugin up to 1.1.7 level APIs default tip
authorDan Fuhry <dan@enanocms.org>
Fri, 09 Jul 2010 21:33:35 -0400
changeset 1 1666d776fa27
parent 0 df77b4db90d7
Removed PHP 4 compatibility, moved the plugin up to 1.1.7 level APIs
plugins/Linkchomper.php
--- a/plugins/Linkchomper.php	Fri Oct 17 22:04:53 2008 -0400
+++ b/plugins/Linkchomper.php	Fri Jul 09 21:33:35 2010 -0400
@@ -431,7 +431,8 @@
           $before_html = strval(trim($_POST['link_before_html']));
           $after_html  = strval(trim($_POST['link_after_html']));
           
-          if ( !$session->get_permissions('php_in_pages') )
+          $perms = $session->fetch_page_acl('LinkChomper', 'System');
+          if ( !$perms->get_permissions('html_in_pages') )
           {
             // Not allowed to embed PHP and Javascript
             $before_html = sanitize_html($before_html);
@@ -509,7 +510,8 @@
           $before_html = strval(trim($_POST['link_before_html']));
           $after_html  = strval(trim($_POST['link_after_html']));
           
-          if ( !$session->get_permissions('php_in_pages') )
+          $perms = $session->fetch_page_acl('LinkChomper', 'System');
+          if ( !$perms->get_permissions('php_in_pages') )
           {
             // Not allowed to embed PHP and Javascript
             $before_html = sanitize_html($before_html);
@@ -764,15 +766,6 @@
   }
   
   /**
-   * PHP 4 constructor
-   */
-  
-  function LinkchomperFormGenerator()
-  {
-    $this->__construct();
-  }
-  
-  /**
    * Generates the ready to use HTML.
    * @return string
    */