WordPress.org

Plugin Directory

Changeset 679833 for cms-tree-page-view


Ignore:
Timestamp:
03/11/13 16:29:19 (14 months ago)
Author:
eskapism
Message:

version 1.2.5

Location:
cms-tree-page-view/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • cms-tree-page-view/trunk/functions.php

    r674044 r679833  
    6161    $ref_post_id    = (int) $_POST["ref_post_id"]; 
    6262    $lang           = $_POST["lang"]; 
     63 
     64    // Check nonce 
     65    if ( ! check_admin_referer("cms-tpv-add-pages") ) { 
     66        wp_die( __( 'Cheatin’ uh?' ) ); 
     67    } 
    6368 
    6469    // If lang variable is set, then set some more wpml-related post/get-variables 
     
    450455        $mode = "list"; 
    451456        $class = isset($_GET["mode"]) && $_GET["mode"] != $mode ? " class='cmstpv_add_list_view' " : " class='cmstpv_add_list_view current' "; 
    452         $title = __("List View"); 
     457        $title = __("List View"); /* translation not missing - exists in wp */ 
    453458        $wp_list_a = "<a href='" . esc_url( add_query_arg( 'mode', $mode, $_SERVER['REQUEST_URI'] ) ) . "' $class><img id='view-switch-$mode' src='" . esc_url( includes_url( 'images/blank.gif' ) ) . "' width='20' height='20' title='$title' alt='$title' /></a>\n"; 
    454459 
     
    499504function cms_tpv_save_settings() { 
    500505     
    501     if (isset($_POST["cms_tpv_action"]) && $_POST["cms_tpv_action"] == "save_settings") { 
     506    if (isset($_POST["cms_tpv_action"]) && $_POST["cms_tpv_action"] == "save_settings" && check_admin_referer('update-options')) { 
    502507 
    503508        $options = array(); 
     
    972977                        <input type="hidden" name="action" value="cms_tpv_add_pages"> 
    973978                        <input type="hidden" name="ref_post_id" value=""> 
     979                        <?php wp_nonce_field("cms-tpv-add-pages") ?> 
    974980                         
    975981                        <!-- lang for wpml --> 
     
    983989                                <!-- Pages<br> --> 
    984990                                <ul class="cms_tpv_action_add_doit_pages"> 
    985                                     <li><span></span><input placeholder="<?php _e("Enter title here") ?>" type="text" name="cms_tpv_add_new_pages_names[]"></li> 
     991                                    <li><span></span><input placeholder="<?php _e("Enter title here") /* translation not missing - exists in wp */ ?>" type="text" name="cms_tpv_add_new_pages_names[]"></li> 
    986992                                </ul> 
    987993                            </div> 
     
    13651371    $post_type = (isset($_GET["post_type"])) ? $_GET["post_type"] : null; 
    13661372    $search = (isset($_GET["search_string"])) ? trim($_GET["search_string"]) : ""; // exits if we're doing a search 
     1373 
     1374    // Check if user is allowed to get the list. For example subscribers should not be allowed to 
     1375    // Use same capability that is required to add the menu 
     1376    $post_type_object = get_post_type_object($post_type); 
     1377    if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) { 
     1378        die( __( 'Cheatin&#8217; uh?' ) ); 
     1379    } 
     1380 
    13671381    if ($action) { 
    13681382     
  • cms-tree-page-view/trunk/index.php

    r671480 r679833  
    44Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/ 
    55Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this! 
    6 Version: 1.2.x 
     6Version: 1.2.5 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    2828#require("functions.php"); 
    2929 
    30 define( "CMS_TPV_VERSION", "1.2.4"); 
     30define( "CMS_TPV_VERSION", "1.2.5"); 
    3131define( "CMS_TPV_NAME", "CMS Tree Page View"); 
    3232 
  • cms-tree-page-view/trunk/readme.txt

    r674044 r679833  
    33Donate link: http://eskapism.se/sida/donate/ 
    44Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin 
    5 Requires at least: 3.4 
    6 Tested up to: 3.5 
    7 Stable tag: 1.2.4 
     5Requires at least: 3.5.1 
     6Tested up to: 3.5.1 
     7Stable tag: 1.2.5 
    88 
    99Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages. 
     
    7777* Lithuanian 
    7878* Estonian 
     79* Finnish 
    7980 
    8081#### Always show your pages in the admin area 
     
    106107== Changelog == 
    107108 
    108 = 1.2.x = 
     109= 1.2.5 = 
    109110- Fixed some notice warnings 
     111- Added Finnish translation 
     112- Fixed a security issue. Thanks to Julio POTIER <a href="http://secu.boiteaweb.fr/">http://secu.boiteaweb.fr/</a>) for finding and reporting. 
     113- Added nonce checks for options page and for adding new pages 
    110114 
    111115= 1.2.4 = 
Note: See TracChangeset for help on using the changeset viewer.