Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a5ad39d9
authored
2011-08-23 17:54:45 +0000
by
Marty Penner
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Promoting r272 to live.
1 parent
75ff9f3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
com/Auth/Auth.php
lib/UserSearch.php
tz-tools.php
com/Auth/Auth.php
View file @
a5ad39d
...
...
@@ -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
())
{
...
...
lib/UserSearch.php
View file @
a5ad39d
...
...
@@ -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
}
%'))"
;
}
...
...
tz-tools.php
View file @
a5ad39d
...
...
@@ -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
)
.
"'>›</a>"
;
if
(
$paged
<
$pages
&&
$showitems
<
$pages
)
$p
.=
"<a href='"
.
get_pagenum_link
(
$paged
+
1
)
.
"'>›</a>"
;
if
(
$paged
<
$pages
-
1
&&
$paged
+
$range
-
1
<
$pages
&&
$showitems
<
$pages
)
$p
.=
"<a href='"
.
get_pagenum_link
(
$pages
)
.
"'>»</a>"
;
$p
.=
$after
;
}
if
(
$echo
)
{
echo
$p
;
}
else
{
return
$p
;
}
}
class
Vars
{
...
...
Please
register
or
sign in
to post a comment