Changeset 38900

Show
Ignore:
Timestamp:
04/07/08 06:03:01 (3 months ago)
Author:
ketsugi
Message:

[FIX] WP auto-update messed things up a bit. Fixed.

Location:
acronyms/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • acronyms/trunk/acronyms.php

    r38888 r38900  
    44Plugin URI: http://ketsugi.com/software/wordpress/acronyms-plugin/ 
    55Description: A plugin to wrap acronyms in posts and comments with appropriate <acronym> acronyms. Allows users to manage lists of acronyms through admin interface. Based on Joel Bennett's Acronym Replacer plugin (http://www.huddledmasses.org/) and Joel Pan's NP_Acronym plugin for Nucleus CMS. 
    6 Version: 1.5 
     6Version: 1.5.1 
    77Author: Joel Pan 
    88Author URI: http://ketsugi.com/ 
     
    198198      function management_handler () { 
    199199            $title = __( 'Acronyms' ); 
    200             $parent_file = 'edit.php?page=acronyms.php'; 
     200            $parent_file = 'edit.php?page=' . Acronyms::get_parent_url(); 
    201201            $acronyms = get_option( 'acronym_acronyms' ); 
    202202 
     
    216216                        if ( Acronyms::update ( $acronym, $fulltext ) ) $message = 1; 
    217217                        else $message = 4; 
    218                         wp_redirect('edit.php?page=acronyms.php&message=' . $message); 
     218                        wp_redirect( "$parent_file&message=$message" ); 
    219219                  exit; 
    220220                        break; 
     
    226226                        if ( Acronyms::update ( $acronym, $fulltext ) ) $message = 3; 
    227227                        else $message = 5; 
    228                         wp_redirect('edit.php?page=acronyms.php&message=' . $message); 
     228                        wp_redirect( "$parent_file&message=$message" ); 
    229229                  exit; 
    230230                        break; 
     
    244244                  $message = 6; 
    245245                  else $message = 2; 
    246                         wp_redirect('edit.php?page=acronyms.php&message=' . $message); 
     246                        wp_redirect( "$parent_file&message=$message" ); 
    247247                  exit; 
    248248                  break; 
     
    253253                        $n = isset( $_GET['n'] ) && get_option( 'default_num_of_acronyms' ) != $_GET['n'] ? '&n=' . $_GET['n'] : ''; 
    254254                        $o = isset( $_GET['o'] ) ? '&o=' . $_GET['o'] : ''; 
    255                         wp_redirect( "edit.php?page=acronyms.php$s$p$n$o" ); 
     255                        wp_redirect( "$parent_file$s$p$n$o" ); 
    256256            } 
    257257      } 
     
    295295<div class="wrap"> 
    296296  <form id="posts-filter" action="" method="get"> 
    297   <input type="hidden" name="page" value="acronyms.php"/> 
     297  <input type="hidden" name="page" value="<?php echo Acronyms::get_parent_url() ?>"/> 
    298298  <h2><?php 
    299299                                    _e('Manage Acronyms'); 
     
    376376                    <th scope="row" class="check-column"> <input type="checkbox" name="delete_acronyms[]" value="<?php echo $acronym ?>" /></th> 
    377377                        <td><strong> 
    378                           <a class="row-title" href="edit.php?page=acronyms.php&amp;action=edit&amp;acronym=<?php echo urlencode( $acronym ) ?>&amp;fulltext=<?php echo urlencode( $fulltext ) ?>" title="Edit &quot;<?php echo $acronym ?>&quot;"><?php echo $acronym ?></a></strong></td> 
     378                          <a class="row-title" href="edit.php?page=<?php echo Acronyms::get_parent_url() ?>&amp;action=edit&amp;acronym=<?php echo urlencode( $acronym ) ?>&amp;fulltext=<?php echo urlencode( $fulltext ) ?>" title="Edit &quot;<?php echo $acronym ?>&quot;"><?php echo $acronym ?></a></strong></td> 
    379379                        <td><?php echo $fulltext ?></td> 
    380380                  </tr> 
     
    458458<div id="ajax-response"></div> 
    459459<?php echo $form ?> 
    460 <input type="hidden" name="page" value="acronyms.php"/> 
     460<input type="hidden" name="page" value="<?php echo Acronyms::get_parent_url() ?>"/> 
    461461<input type="hidden" name="action" value="<?php echo $action ?>" /> 
    462462<?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?> 
     
    524524      } 
    525525 
     526      /* string get_parent_url () 
     527       * 
     528       */ 
     529  function get_parent_url() 
     530  { 
     531            return $_GET['page']; 
     532      } 
     533 
    526534} /* END CLASS acronyms */ 
    527535 
  • acronyms/trunk/readme.txt

    r38898 r38900  
    55Requires at least: 2.1 
    66Tested up to: 2.5 
    7 Stable tag: 1.5 
     7Stable tag: 1.5.1 
    88 
    99A plugin to wrap acronyms in posts and comments with appropriate `<acronym>` acronyms. Allows users to manage lists of acronyms through admin interface. Based on Joel Bennett's Acronym Replacer plugin (http://www.huddledmasses.org/) and Joel Pan's NP_Acronym plugin for Nucleus CMS.