Dotclear

Changeset 3120


Ignore:
Timestamp:
02/18/13 21:49:28 (11 years ago)
Author:
Moe
Message:

Subscribe to comments 1.4-alpha2: fixed bug with spam (closes #731)

Location:
plugins/subscribeToComments
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • plugins/subscribeToComments/_admin.php

    r2294 r3120  
    3232     $core->auth->check('admin',$core->blog->id)); 
    3333 
    34 if ($core->blog->settings->subscribetocomments_active) 
     34$core->blog->settings->addNamespace('subscribetocomments'); 
     35if ($core->blog->settings->subscribetocomments->subscribetocomments_active) 
    3536{ 
    3637     $core->addBehavior('coreAfterCommentCreate',array('subscribeToComments', 
     
    6667      
    6768     /** 
    68      display informations on the admin comment form 
     69     display information on the admin comment form 
    6970     @param    rs <b>recordset</b> Recordset 
    7071     @return   <b>string</b>  String 
  • plugins/subscribeToComments/_define.php

    r2594 r3120  
    3232     /* Description*/                "Subscribe to comments by email", 
    3333     /* Author */                    "Moe (http://gniark.net/)", 
    34      /* Version */                   '1.4-alpha1', 
     34     /* Version */                   '1.4-alpha2', 
    3535     /* Permissions */               'admin' 
    3636); 
  • plugins/subscribeToComments/_install.php

    r2294 r3120  
    2727 
    2828if (!defined('DC_CONTEXT_ADMIN')) {return;} 
     29 
     30// une erreur dans @Reply a fait passer cette version à 1.6.4 
     31// il faudrait ramener cette valeur à un niveau "normal" 
    2932 
    3033# On lit la version du plugin 
  • plugins/subscribeToComments/_public.php

    r2594 r3120  
    4040} 
    4141 
    42 if ($core->blog->settings->subscribetocomments_active) 
     42$core->blog->settings->addNamespace('subscribetocomments'); 
     43if ($core->blog->settings->subscribetocomments->subscribetocomments_active) 
    4344{ 
    4445     # behaviors 
     
    9293 
    9394     # add code to post.html 
    94      if ($core->blog->settings->subscribetocomments_tpl_checkbox === true) 
     95     if ($core->blog->settings->subscribetocomments->subscribetocomments_tpl_checkbox === true) 
    9596     { 
    9697          $core->addBehavior('publicCommentFormAfterContent', 
    9798               array('subscribeToCommentsTpl','publicCommentFormAfterContent')); 
    9899     } 
    99      if ($core->blog->settings->subscribetocomments_tpl_css === true) 
     100     if ($core->blog->settings->subscribetocomments->subscribetocomments_tpl_css === true) 
    100101     { 
    101102          $core->addBehavior('publicHeadContent', 
    102103               array('subscribeToCommentsTpl','publicHeadContent')); 
    103104     } 
    104      if ($core->blog->settings->subscribetocomments_tpl_link === true) 
     105     if ($core->blog->settings->subscribetocomments->subscribetocomments_tpl_link === true) 
    105106     { 
    106107          $core->addBehavior('templateAfterBlock', 
  • plugins/subscribeToComments/inc/class.subscriber.php

    r2294 r3120  
    172172               $cur->insert(); 
    173173 
    174                if ($core->blog->settings->subscribetocomments_subscribe_active) 
     174               if ($core->blog->settings->subscribetocomments->subscribetocomments_subscribe_active) 
    175175               { 
    176176                    # email 
     
    214214 
    215215          $url = subscribeToComments::url(). 
    216           (($core->blog->settings->url_scan == 'query_string') ? '&' : '?'). 
     216          (($core->blog->settings->system->url_scan == 'query_string') ? '&' : '?'). 
    217217          'new_email='.urlencode($new_email).'&temp_key='.$key; 
    218218 
     
    434434           
    435435          return(subscribeToComments::url(). 
    436           (($core->blog->settings->url_scan == 'query_string') ? '&' : '?').'email='. 
     436          (($core->blog->settings->system->url_scan == 'query_string') ? '&' : '?').'email='. 
    437437          urlencode($email).'&key='.$key); 
    438438     } 
  • plugins/subscribeToComments/inc/lib.subscribeToComments.document.php

    r2294 r3120  
    4141          global $core; 
    4242 
    43           if (!$core->blog->settings->subscribetocomments_active) 
     43          if (!$core->blog->settings->subscribetocomments->subscribetocomments_active) 
    4444          { 
    4545               self::p404(); 
  • plugins/subscribeToComments/inc/lib.subscribeToComments.php

    r2294 r3120  
    6868 
    6969          if ($_SERVER['REQUEST_TIME'] <=  
    70                $core->blog->settings->subscribetocomments_clean_keys) {return;} 
     70               $core->blog->settings->subscribetocomments->subscribetocomments_clean_keys) {return;} 
    7171 
    7272          $core->blog->settings->setNameSpace('subscribetocomments'); 
     
    102102          global $core; 
    103103           
    104           $setting = $core->blog->settings->{'subscribetocomments_'.$setting}; 
     104          $setting = $core->blog->settings->subscribetocomments->{'subscribetocomments_'.$setting}; 
    105105           
    106106          if (strlen($setting) == 0) {return '';} 
     
    150150               $tags_email; 
    151151           
    152           $settings =& $core->blog->settings; 
     152          $settings =& $core->blog->settings->subscribetocomments; 
    153153           
    154154          # load locales for the blog language 
    155155          l10n::set(dirname(__FILE__).'/../locales/'.$lang.'/admin'); 
    156            
    157           $settings->setNameSpace('subscribetocomments'); 
    158156           
    159157          # Change From: header of outbound emails 
     
    323321 
    324322          $post_types = @unserialize( 
    325                $core->blog->settings->subscribetocomments_post_types); 
     323               $core->blog->settings->subscribetocomments->subscribetocomments_post_types); 
    326324 
    327325          if (empty($post_types)) 
     
    371369          # We don't want notification for spam and trackbacks 
    372370          # from emailNotification (modified) 
    373           if (($cur->comment_status != 1) OR ($cur->comment_trackback == 1))  { 
     371          if ($cur->comment_status == 1)  { 
    374372               return; 
    375373          } 
     374           
    376375          # /from emailNotification 
    377376 
     
    451450 
    452451          $headers = array( 
    453                'From: '.$core->blog->settings->subscribetocomments_email_from, 
     452               'From: '.$core->blog->settings->subscribetocomments->subscribetocomments_email_from, 
    454453               'MIME-Version: 1.0', 
    455454               'Content-Type: text/plain; charset=UTF-8;', 
  • plugins/subscribeToComments/inc/lib.subscribeToComments.tpl.php

    r2594 r3120  
    5555          global $core; 
    5656 
    57           if ($core->blog->settings->subscribetocomments_active) 
     57          if ($core->blog->settings->subscribetocomments->subscribetocomments_active) 
    5858          { 
    5959               return("<?php echo(subscribeToComments::url().". 
    60                "((\$core->blog->settings->url_scan == 'query_string') ? '&amp;' : '?').". 
     60               "((\$core->blog->settings->system->url_scan == 'query_string') ? '&amp;' : '?').". 
    6161               "'post_id='.\$_ctx->posts->post_id); ?>"); 
    6262          } 
     
    287287               # else 
    288288               return  
    289                '<?php if (($core->blog->settings->subscribetocomments_active) && 
     289               '<?php if (($core->blog->settings->subscribetocomments->subscribetocomments_active) && 
    290290                    $_ctx->posts->commentsActive()) : ?> 
    291291                    <div id="subscribetocomments_block"> 
     
    293293                         <p> 
    294294                              <a href="<?php echo(subscribeToComments::url(). 
    295                               (($core->blog->settings->url_scan == "query_string") ? "&amp;" : "?"). 
     295                              (($core->blog->settings->system->url_scan == "query_string") ? "&amp;" : "?"). 
    296296                              "post_id=".$_ctx->posts->post_id); ?>"> 
    297297                                   <!-- # If the subscriber is logged in --> 
     
    327327           
    328328          return  
    329           '<?php if (($core->blog->settings->subscribetocomments_active) && 
     329          '<?php if (($core->blog->settings->subscribetocomments->subscribetocomments_active) && 
    330330               $_ctx->posts->commentsActive()) : ?> 
    331331               <div'.$id.''.$class.'> 
     
    333333                    <p> 
    334334                         <a href="<?php echo(subscribeToComments::url(). 
    335                          (($core->blog->settings->url_scan == "query_string") ? "&amp;" : "?"). 
     335                         (($core->blog->settings->system->url_scan == "query_string") ? "&amp;" : "?"). 
    336336                         "post_id=".$_ctx->posts->post_id); ?>"> 
    337337                              <!-- # If the subscriber is logged in --> 
  • plugins/subscribeToComments/index.php

    r2594 r3120  
    108108); 
    109109 
    110 $settings =& $core->blog->settings; 
     110$core->blog->settings->addNamespace('subscribetocomments'); 
     111$settings =& $core->blog->settings->subscribetocomments; 
    111112 
    112113# get languages list to restore settings 
     
    134135 
    135136$available_tags = array(); 
    136  
    137 $settings->setNameSpace('subscribetocomments'); 
    138137 
    139138try 
     
    249248               'Link to Subscribe to comments page'); 
    250249 
     250          $core->blog->triggerBlog(); 
     251           
    251252          http::redirect($p_url.'&saveconfig=1&tab=display'); 
    252253     } 
  • plugins/subscribeToComments/locales/fr/admin.lang.php

    r2594 r3120  
    44$GLOBALS['__l10n']['To manage your subscriptions, change your email address or block emails, click here: [manageurl]'] = 'Pour gérer vos abonnements, changer votre adresse email ou bloquer les emails, cliquez ici : [manageurl]'; 
    55$GLOBALS['__l10n']['Your account on [blogname]'] = 'Votre compte sur [blogname]'; 
    6 $GLOBALS['__l10n']['here are some informations about your account on [blogname]:'] = 'voici quelques informations à propos de votre compte sur [blogname]:'; 
     6$GLOBALS['__l10n']['here are some informations about your account on [blogname]:'] = 'voici quelques informations à propos de votre compte sur [blogname] :'; 
    77$GLOBALS['__l10n']['Email address: [email]'] = 'Adresse email : [email]'; 
    88$GLOBALS['__l10n']['Subscribed to [posttitle] - [blogname]'] = 'Abonné à [posttitle] - [blogname]'; 
  • plugins/subscribeToComments/locales/fr/admin.po

    r2594 r3120  
    2424 
    2525msgid "here are some informations about your account on [blogname]:" 
    26 msgstr "voici quelques informations à propos de votre compte sur [blogname]:" 
     26msgstr "voici quelques informations à propos de votre compte sur [blogname] :" 
    2727 
    2828msgid "Email address: [email]" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map