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
688467cf
authored
2010-04-23 20:20:38 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed a bug on PagePermissions
1 parent
885ecdae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
com/PagePermissions/PagePermissions.php
com/PagePermissions/PagePermissions.php
View file @
688467c
...
...
@@ -70,7 +70,7 @@ class PagePermissions {
}
// Meta value hasn't been set, getting settings defaults
if
(
''
===
$data
=
array_shift
(
get_post_meta
(
$post_id
,
self
::
META
)))
{
if
(
NULL
===
$data
=
array_shift
(
get_post_meta
(
$post_id
,
self
::
META
)))
{
$data
=
Array
(
self
::
ELE_SEL
=>
$settings
[
self
::
ELE_SEL
],
self
::
ELE_CUST
=>
$settings
[
self
::
ELE_CUST
]);
}
...
...
@@ -204,7 +204,7 @@ class PagePermissionsAdmin {
$selected
=
(
$post
->
ID
==
0
?
self
::
getOptions
()
:
array_shift
(
get_post_meta
(
$post
->
ID
,
PagePermissions
::
META
)));
// If the post doesn't have the field saved get defaults
if
(
empty
(
$selected
))
{
if
(
is_null
(
$selected
))
{
$selected
=
self
::
getOptions
();
}
...
...
@@ -277,7 +277,7 @@ class PagePermissions_Actions {
$new
[
PagePermissions
::
ELE_CUST
]
=
Array
();
}
if
(
empty
(
$current
))
{
if
(
is_null
(
$current
))
{
add_post_meta
(
$real_id
,
PagePermissions
::
META
,
$new
,
true
);
}
else
{
update_post_meta
(
$real_id
,
PagePermissions
::
META
,
$new
);
...
...
@@ -296,7 +296,7 @@ class PagePermissions_Actions {
$innerhtml
=
''
;
if
(
'0'
!==
(
$change_field
=
(
isset
(
$_GET
[
'attachment_id'
])
?
'attachments['
.
$_GET
[
'attachment_id'
]
.
']['
.
PagePermissions
::
META
.
']'
:
'0'
)))
{
$selected
=
array_shift
(
get_post_meta
(
$_GET
[
'attachment_id'
],
PagePermissions
::
META
));
if
(
empty
(
$selected
))
{
if
(
is_null
(
$selected
))
{
$selected
=
PagePermissionsAdmin
::
getOptions
();
}
...
...
@@ -333,7 +333,7 @@ class PagePermissions_Actions {
$new
[
PagePermissions
::
ELE_CUST
]
=
Array
();
}
if
(
empty
(
$current
))
{
if
(
is_null
(
$current
))
{
add_post_meta
(
$real_id
,
PagePermissions
::
META
,
$new
,
true
);
}
else
{
update_post_meta
(
$real_id
,
PagePermissions
::
META
,
$new
);
...
...
Please
register
or
sign in
to post a comment