Dotclear


Ignore:
Timestamp:
04/11/10 14:48:21 (14 years ago)
Author:
Moe
Message:

Contribute 1.0-alpha25 :

  • added a filter against Javascript injections
  • check installed and active plugins
  • display more info on post
  • removed unused code
  • switched to GPL v2 (previous commit [2172]])
File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/contribute/inc/lib.contribute.document.php

    r2172 r2176  
    5757          } 
    5858           
     59          $disabled_plugins = $core->plugins->getDisabledModules(); 
     60           
    5961          $_ctx =& $GLOBALS['_ctx']; 
    6062           
     
    6971           
    7072          # Metadata 
    71           if ($core->plugins->moduleExists('metadata')) 
     73          if ($core->plugins->moduleExists('metadata') 
     74               && !array_key_exists('metadata',$disabled_plugins)) 
    7275          { 
    7376               $meta = new dcMeta($core); 
     
    8083          # My Meta 
    8184          if ($core->plugins->moduleExists('mymeta') 
    82                && ($settings->contribute_allow_mymeta)) 
     85               && ($settings->contribute_allow_mymeta) 
     86               && !array_key_exists('mymeta',$disabled_plugins)) 
    8387          { 
    8488               $mymeta_values = array(); 
     
    264268                     
    265269                    # avoid Notice: Indirect modification of overloaded property 
    266                     # record::$post_excerpt has no effect in .../contribute/_public.php 
    267                     # on line 146 
    268                     $post_excerpt = $post->post_excerpt; 
    269                     $post_excerpt_xhtml = $post->post_excerpt_xhtml; 
    270                     $post_content = $post->post_content; 
    271                     $post_content_xhtml = $post->post_content_xhtml; 
    272                      
    273                     # HTML filter 
    274                     # get the setting value 
    275                     $enable_html_filter = $settings->enable_html_filter; 
    276                     # set the setting to true 
    277                     $settings->enable_html_filter = true; 
     270                    # record::$post_excerpt has no effect in [this file] 
     271                    # on line [...] 
     272                     
     273                    # filter to remove JavaScript 
     274                    $post_excerpt = contribute::HTMLfilter($post->post_excerpt); 
     275                    $post_excerpt_xhtml = contribute::HTMLfilter($post->post_excerpt_xhtml); 
     276                    $post_content = contribute::HTMLfilter($post->post_content); 
     277                    $post_content_xhtml = contribute::HTMLfilter($post->post_content_xhtml); 
    278278                     
    279279                    $core->blog->setPostContent( 
     
    282282                         $post_content,$post_content_xhtml 
    283283                    ); 
    284                      
    285                     # set the old value to the setting 
    286                     $settings->enable_html_filter = $enable_html_filter; 
    287                     unset($enable_html_filter); 
    288284                     
    289285                    $post->post_excerpt = $post_excerpt; 
     
    398394                         && (isset($_POST['post_notes']))) 
    399395                    { 
    400                          $post->post_notes = $_POST['post_notes']; 
     396                         $post->post_notes = contribute::HTMLfilter($_POST['post_notes']); 
    401397                    } 
    402398                     
     
    492488                         # antispam 
    493489                         if ($settings->contribute_enable_antispam 
    494                               && $core->plugins->moduleExists('antispam')) 
     490                              && $core->plugins->moduleExists('antispam') 
     491                              && !array_key_exists('antispam',$disabled_plugins)) 
    495492                         { 
    496493                              $cur = $core->con->openCursor($core->prefix.'comment'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map