Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

functions_compatibility.php

Zuletzt modifiziert: 09.10.2024, 12:51 - Dateigröße: 5.07 KiB


001  <?php
002  /**
003  *
004  * This file is part of the phpBB Forum Software package.
005  *
006  * @copyright (c) phpBB Limited <https://www.phpbb.com>
007  * @license GNU General Public License, version 2 (GPL-2.0)
008  *
009  * For full copyright and license information, please see
010  * the docs/CREDITS.txt file.
011  *
012  */
013   
014  /**
015  * @ignore
016  */
017  if (!defined('IN_PHPBB'))
018  {
019      exit;
020  }
021   
022  /**
023  * Get user avatar
024  *
025  * @deprecated 3.1.0-a1 (To be removed: 3.3.0)
026  *
027  * @param string $avatar Users assigned avatar name
028  * @param int $avatar_type Type of avatar
029  * @param string $avatar_width Width of users avatar
030  * @param string $avatar_height Height of users avatar
031  * @param string $alt Optional language string for alt tag within image, can be a language key or text
032  * @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
033  *
034  * @return string Avatar image
035  */
036  function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
037  {
038      // map arguments to new function phpbb_get_avatar()
039      $row = array(
040          'avatar'        => $avatar,
041          'avatar_type'    => $avatar_type,
042          'avatar_width'    => $avatar_width,
043          'avatar_height'    => $avatar_height,
044      );
045   
046      return phpbb_get_avatar($row, $alt, $ignore_config);
047  }
048   
049  /**
050  * Hash the password
051  *
052  * @deprecated 3.1.0-a2 (To be removed: 3.3.0)
053  *
054  * @param string $password Password to be hashed
055  *
056  * @return string|bool Password hash or false if something went wrong during hashing
057  */
058  function phpbb_hash($password)
059  {
060      global $phpbb_container;
061   
062      $passwords_manager = $phpbb_container->get('passwords.manager');
063      return $passwords_manager->hash($password);
064  }
065   
066  /**
067  * Check for correct password
068  *
069  * @deprecated 3.1.0-a2 (To be removed: 3.3.0)
070  *
071  * @param string $password The password in plain text
072  * @param string $hash The stored password hash
073  *
074  * @return bool Returns true if the password is correct, false if not.
075  */
076  function phpbb_check_hash($password, $hash)
077  {
078      global $phpbb_container;
079   
080      $passwords_manager = $phpbb_container->get('passwords.manager');
081      return $passwords_manager->check($password, $hash);
082  }
083   
084  /**
085  * Eliminates useless . and .. components from specified path.
086  *
087  * Deprecated, use filesystem class instead
088  *
089  * @param string $path Path to clean
090  * @return string Cleaned path
091  *
092  * @deprecated
093  */
094  function phpbb_clean_path($path)
095  {
096      global $phpbb_path_helper, $phpbb_container;
097   
098      if (!$phpbb_path_helper && $phpbb_container)
099      {
100          $phpbb_path_helper = $phpbb_container->get('path_helper');
101      }
102      else if (!$phpbb_path_helper)
103      {
104          global $phpbb_root_path, $phpEx;
105   
106          // The container is not yet loaded, use a new instance
107          if (!class_exists('\phpbb\path_helper'))
108          {
109              require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx);
110          }
111   
112          $request = new phpbb\request\request();
113          $phpbb_path_helper = new phpbb\path_helper(
114              new phpbb\symfony_request(
115                  $request
116              ),
117              new phpbb\filesystem(),
118              $request,
119              $phpbb_root_path,
120              $phpEx
121          );
122      }
123   
124      return $phpbb_path_helper->clean_path($path);
125  }
126   
127  /**
128  * Pick a timezone
129  *
130  * @param    string        $default            A timezone to select
131  * @param    boolean        $truncate            Shall we truncate the options text
132  *
133  * @return        string        Returns the options for timezone selector only
134  *
135  * @deprecated
136  */
137  function tz_select($default = '', $truncate = false)
138  {
139      global $template, $user;
140   
141      return phpbb_timezone_select($template, $user, $default, $truncate);
142  }
143   
144  /**
145  * Cache moderators. Called whenever permissions are changed
146  * via admin_permissions. Changes of usernames and group names
147  * must be carried through for the moderators table.
148  *
149  * @deprecated 3.1
150  * @return null
151  */
152  function cache_moderators()
153  {
154      global $db, $cache, $auth;
155      return phpbb_cache_moderators($db, $cache, $auth);
156  }
157   
158  /**
159  * Removes moderators and administrators from foe lists.
160  *
161  * @deprecated 3.1
162  * @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
163  * @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
164  * @return null
165  */
166  function update_foes($group_id = false, $user_id = false)
167  {
168      global $db, $auth;
169      return phpbb_update_foes($db, $auth, $group_id, $user_id);
170  }
171   
172  /**
173  * Get user rank title and image
174  *
175  * @param int $user_rank the current stored users rank id
176  * @param int $user_posts the users number of posts
177  * @param string &$rank_title the rank title will be stored here after execution
178  * @param string &$rank_img the rank image as full img tag is stored here after execution
179  * @param string &$rank_img_src the rank image source is stored here after execution
180  *
181  * @deprecated 3.1.0-RC5 (To be removed: 3.3.0)
182  *
183  * Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false
184  */
185  function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
186  {
187      global $phpbb_root_path, $phpEx;
188      if (!function_exists('phpbb_get_user_rank'))
189      {
190          include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
191      }
192   
193      $rank_data = phpbb_get_user_rank(array('user_rank' => $user_rank), $user_posts);
194      $rank_title = $rank_data['title'];
195      $rank_img = $rank_data['img'];
196      $rank_img_src = $rank_data['img_src'];
197  }
198