Plugin Directory

Changeset 1529248


Ignore:
Timestamp:
11/06/2016 07:13:31 PM (9 years ago)
Author:
pkthree
Message:

Peter's Post Notes 1.6.2

Location:
peters-post-notes/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • peters-post-notes/trunk/peters_post_notes.php

    r1349985 r1529248  
    55Description: Add notes on the "edit post" and "edit page" screens' sidebars, as well as general notes on the dashboard, in WordPress 2.8 and up. When used with Peter's Collaboration E-mails 1.2 and up, the notes are sent along with the e-mails in the collaboration workflow.
    66Author: Peter Keung
    7 Version: 1.6.1
     7Version: 1.6.2
    88Change Log:
     92016-11-06  1.6.2: Fix query bug for users with no associated posts.
    9102016-02-13  1.6.1: Improve UX by wrapping checkboxes inside labels. (Thanks Hrohh!)
    10112016-02-12  1.6.0: Support private notes on posts.
     
    5455$ppn_db_notes = $wpdb->prefix . 'collabnotes';
    5556$ppn_db_generalnotes = $wpdb->prefix . 'generalnotes';
    56 $ppn_version = '1.6.1';
     57$ppn_version = '1.6.2';
    5758
    5859/* --------------------------------------------
     
    556557            $ppn_num_notes = ' LIMIT ' . $ppn_num_notes_limit;
    557558        }
    558        
    559         $ppn_newest_posts = $wpdb->get_results( 'SELECT postid, author, notetime, notecontent, personal FROM ' . $ppn_db_notes . $ppn_query_options . ' AND ( personal = 0 OR author = ' . $current_user->ID . ' ) ORDER BY notetime DESC' . $ppn_num_notes, OBJECT );
     559        $ppn_newest_posts_query = 'SELECT postid, author, notetime, notecontent, personal FROM ' . $ppn_db_notes . $ppn_query_options;
     560        if( $ppn_query_options )
     561        {
     562            $ppn_newest_posts_query .= ' AND ';
     563        }
     564        else
     565        {
     566            $ppn_newest_posts_query .= ' WHERE ';
     567        }
     568        $ppn_newest_posts_query .= '( personal = 0 OR author = ' . $current_user->ID . ' ) ORDER BY notetime DESC' . $ppn_num_notes;
     569        $ppn_newest_posts = $wpdb->get_results( $ppn_newest_posts_query, OBJECT );
    560570    }
    561571
  • peters-post-notes/trunk/readme.txt

    r1349985 r1529248  
    44Tags: post, notification, admin, collaboration, workflow, posts
    55Requires at least: 3.2
    6 Tested up to: 4.4
     6Tested up to: 4.7
    77Stable tag: trunk
    88
     
    5252
    5353== Changelog ==
     54
     55= 1.6.2 =
     56* 2016-11-06: Fix query bug for users with no associated posts. (Thanks Alex!)
    5457
    5558= 1.6.1 =
Note: See TracChangeset for help on using the changeset viewer.