Procedural File: _blog.funcs.php
Source Location: /blogs/inc/collections/model/_blog.funcs.php
Functions
autoselect_blog [line 368]
integer autoselect_blog(
string $permname, [string $permlevel = 'any']
)
|
|
Check permissions on a given blog (by ID) and autoselect an appropriate blog if necessary.
For use in admin
NOTE: we no longer try to set $Blog inside of the function because later global use cannot be safely guaranteed in PHP4.
Parameters:
|
string |
$permname: |
Permission name that must be given to the $current_User object. |
|
string |
$permlevel: |
Permission level that must be given to the $current_User object. |
API Tags:
| Return: | new selected blog |
blogperms_get_easy2 [line 283]
string blogperms_get_easy2(
array $perms, [ $context = 'user']
)
|
|
Translates an given array of permissions to an "easy group".
USES OBJECT ROW
- nomember
- member
- editor (member+edit posts+delete+edit comments+all filemanager rights)
- administrator (editor+edit cats+edit blog)
- custom
Parameters:
|
array |
$perms: |
indexed, as the result row from "SELECT * FROM T_coll_user_perms" |
|
|
$context: |
|
API Tags:
| Return: | one of the five groups (nomember, member, editor, admin, custom) |
blog_update_perms [line 43]
void blog_update_perms(
int $blog, [string $context = 'user']
)
|
|
Update the advanced user/group permissions for edited blog
Parameters:
|
int |
$blog: |
Blog ID |
|
string |
$context: |
'user' or 'group' |
set_working_blog [line 433]
boolean set_working_blog(
$new_blog_ID
)
|
|
Set working blog to a new value and memorize it in user settings if needed.
For use in admin
Parameters:
API Tags:
valid_blog_requested [line 414]
void valid_blog_requested(
)
|
|
Check that we have received a valid blog param
For use in admin