Dotclear

Changeset 352


Ignore:
Timestamp:
03/02/08 14:47:01 (16 years ago)
Author:
sacha
Message:

HTTP Redirect - avoid old post_hide field

Location:
plugins/httpredirect
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/httpredirect/_admin.php

    r287 r352  
    33 *  This is 'HTTP Redirect', a plugin for Dotclear 2           * 
    44 *                                                             * 
    5  *  Copyright (c) 2007                                         * 
     5 *  Copyright (c) 2007,2008                                    * 
    66 *  Oleksandr Syenchuk and contributors.                       * 
    77 *                                                             * 
     
    9797     public static function adminPostsActions(&$core,$posts,$action,$redir) 
    9898     { 
    99           if ( empty($_POST['redirect_url']) || 
    100                !is_array($_POST['redirect_url']) || 
    101                $action != 'httpredirect' || 
    102                !self::isInstalled() ) { 
     99          if ( empty($_POST['redirect_url']) 
     100          || !is_array($_POST['redirect_url']) 
     101          || $action != 'httpredirect' 
     102          || !self::isInstalled() ) { 
    103103               return; 
    104104          } 
     
    107107          $blog_id = $core->con->escape($core->blog->id); 
    108108          $postsRedirect = $_POST['redirect_url']; 
    109           $postsHide = (!empty($_POST['posts_hide']) && is_array($_POST['posts_hide'])) ? $_POST['posts_hide'] : array(); 
     109          $postsHide = !empty($_POST['posts_hide']) && is_array($_POST['posts_hide']) 
     110               ? $_POST['posts_hide'] : array(); 
    110111           
    111112          try 
     
    193194          else { 
    194195               $strReq = 
    195                'SELECT redirect_url, post_hide '. 
     196               'SELECT post_id, redirect_url '. 
    196197               'FROM '.$core->prefix.'post '. 
    197198               "WHERE post_id = '".$core->con->escape($post->post_id)."' "; 
  • plugins/httpredirect/_install.php

    r286 r352  
    33 *  This is 'HTTP Redirect', a plugin for Dotclear 2           * 
    44 *                                                             * 
    5  *  Copyright (c) 2007                                         * 
     5 *  Copyright (c) 2007,2008                                    * 
    66 *  Oleksandr Syenchuk and contributors.                       * 
    77 *                                                             * 
     
    2727$s = new dbStruct($core->con,$core->prefix); 
    2828 
    29 # Upgrading 
    30 if ($i_version !== null) { 
    31      # Already installed, nothing to do (just clear 'post_hide' field ?) 
    32 } 
    33 # Installing 
    34 else { 
     29# Install 
     30if ($i_version === null) { 
    3531     $s->post->redirect_url('varchar',255,true); 
    3632} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map