a5ad39d9 by Marty Penner

Promoting r272 to live.

1 parent 75ff9f3e
......@@ -29,7 +29,7 @@ const PASS_MAX_LEN = 15; // Maximum length of password
if (empty($wpdb->signups)) {
$wpdb->signups = $wpdb->prefix . 'signups';
}
//die(var_dump(wp_hash_password('a ')));
Vars::$options = new Tools\WP_Option(OPTION_NAME);
if (is_admin()) {
......
......@@ -85,7 +85,7 @@ class UserSearch implements ArrayAccess, Iterator, Countable {
}
// Users table
if (!is_null($search_users_table)) {
if (!is_null($search_users_table) && empty($field_match)) {
if (!empty($having_clause)) {
$having_clause .= "\n OR `user_id` IN (SELECT `ID` FROM `wp_users` WHERE (`user_login` LIKE '%{$search}%' OR `user_nicename` LIKE '%{$search}%'))";
}
......
......@@ -147,17 +147,17 @@ function add_settings_fields($class, $page = 'general', $section = 'default') {
}
function TzSuperPaginationBar($pages = null, $range = 2, $before = "", $after = "",$show_search = false, $show_advanced = false, $post_type="") {
$bar = '<div class="TzSuperPaginationBar">';
if ($show_search) { $bar .= '<div class="pagination-search"><form id="TzPaginationSearch"><input type="hidden" name="post_type" value="'.$post_type.'" /><input name="search_criteria" type="input" /></form></div>'; }
if ($show_advanced) { $bar .= '<div class="pagination-advanced"><a href="#" onclick="return false;">Advanced</a></div>'; }
$bar .= '<div class="pagination-paging">'.pagination($pages,$range,$before,$after,false).'</div>';
$bar .= '<div style="clear:both;"></div>';
$bar .= '</div>';
return $bar;
}
function pagination($pages = null, $range = 2, $before = '', $after = '', $echo = true) {
$p = "";
......@@ -172,7 +172,7 @@ function pagination($pages = null, $range = 2, $before = '', $after = '', $echo
if (!$pages) {
$pages = 1;
}
}
}
if (1 != $pages) {
$p .= $before;
......@@ -186,15 +186,15 @@ function pagination($pages = null, $range = 2, $before = '', $after = '', $echo
}
}
if ($paged < $pages && $showitems < $pages) $p .= "<a href='" . get_pagenum_link($paged + 1) . "'>&rsaquo;</a>";
if ($paged < $pages && $showitems < $pages) $p .= "<a href='" . get_pagenum_link($paged + 1) . "'>&rsaquo;</a>";
if ($paged < $pages-1 && $paged+$range - 1 < $pages && $showitems < $pages) $p .= "<a href='" . get_pagenum_link($pages) . "'>&raquo;</a>";
$p .= $after;
}
if ($echo) { echo $p; } else { return $p; }
}
class Vars {
......