Dotclear

Changeset 3135


Ignore:
Timestamp:
07/01/13 02:34:06 (10 years ago)
Author:
JcDenis
Message:
  • Fixed post_type and posts_actions
Location:
plugins/postExpired
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • plugins/postExpired/_admin.php

    r2555 r3135  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of postExpired, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
     
    115117                    $expired_status = $rs_status->isEmpty() ? '' : (string) $rs_status->meta_id; 
    116118                     
    117                     if ($_REQUEST['p'] != 'pages') { 
     119                    if (!isset($_REQUEST['p']) || $_REQUEST['p'] != 'pages') { 
    118120                         $rs_cat = $core->meta->getMetadata(array('meta_type'=>'postexpiredcat','limit'=>1,'post_id'=>$post->post_id)); 
    119121                         $expired_cat = $rs_cat->isEmpty() ? '' : (string) $rs_cat->meta_id; 
     
    137139          { 
    138140               $status = (string) array_search($expired_status,self::statusCombo()); 
    139                if ($_REQUEST['p'] != 'pages') { 
     141               if (!isset($_REQUEST['p']) || $_REQUEST['p'] != 'pages') { 
    140142                    $category = (string) array_search($expired_cat,self::categoriesCombo()); 
    141143                    $selected = (string) array_search($expired_selected,self::selectedCombo()); 
     
    148150               '<p>'.__('Status:').' '.$status.'</p>'; 
    149151                
    150                if ($_REQUEST['p'] != 'pages') { 
     152               if (!isset($_REQUEST['p']) || $_REQUEST['p'] != 'pages') { 
    151153                    echo  
    152154                    '<p>'.__('Category:').' '.$category.'</p>'. 
     
    168170               '</label></p>'; 
    169171                
    170                if ($_REQUEST['p'] != 'pages') { 
     172               if (!isset($_REQUEST['p']) || $_REQUEST['p'] != 'pages') { 
    171173                    echo  
    172174                    '<p><label>'.__('Category:'). 
     
    335337                    http::redirect($redir); 
    336338               } 
    337  
     339                
    338340               try 
    339341               { 
     
    341343                    while($posts->fetch()) 
    342344                    { 
    343                          $posts_ids[] = $posts->id; 
     345                         $posts_ids[] = $posts->post_id; 
    344346                    } 
    345347                     
    346348                    $rs_params['no_content'] = true; 
    347349                    $rs_params['post_id'] = $posts_ids; 
    348                     $rs_params['meta_id'] = 'postexpired'; 
    349                     $rs = $core->meta->getPostsByMeta($rs_params); 
    350                      
    351                     while ($rs->fetch()) 
    352                     { 
    353                          if ($post->isEditable()) 
     350                    $rs_params['post_type'] = ''; 
     351                    $rs_params['meta_type'] = 'postexpired'; 
     352                     
     353                    foreach($_POST['rmv_post_expired'] as $meta_id) 
     354                    { 
     355                         $rs_params['meta_id'] = $meta_id; 
     356                         $rs = $core->meta->getPostsByMeta($rs_params); 
     357                          
     358                         while ($rs->fetch()) 
    354359                         { 
    355                               self::del($rs->post_id); 
     360                              if ($rs->isEditable()) 
     361                              { 
     362                                   self::del($rs->post_id); 
     363                              } 
    356364                         } 
    357365                    } 
     
    371379          { 
    372380               echo self::header(). 
    373                '<h2>'.__('Add expired date to entries').'</h2>'. 
     381               '<h2><span class="page-title">'.__('Add expired date to entries').'</span></h2>'. 
    374382               '<p>'.__('It will be added only if there is no expired date on entry.').'<p>'. 
    375383               '<form action="posts_actions.php" method="post">'. 
     
    382390               '</label></p>'; 
    383391                
    384                if ($_POST['post_type'] != 'page') { 
     392               if (!isset($_POST['psot_type']) || $_POST['post_type'] != 'page') { 
    385393                    echo  
    386394                    '<p><label>'.__('Category:'). 
     
    407415               $core->formNonce(). 
    408416               form::hidden(array('action'),'action_postexpired_add'). 
    409                '<input type="submit" value="'.__('save').'" /></p>'. 
     417               '<input type="submit" value="'.__('Save').'" /></p>'. 
    410418               '</form>'; 
    411419          } 
     
    429437               } 
    430438                
    431                echo '<h2>'.__('Remove selected expired date from entries').'</h2>'; 
     439               echo '<h2><span class="page-title">'.__('Remove selected expired date from entries').'</span></h2>'; 
    432440                
    433441               if (empty($dts)) 
  • plugins/postExpired/_define.php

    r2555 r3135  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of postExpired, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
     
    1719     /* Description*/         "Change entries options at a given date", 
    1820     /* Author */             "JC Denis", 
    19      /* Version */            '0.5', 
     21     /* Version */            '2013.06.30', 
    2022     /* Permissions */        'usage,contentadmin' 
    2123); 
    22      /* date */          #20100817 
    2324?> 
  • plugins/postExpired/_public.php

    r2555 r3135  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of postExpired, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
  • plugins/postExpired/js/postexpired.js

    r2187 r3135  
    11/* -- BEGIN LICENSE BLOCK ---------------------------------- 
     2 * 
    23 * This file is part of postExpired, a plugin for Dotclear 2. 
    34 *  
    4  * Copyright (c) 2009-2010 JC Denis and contributors 
    5  * jcdenis@gdwd.com 
     5 * Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     6 * contact@jcdenis.fr http://jcd.lv 
    67 *  
    78 * Licensed under the GPL version 2.0 license. 
    89 * A copy of this license is available in LICENSE file or at 
    910 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     11 * 
    1012 * -- END LICENSE BLOCK ------------------------------------*/ 
    1113 
  • plugins/postExpired/locales/fr/main.lang.php

    r2519 r3135  
    11<?php 
    22// Language: Français  
    3 // Module: postExpired - 0.4 
    4 // Date: 2010-08-03 14:31:40  
    5 // Translated with dcTranslater - 1.4.1  
     3// Module: postExpired - 2013.06.30 
     4// Date: 2013-07-01 00:33:05  
     5// Translated with dcTranslater - 2013.05.11  
    66 
    7 #_admin.php:34 
    8 #_admin.php:54 
    9 #_admin.php:63 
    10 #_admin.php:72 
    11 #_admin.php:81 
     7#_admin.php:42 
     8#_admin.php:62 
     9#_admin.php:71 
     10#_admin.php:80 
     11#_admin.php:89 
    1212$GLOBALS['__l10n']['Not changed'] = 'Inchangé'; 
    1313 
    14 #_admin.php:55 
     14#_admin.php:63 
    1515$GLOBALS['__l10n']['Pending'] = 'En attente'; 
    1616 
    17 #_admin.php:56 
     17#_admin.php:64 
    1818$GLOBALS['__l10n']['Unpublished'] = 'Non publié'; 
    1919 
    20 #_admin.php:65 
     20#_admin.php:73 
    2121$GLOBALS['__l10n']['Not selected'] = 'Non sélectionné'; 
    2222 
    23 #_admin.php:73 
    24 #_admin.php:82 
     23#_admin.php:81 
     24#_admin.php:90 
    2525$GLOBALS['__l10n']['Opened'] = 'Ouvert'; 
    2626 
    27 #_admin.php:74 
    28 #_admin.php:83 
     27#_admin.php:82 
     28#_admin.php:91 
    2929$GLOBALS['__l10n']['Closed'] = 'Fermé'; 
    3030 
    31 #_admin.php:126 
     31#_admin.php:135 
    3232$GLOBALS['__l10n']['Expired date'] = 'Date de péremption'; 
    3333 
    34 #_admin.php:142 
     34#_admin.php:158 
    3535$GLOBALS['__l10n']['Comments:'] = 'Commentaires :'; 
    3636 
    37 #_admin.php:143 
     37#_admin.php:159 
    3838$GLOBALS['__l10n']['Trackbacks:'] = 'Rétroliens :'; 
    3939 
    40 #_admin.php:151 
    41 #_admin.php:360 
    42 $GLOBALS['__l10n']['On this date, change:'] = 'A cette date, changer :'; 
     40#_admin.php:167 
     41#_admin.php:387 
     42$GLOBALS['__l10n']['On this date, change:'] = 'Á cette date, changer :'; 
    4343 
    44 #_admin.php:158 
    45 #_admin.php:367 
     44#_admin.php:177 
     45#_admin.php:397 
    4646$GLOBALS['__l10n']['Selection:'] = 'Séléction :'; 
    4747 
    48 #_admin.php:161 
    49 #_admin.php:370 
     48#_admin.php:182 
     49#_admin.php:402 
    5050$GLOBALS['__l10n']['Comments status:'] = 'Status des commentaires :'; 
    5151 
    52 #_admin.php:164 
    53 #_admin.php:373 
     52#_admin.php:185 
     53#_admin.php:405 
    5454$GLOBALS['__l10n']['Trackbacks status:'] = 'Status des rétroliens :'; 
    5555 
    56 #_admin.php:245 
    57 #_admin.php:249 
     56#_admin.php:266 
     57#_admin.php:270 
    5858$GLOBALS['__l10n']['Expired entries'] = 'Billets périmés'; 
    5959 
    60 #_admin.php:245 
     60#_admin.php:266 
    6161$GLOBALS['__l10n']['Add expired date'] = 'Ajouter une date de péremption'; 
    6262 
    63 #_admin.php:249 
     63#_admin.php:270 
    6464$GLOBALS['__l10n']['Remove expired date'] = 'Retirer une date de péremption'; 
    6565 
    66 #_admin.php:354 
     66#_admin.php:381 
    6767$GLOBALS['__l10n']['Add expired date to entries'] = 'Ajouter une date de péremption aux billets'; 
    6868 
    69 #_admin.php:355 
     69#_admin.php:382 
    7070$GLOBALS['__l10n']['It will be added only if there is no expired date on entry.'] = 'Ajouté uniquement si il n\'y a pas de date de péremption sur le billet.'; 
    7171 
    72 #_admin.php:407 
     72#_admin.php:439 
    7373$GLOBALS['__l10n']['Remove selected expired date from entries'] = 'Retirer les dates de péremption sélectionnées des billets'; 
    7474 
    75 #_admin.php:411 
     75#_admin.php:443 
    7676$GLOBALS['__l10n']['No expired date for selected entries'] = 'Pas de date de peremption sur les billets sélectionnés'; 
    7777 
    78 #_admin.php:419 
    79 $GLOBALS['__l10n']['Following expired date have been found in selected entries:'] = 'Les dates de péremption suivante ont été trouvé sur les billets sélectionnés :'; 
     78#_admin.php:451 
     79$GLOBALS['__l10n']['Following expired date have been found in selected entries:'] = 'Les dates de péremption suivantes ont été trouvé sur les billets sélectionnés :'; 
    8080 
    81 #_public.php:15 
     81#_public.php:17 
    8282$GLOBALS['__l10n']['Expired on'] = 'Expire le'; 
    8383 
    84 #_public.php:16 
     84#_public.php:18 
    8585$GLOBALS['__l10n']['This entry has no expiration date'] = 'Ce billet n\'a pas de date de péremption'; 
    8686 
  • plugins/postExpired/locales/fr/main.po

    r2519 r3135  
    11# Language: Français 
    2 # Module: postExpired - 0.4 
    3 # Date: 2010-08-03 14:31:40 
    4 # Translated with translater 1.4.1 
     2# Module: postExpired - 2013.06.30 
     3# Date: 2013-07-01 00:33:05 
     4# Translated with translater 2013.05.11 
    55 
    66msgid "" 
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: postExpired 0.4\n" 
     9"Project-Id-Version: postExpired 2013.06.30\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-08-03T14:31:40+00:00\n" 
    12 "Last-Translator: JC Denis\n" 
     11"PO-Revision-Date: 2013-07-01T00:33:05+00:00\n" 
     12"Last-Translator: Jean-Christian Denis\n" 
    1313"Language-Team: \n" 
    1414"MIME-Version: 1.0\n" 
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: _admin.php:34 
    18 #: _admin.php:54 
    19 #: _admin.php:63 
    20 #: _admin.php:72 
    21 #: _admin.php:81 
     17#: _admin.php:42 
     18#: _admin.php:62 
     19#: _admin.php:71 
     20#: _admin.php:80 
     21#: _admin.php:89 
    2222msgid "Not changed" 
    2323msgstr "Inchangé" 
    2424 
    25 #: _admin.php:55 
     25#: _admin.php:63 
    2626msgid "Pending" 
    2727msgstr "En attente" 
    2828 
    29 #: _admin.php:56 
     29#: _admin.php:64 
    3030msgid "Unpublished" 
    3131msgstr "Non publié" 
    3232 
    33 #: _admin.php:65 
     33#: _admin.php:73 
    3434msgid "Not selected" 
    3535msgstr "Non sélectionné" 
    3636 
    37 #: _admin.php:73 
    38 #: _admin.php:82 
     37#: _admin.php:81 
     38#: _admin.php:90 
    3939msgid "Opened" 
    4040msgstr "Ouvert" 
    4141 
    42 #: _admin.php:74 
    43 #: _admin.php:83 
     42#: _admin.php:82 
     43#: _admin.php:91 
    4444msgid "Closed" 
    4545msgstr "Fermé" 
    4646 
    47 #: _admin.php:126 
     47#: _admin.php:135 
    4848msgid "Expired date" 
    4949msgstr "Date de péremption" 
    5050 
    51 #: _admin.php:142 
     51#: _admin.php:158 
    5252msgid "Comments:" 
    5353msgstr "Commentaires :" 
    5454 
    55 #: _admin.php:143 
     55#: _admin.php:159 
    5656msgid "Trackbacks:" 
    5757msgstr "Rétroliens :" 
    5858 
    59 #: _admin.php:151 
    60 #: _admin.php:360 
     59#: _admin.php:167 
     60#: _admin.php:387 
    6161msgid "On this date, change:" 
    62 msgstr "A cette date, changer :" 
     62msgstr "Á cette date, changer :" 
    6363 
    64 #: _admin.php:158 
    65 #: _admin.php:367 
     64#: _admin.php:177 
     65#: _admin.php:397 
    6666msgid "Selection:" 
    6767msgstr "Séléction :" 
    6868 
    69 #: _admin.php:161 
    70 #: _admin.php:370 
     69#: _admin.php:182 
     70#: _admin.php:402 
    7171msgid "Comments status:" 
    7272msgstr "Status des commentaires :" 
    7373 
    74 #: _admin.php:164 
    75 #: _admin.php:373 
     74#: _admin.php:185 
     75#: _admin.php:405 
    7676msgid "Trackbacks status:" 
    7777msgstr "Status des rétroliens :" 
    7878 
    79 #: _admin.php:245 
    80 #: _admin.php:249 
     79#: _admin.php:266 
     80#: _admin.php:270 
    8181msgid "Expired entries" 
    8282msgstr "Billets périmés" 
    8383 
    84 #: _admin.php:245 
     84#: _admin.php:266 
    8585msgid "Add expired date" 
    8686msgstr "Ajouter une date de péremption" 
    8787 
    88 #: _admin.php:249 
     88#: _admin.php:270 
    8989msgid "Remove expired date" 
    9090msgstr "Retirer une date de péremption" 
    9191 
    92 #: _admin.php:354 
     92#: _admin.php:381 
    9393msgid "Add expired date to entries" 
    9494msgstr "Ajouter une date de péremption aux billets" 
    9595 
    96 #: _admin.php:355 
     96#: _admin.php:382 
    9797msgid "It will be added only if there is no expired date on entry." 
    9898msgstr "Ajouté uniquement si il n'y a pas de date de péremption sur le billet." 
    9999 
    100 #: _admin.php:407 
     100#: _admin.php:439 
    101101msgid "Remove selected expired date from entries" 
    102102msgstr "Retirer les dates de péremption sélectionnées des billets" 
    103103 
    104 #: _admin.php:411 
     104#: _admin.php:443 
    105105msgid "No expired date for selected entries" 
    106106msgstr "Pas de date de peremption sur les billets sélectionnés" 
    107107 
    108 #: _admin.php:419 
     108#: _admin.php:451 
    109109msgid "Following expired date have been found in selected entries:" 
    110 msgstr "Les dates de péremption suivante ont été trouvé sur les billets sélectionnés :" 
     110msgstr "Les dates de péremption suivantes ont été trouvé sur les billets sélectionnés :" 
    111111 
    112 #: _public.php:15 
     112#: _public.php:17 
    113113msgid "Expired on" 
    114114msgstr "Expire le" 
    115115 
    116 #: _public.php:16 
     116#: _public.php:18 
    117117msgid "This entry has no expiration date" 
    118118msgstr "Ce billet n'a pas de date de péremption" 
  • plugins/postExpired/release.txt

    r2555 r3135  
    11todo 
    22 * Add option to add/remove tag 
     3 
     42013.06.30 
     5 * Fixed post_type and posts_actions 
    36 
    470.5 20100817 
Note: See TracChangeset for help on using the changeset viewer.

Sites map