[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/ -> functions_admin.php (summary)

(no description)

Copyright: (c) 2005 phpBB Group
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 3358 lines (91 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 32 functions

  recalc_nested_sets()
  make_forum_select()
  size_select_options()
  group_select_options()
  get_forum_list()
  get_forum_branch()
  copy_forum_permissions()
  filelist()
  move_topics()
  move_posts()
  delete_topics()
  delete_posts()
  delete_attachments()
  delete_topic_shadows()
  update_posted_info()
  phpbb_unlink()
  sync()
  prune()
  auto_prune()
  remove_comments()
  cache_moderators()
  view_log()
  update_foes()
  view_inactive_users()
  view_warned_users()
  get_database_size()
  get_remote_file()
  tidy_warnings()
  tidy_database()
  add_permission_language()
  obtain_latest_version_info()
  enable_bitfield_column_flag()

Functions
Functions that are not part of a class:

recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = array()   X-Ref
Recalculate Nested Sets

author: EXreaction
param: int    $new_id    first left_id (should start with 1)
param: string    $pkey    primary key-column (containing the id for the parent_id of the children)
param: string    $table    constant or fullname of the table
param: int    $parent_id parent_id of the current set (default = 0)
param: array    $where    contains strings to compare closer on the where statement (additional)

make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)   X-Ref
Simple version of jumpbox, just lists authed forums


size_select_options($size_compare)   X-Ref
Generate size select options


group_select_options($group_id, $exclude_ids = false, $manage_founder = false)   X-Ref
Generate list of groups (option fields without select)

param: int $group_id The default group id to mark as selected
param: array $exclude_ids The group ids to exclude from the list, false (default) if you whish to exclude no id
param: int $manage_founder If set to false (default) all groups are returned, if 0 only those groups returned not being managed by founders only, if 1 only those groups returned managed by founders only.
return: string The list of options.

get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = false, $no_cache = false)   X-Ref
Obtain authed forums list


get_forum_branch($forum_id, $type = 'all', $order = 'descending', $include_forum = true)   X-Ref
Get forum branch


copy_forum_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perms = true, $add_log = true)   X-Ref
Copies permissions from one forum to others

author: bantu
param: int    $src_forum_id        The source forum we want to copy permissions from
param: array    $dest_forum_ids        The destination forum(s) we want to copy to
param: bool    $clear_dest_perms    True if destination permissions should be deleted
param: bool    $add_log            True if log entry should be added
return: bool                        False on error

filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')   X-Ref
Get physical file listing


move_topics($topic_ids, $forum_id, $auto_sync = true)   X-Ref
Move topic(s)


move_posts($post_ids, $topic_id, $auto_sync = true)   X-Ref
Move post(s)


delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)   X-Ref
Remove topic(s)


delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true)   X-Ref
Remove post(s)


delete_attachments($mode, $ids, $resync = true)   X-Ref
Delete Attachments

param: string $mode can be: post|message|topic|attach|user
param: mixed $ids can be: post_ids, message_ids, topic_ids, attach_ids, user_ids
param: bool $resync set this to false if you are deleting posts or topics

delete_topic_shadows($forum_id, $sql_more = '', $auto_sync = true)   X-Ref
Deletes shadow topics pointing to a specified forum.

author: bantu
param: int        $forum_id        The forum id
param: string        $sql_more        Additional WHERE statement, e.g. t.topic_time < (time() - 1234)
param: bool        $auto_sync        Will call sync() if this is true
return: array        Array with affected forums

update_posted_info(&$topic_ids)   X-Ref
Update/Sync posted information for topics


phpbb_unlink($filename, $mode = 'file', $entry_removed = false)   X-Ref
Delete attached file


sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $sync_extra = false)   X-Ref
All-encompasing sync function

Exaples:
<code>
sync('topic', 'topic_id', 123);            // resync topic #123
sync('topic', 'forum_id', array(2, 3));    // resync topics from forum #2 and #3
sync('topic');                            // resync all topics
sync('topic', 'range', 'topic_id BETWEEN 1 AND 60');    // resync a range of topics/forums (only available for 'topic' and 'forum' modes)
</code>

Modes:
- forum                Resync complete forum
- topic                Resync topics
- topic_moved            Removes topic shadows that would be in the same forum as the topic they link to
- topic_approved        Resyncs the topic_approved flag according to the status of the first post
- post_reported        Resyncs the post_reported flag, relying on actual reports
- topic_reported        Resyncs the topic_reported flag, relying on post_reported flags
- post_attachement    Same as post_reported, but with attachment flags
- topic_attachement    Same as topic_reported, but with attachment flags

prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)   X-Ref
Prune function


auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_freq)   X-Ref
Function auto_prune(), this function now relies on passed vars


remove_comments(&$output)   X-Ref
remove_comments will strip the sql comment lines out of an uploaded sql file
specifically for mssql and postgres type files in the install....


cache_moderators()   X-Ref
Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
and group names must be carried through for the moderators table


view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC', $keywords = '')   X-Ref
View log
If $log_count is set to false, we will skip counting all entries in the database.


update_foes($group_id = false, $user_id = false)   X-Ref
Update foes - remove moderators and administrators from foe lists...


view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_inactive_time DESC')   X-Ref
Lists inactive users


view_warned_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_warnings DESC')   X-Ref
Lists warned users


get_database_size()   X-Ref
Get database size
Currently only mysql and mssql are supported


get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)   X-Ref
Retrieve contents from remotely stored file


tidy_warnings()   X-Ref
Tidy Warnings
Remove all warnings which have now expired from the database
The duration of a warning can be defined by the administrator
This only removes the warning and reduces the associated count,
it does not remove the user note recording the contents of the warning


tidy_database()   X-Ref
Tidy database, doing some maintanance tasks


add_permission_language()   X-Ref
Add permission language - this will make sure custom files will be included


obtain_latest_version_info($force_update = false, $warn_fail = false, $ttl = 86400)   X-Ref
Obtains the latest version information

param: bool $force_update Ignores cached data. Defaults to false.
param: bool $warn_fail Trigger a warning if obtaining the latest version information fails. Defaults to false.
param: int $ttl Cache version information for $ttl seconds. Defaults to 86400 (24 hours).
return: string | false Version info on success, false on failure.

enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more = '')   X-Ref
Enables a particular flag in a bitfield column of a given table.

param: string    $table_name        The table to update
param: string    $column_name    The column containing a bitfield to update
param: int        $flag            The binary flag which is OR-ed with the current column value
param: string    $sql_more        This string is attached to the sql query generated to update the table.
return: null



Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1