page restriction plugin broken in 2.1
-
Hi – I’m dumb and upgraded to 2.1 without realizing that the Page Restriction plugin by James Asher is broken (https://17thdegree.com/archives/2005/07/01/wordPress-plugin-page-restriction/).
According to the comments on this post James may be working on this, but in the meantime I really need it and was wondering if anyone has an idea of how to fix it.
The only thing I can see that’s really wrong is that the admin page which allows you to select pages to restrict is showing up blank – the restriction itself that I had in place prior to the ugrade seems to be working. This is the code from the plugin which pulls from the db to populate the admin page:
<?php
if (isset($user_ID) && ('' != intval($user_ID))) {
$posts = $wpdb->get_results("
SELECT $wpdb->posts.*, $wpdb->users.user_level FROM $wpdb->posts
INNER JOIN $wpdb->users ON ($wpdb->posts.post_author = $wpdb->users.ID)
WHERE $wpdb->posts.post_status = 'static'
AND ($wpdb->users.user_level < $user_level OR $wpdb->posts.post_author = $user_ID)
");
} else {
$posts = $wpdb->get_results("SELECT $wpdb->posts.* FROM $wpdb->posts WHERE post_status = 'static'");
}
if ($posts) {
?>I’ve been looking around for what’s changed in 2.1 but don’t see anything off the bat. Might be my eyesight. ?? Can anyone help?
Thanks!
Michelle
- The topic ‘page restriction plugin broken in 2.1’ is closed to new replies.