Changeset 352
- Timestamp:
- 03/02/08 14:47:01 (16 years ago)
- Location:
- plugins/httpredirect
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/httpredirect/_admin.php
r287 r352 3 3 * This is 'HTTP Redirect', a plugin for Dotclear 2 * 4 4 * * 5 * Copyright (c) 2007 5 * Copyright (c) 2007,2008 * 6 6 * Oleksandr Syenchuk and contributors. * 7 7 * * … … 97 97 public static function adminPostsActions(&$core,$posts,$action,$redir) 98 98 { 99 if ( empty($_POST['redirect_url']) ||100 !is_array($_POST['redirect_url']) ||101 $action != 'httpredirect' ||102 99 if ( empty($_POST['redirect_url']) 100 || !is_array($_POST['redirect_url']) 101 || $action != 'httpredirect' 102 || !self::isInstalled() ) { 103 103 return; 104 104 } … … 107 107 $blog_id = $core->con->escape($core->blog->id); 108 108 $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(); 110 111 111 112 try … … 193 194 else { 194 195 $strReq = 195 'SELECT redirect_url, post_hide'.196 'SELECT post_id, redirect_url '. 196 197 'FROM '.$core->prefix.'post '. 197 198 "WHERE post_id = '".$core->con->escape($post->post_id)."' "; -
plugins/httpredirect/_install.php
r286 r352 3 3 * This is 'HTTP Redirect', a plugin for Dotclear 2 * 4 4 * * 5 * Copyright (c) 2007 5 * Copyright (c) 2007,2008 * 6 6 * Oleksandr Syenchuk and contributors. * 7 7 * * … … 27 27 $s = new dbStruct($core->con,$core->prefix); 28 28 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 30 if ($i_version === null) { 35 31 $s->post->redirect_url('varchar',255,true); 36 32 }
Note: See TracChangeset
for help on using the changeset viewer.