summaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
master18.79Martin Whitaker5 days
user/jibz/aarch64try: add module for pinebook-proJybz3 months
user/bcornec/fixntpFix remaining ntp package reference replaced by ntpsecBruno Cornec4 months
distro/mga918.66Martin Whitaker3 years
user/pterjan/arm64fooPascal Terjan3 years
distro/mga8drakxtools/stage2: 18.45: update NEWSThomas Backlund5 years
distro/mga718.21.1Thomas Backlund7 years
distro/mga617.88.3Martin Whitaker8 years
topic/extlinuxbootloader: add cma=256M@512M for Raspberry Pi DRM/VC4Olivier Blin8 years
topic/switching_to_dnfperl-install/pkgs.pm: Port 'urpme' call to 'dnf remove' callNeal Gompa8 years
distro/mga5Fix the display of the clock in drakclock (mga#11776)Frédéric Buclin9 years
user/ennael/mga6- Add 60-block.rules in the installer (mga#20074)Nicolas Lécureuil9 years
user/martinw/mga6Always tell the kernel about partition table changes when running the classic...Martin Whitaker9 years
user/animtim/designWorknew icons for harddrake categoriesTimothée Giet10 years
distro/mga4fix moving fonts (mga#16074)Thierry Vignaud11 years
topic/bug-13680make_boot_img: Avoid gfxboot install string for chain.c32Erwan Velu11 years
user/erwan/bug-13680make_boot_img: Avoid gfxboot install string for chain.c32Erwan Velu11 years
topic/efisync with codeThierry Vignaud12 years
distro/mga3Slovenian translation updatedfilip12 years
user/colin/rescue-systemdimages: Pass audit=0 to the rescue system.Colin Guthrie12 years
distro/mga2SVN_SILENT Ukrainian translation updateYuri Chornoivan13 years
distro/mga1Ukrainian translation updateYuri Chornoivan13 years
distro/mes5-2.6.33Revert as it breaks auto_instNicolas Lécureuil14 years
distro/mes6fix unused-but-set-variableAntoine Ginies15 years
distro/mes5fix installing from hard drive on cciss (#57973)Antoine Ginies15 years
distro/mdv2009.0increase versionPascal Terjan16 years
distro/mdv2010.0- detect_devices:Olivier Blin16 years
distro/mdv2008.0run_program: set XAUTHORITY and HOME for the user we will drop privileges toPascal Terjan16 years
distro/mdv2008.1run_program: set XAUTHORITY and HOME for the user we will drop privileges toPascal Terjan16 years
distro/mdv2009.1run_program: set XAUTHORITY and HOME for the user we will drop privileges toPascal Terjan16 years
topic/switching_to_urpmi(rpmDbOpen) make it more readableThierry Vignaud17 years
topic/before_matchbox_wm2009.0 beta 1 logoThierry Vignaud18 years
topic/MDK-2006_0-updateAdd stex and e1000_ngPascal Terjan18 years
distro/mdv2007.1- fix range max value >2TB when creating a partition (useful for LVs >2TB)Pascal Rigaux19 years
topic/mlcd4copy 2007.1 as mlcd4 branch (for drakauth changes)Olivier Blin19 years
topic/MDK-10-updateBetter (and fix) SMP detection, aka. also check for populated & enabled CPUGwenolé Beauchesne20 years
topic/MDK-10_2-updatepackage lsb is requiring many locales though we don't want it to be installedPascal Rigaux20 years
topic/MDK-10_1-updateFix mis-sorted progress barsStew Benedict21 years
topic/aThis commit was manufactured by cvs2svn to create branch 'a'.Mystery Man22 years
topic/mandrakesoftThis commit was manufactured by cvs2svn to create branch 'mandrakesoft'.Mystery Man22 years
topic/MDK92-branchworkaround anthil bug #369Thierry Vignaud22 years
topic/Corpo_2_1Corporate Server 2.1.1 releaseNicolas Planel23 years
topic/KA9_0Removing sundanceErwan Velu23 years
topic/R9_0-64bit-branchno imm/ppa on ia64Gwenolé Beauchesne23 years
topic/MDKC_1_0This commit was manufactured by cvs2svn to create branch 'MDKC_1_0'.Mystery Man23 years
topic/R9_1_HP-branchThis commit was manufactured by cvs2svn to create branchMystery Man23 years
topic/x86_64-branchMore xf86 modules for x86-64Gwenolé Beauchesne23 years
topic/gdk-pixbuf-0-branch- lots of cleanupsThierry Vignaud24 years
topic/ia64-8_1- Don't forget to link the initrd to the real image in /boot/efi/ tooGwenolé Beauchesne24 years
topic/PCMCIA_CS_DISTROThis commit was manufactured by cvs2svn to create branchMystery Man24 years
topic/v_webmin_0_87This commit was manufactured by cvs2svn to create branchMystery Man25 years
topic/gi-ppcThis commit was manufactured by cvs2svn to create branch 'gi-ppc'.Mystery Man25 years
topic/rp-pppoeThis commit was manufactured by cvs2svn to create branch 'rp-pppoe'.Mystery Man25 years
topic/pppThis commit was manufactured by cvs2svn to create branch 'ppp'.Mystery Man25 years
topic/dietlibcThis commit was manufactured by cvs2svn to create branch 'dietlibc'.Mystery Man25 years
topic/firewallreadded passwd. Must verify that it's secure vs msec.damien25 years
topic/unlabeled-1.1.1branch to build the firewall install.damien25 years
 
TagDownloadAuthorAge
18.79drakx-18.79.tar  drakx-18.79.tar.gz  drakx-18.79.tar.bz2  drakx-18.79.tar.xz  drakx-18.79.zip  Martin Whitaker5 days
18.78drakx-18.78.tar  drakx-18.78.tar.gz  drakx-18.78.tar.bz2  drakx-18.78.tar.xz  drakx-18.78.zip  Martin Whitaker3 weeks
18.77drakx-18.77.tar  drakx-18.77.tar.gz  drakx-18.77.tar.bz2  drakx-18.77.tar.xz  drakx-18.77.zip  Martin Whitaker3 weeks
18.76drakx-18.76.tar  drakx-18.76.tar.gz  drakx-18.76.tar.bz2  drakx-18.76.tar.xz  drakx-18.76.zip  Giuseppe Ghibò7 weeks
18.75drakx-18.75.tar  drakx-18.75.tar.gz  drakx-18.75.tar.bz2  drakx-18.75.tar.xz  drakx-18.75.zip  Giuseppe Ghibò3 months
18.74drakx-18.74.tar  drakx-18.74.tar.gz  drakx-18.74.tar.bz2  drakx-18.74.tar.xz  drakx-18.74.zip  Martin Whitaker3 months
drakx-installer-binaries-2.64drakx-installer-binaries-2.64.tar  drakx-installer-binaries-2.64.tar.gz  drakx-installer-binaries-2.64.tar.bz2  drakx-installer-binaries-2.64.tar.xz  drakx-installer-binaries-2.64.zip  Martin Whitaker3 months
18.73drakx-18.73.tar  drakx-18.73.tar.gz  drakx-18.73.tar.bz2  drakx-18.73.tar.xz  drakx-18.73.zip  Martin Whitaker3 months
18.72drakx-18.72.tar  drakx-18.72.tar.gz  drakx-18.72.tar.bz2  drakx-18.72.tar.xz  drakx-18.72.zip  Martin Whitaker4 months
18.71drakx-18.71.tar  drakx-18.71.tar.gz  drakx-18.71.tar.bz2  drakx-18.71.tar.xz  drakx-18.71.zip  Martin Whitaker4 months
drakx-installer-binaries-2.63drakx-installer-binaries-2.63.tar  drakx-installer-binaries-2.63.tar.gz  drakx-installer-binaries-2.63.tar.bz2  drakx-installer-binaries-2.63.tar.xz  drakx-installer-binaries-2.63.zip  Martin Whitaker5 months
18.70drakx-18.70.tar  drakx-18.70.tar.gz  drakx-18.70.tar.bz2  drakx-18.70.tar.xz  drakx-18.70.zip  Martin Whitaker5 months
drakx-installer-images-2.94drakx-installer-images-2.94.tar  drakx-installer-images-2.94.tar.gz  drakx-installer-images-2.94.tar.bz2  drakx-installer-images-2.94.tar.xz  drakx-installer-images-2.94.zip  Martin Whitaker5 months
drakx-installer-images-2.93drakx-installer-images-2.93.tar  drakx-installer-images-2.93.tar.gz  drakx-installer-images-2.93.tar.bz2  drakx-installer-images-2.93.tar.xz  drakx-installer-images-2.93.zip  Jani Välimaa6 months
drakx-installer-rescue-1.68drakx-installer-rescue-1.68.tar  drakx-installer-rescue-1.68.tar.gz  drakx-installer-rescue-1.68.tar.bz2  drakx-installer-rescue-1.68.tar.xz  drakx-installer-rescue-1.68.zip  Jani Välimaa7 months
drakx-installer-images-2.92drakx-installer-images-2.92.tar  drakx-installer-images-2.92.tar.gz  drakx-installer-images-2.92.tar.bz2  drakx-installer-images-2.92.tar.xz  drakx-installer-images-2.92.zip  Jani Välimaa7 months
18.69drakx-18.69.tar  drakx-18.69.tar.gz  drakx-18.69.tar.bz2  drakx-18.69.tar.xz  drakx-18.69.zip  daviddavid11 months
18.68drakx-18.68.tar  drakx-18.68.tar.gz  drakx-18.68.tar.bz2  drakx-18.68.tar.xz  drakx-18.68.zip  Jani Välimaa2 years
18.67drakx-18.67.tar  drakx-18.67.tar.gz  drakx-18.67.tar.bz2  drakx-18.67.tar.xz  drakx-18.67.zip  Dan Fandrich2 years
drakx-installer-images-2.91drakx-installer-images-2.91.tar  drakx-installer-images-2.91.tar.gz  drakx-installer-images-2.91.tar.bz2  drakx-installer-images-2.91.tar.xz  drakx-installer-images-2.91.zip  Thomas Backlund3 years
18.66drakx-18.66.tar  drakx-18.66.tar.gz  drakx-18.66.tar.bz2  drakx-18.66.tar.xz  drakx-18.66.zip  Martin Whitaker3 years
2.90drakx-2.90.tar  drakx-2.90.tar.gz  drakx-2.90.tar.bz2  drakx-2.90.tar.xz  drakx-2.90.zip  Thomas Backlund3 years
18.64drakx-18.64.tar  drakx-18.64.tar.gz  drakx-18.64.tar.bz2  drakx-18.64.tar.xz  drakx-18.64.zip  Martin Whitaker3 years
18.63drakx-18.63.tar  drakx-18.63.tar.gz  drakx-18.63.tar.bz2  drakx-18.63.tar.xz  drakx-18.63.zip  Giuseppe Ghibò3 years
1.67drakx-1.67.tar  drakx-1.67.tar.gz  drakx-1.67.tar.bz2  drakx-1.67.tar.xz  drakx-1.67.zip  Martin Whitaker3 years
18.62drakx-18.62.tar  drakx-18.62.tar.gz  drakx-18.62.tar.bz2  drakx-18.62.tar.xz  drakx-18.62.zip  Martin Whitaker3 years
18.61drakx-18.61.tar  drakx-18.61.tar.gz  drakx-18.61.tar.bz2  drakx-18.61.tar.xz  drakx-18.61.zip  Martin Whitaker3 years
18.60drakx-18.60.tar  drakx-18.60.tar.gz  drakx-18.60.tar.bz2  drakx-18.60.tar.xz  drakx-18.60.zip  Martin Whitaker3 years
18.59drakx-18.59.tar  drakx-18.59.tar.gz  drakx-18.59.tar.bz2  drakx-18.59.tar.xz  drakx-18.59.zip  Giuseppe Ghibò3 years
18.58drakx-18.58.tar  drakx-18.58.tar.gz  drakx-18.58.tar.bz2  drakx-18.58.tar.xz  drakx-18.58.zip  Giuseppe Ghibò3 years
18.57drakx-18.57.tar  drakx-18.57.tar.gz  drakx-18.57.tar.bz2  drakx-18.57.tar.xz  drakx-18.57.zip  Martin Whitaker3 years
18.56drakx-18.56.tar  drakx-18.56.tar.gz  drakx-18.56.tar.bz2  drakx-18.56.tar.xz  drakx-18.56.zip  Thomas Backlund3 years
drakx-installer-images-2.88drakx-installer-images-2.88.tar  drakx-installer-images-2.88.tar.gz  drakx-installer-images-2.88.tar.bz2  drakx-installer-images-2.88.tar.xz  drakx-installer-images-2.88.zip  Thomas Backlund3 years
drakx-installer-binaries-2.60drakx-installer-binaries-2.60.tar  drakx-installer-binaries-2.60.tar.gz  drakx-installer-binaries-2.60.tar.bz2  drakx-installer-binaries-2.60.tar.xz  drakx-installer-binaries-2.60.zip  Thomas Backlund3 years
18.55drakx-18.55.tar  drakx-18.55.tar.gz  drakx-18.55.tar.bz2  drakx-18.55.tar.xz  drakx-18.55.zip  Pascal Terjan3 years
18.54drakx-18.54.tar  drakx-18.54.tar.gz  drakx-18.54.tar.bz2  drakx-18.54.tar.xz  drakx-18.54.zip  Martin Whitaker3 years
18.53drakx-18.53.tar  drakx-18.53.tar.gz  drakx-18.53.tar.bz2  drakx-18.53.tar.xz  drakx-18.53.zip  Martin Whitaker3 years
18.52drakx-18.52.tar  drakx-18.52.tar.gz  drakx-18.52.tar.bz2  drakx-18.52.tar.xz  drakx-18.52.zip  Martin Whitaker3 years
2.87drakx-2.87.tar  drakx-2.87.tar.gz  drakx-2.87.tar.bz2  drakx-2.87.tar.xz  drakx-2.87.zip  Martin Whitaker4 years
18.51drakx-18.51.tar  drakx-18.51.tar.gz  drakx-18.51.tar.bz2  drakx-18.51.tar.xz  drakx-18.51.zip  Martin Whitaker4 years
2.86drakx-2.86.tar  drakx-2.86.tar.gz  drakx-2.86.tar.bz2  drakx-2.86.tar.xz  drakx-2.86.zip  Martin Whitaker4 years
18.50drakx-18.50.tar  drakx-18.50.tar.gz  drakx-18.50.tar.bz2  drakx-18.50.tar.xz  drakx-18.50.zip  Martin Whitaker4 years
18.48drakx-18.48.tar  drakx-18.48.tar.gz  drakx-18.48.tar.bz2  drakx-18.48.tar.xz  drakx-18.48.zip  Thierry Vignaud4 years
2.59drakx-2.59.tar  drakx-2.59.tar.gz  drakx-2.59.tar.bz2  drakx-2.59.tar.xz  drakx-2.59.zip  Thierry Vignaud4 years
2.57drakx-2.57.tar  drakx-2.57.tar.gz  drakx-2.57.tar.bz2  drakx-2.57.tar.xz  drakx-2.57.zip  Thierry Vignaud4 years
18.47drakx-18.47.tar  drakx-18.47.tar.gz  drakx-18.47.tar.bz2  drakx-18.47.tar.xz  drakx-18.47.zip  Thierry Vignaud5 years
18.46drakx-18.46.tar  drakx-18.46.tar.gz  drakx-18.46.tar.bz2  drakx-18.46.tar.xz  drakx-18.46.zip  Thierry Vignaud5 years
2.83drakx-2.83.tar  drakx-2.83.tar.gz  drakx-2.83.tar.bz2  drakx-2.83.tar.xz  drakx-2.83.zip  Thomas Backlund5 years
18.45drakx-18.45.tar  drakx-18.45.tar.gz  drakx-18.45.tar.bz2  drakx-18.45.tar.xz  drakx-18.45.zip  Thomas Backlund5 years
2.56drakx-2.56.tar  drakx-2.56.tar.gz  drakx-2.56.tar.bz2  drakx-2.56.tar.xz  drakx-2.56.zip  Thomas Backlund5 years
18.44drakx-18.44.tar  drakx-18.44.tar.gz  drakx-18.44.tar.bz2  drakx-18.44.tar.xz  drakx-18.44.zip  Donald Stewart5 years
2.82drakx-2.82.tar  drakx-2.82.tar.gz  drakx-2.82.tar.bz2  drakx-2.82.tar.xz  drakx-2.82.zip  Thomas Backlund5 years
18.43drakx-18.43.tar  drakx-18.43.tar.gz  drakx-18.43.tar.bz2  drakx-18.43.tar.xz  drakx-18.43.zip  Martin Whitaker5 years
18.42drakx-18.42.tar  drakx-18.42.tar.gz  drakx-18.42.tar.bz2  drakx-18.42.tar.xz  drakx-18.42.zip  Martin Whitaker5 years
18.40drakx-18.40.tar  drakx-18.40.tar.gz  drakx-18.40.tar.bz2  drakx-18.40.tar.xz  drakx-18.40.zip  Martin Whitaker5 years
2.81drakx-2.81.tar  drakx-2.81.tar.gz  drakx-2.81.tar.bz2  drakx-2.81.tar.xz  drakx-2.81.zip  Thomas Backlund5 years
2.55drakx-2.55.tar  drakx-2.55.tar.gz  drakx-2.55.tar.bz2  drakx-2.55.tar.xz  drakx-2.55.zip  Thomas Backlund5 years
18.39drakx-18.39.tar  drakx-18.39.tar.gz  drakx-18.39.tar.bz2  drakx-18.39.tar.xz  drakx-18.39.zip  Nicolas Lécureuil5 years
18.38drakx-18.38.tar  drakx-18.38.tar.gz  drakx-18.38.tar.bz2  drakx-18.38.tar.xz  drakx-18.38.zip  Thierry Vignaud5 years
18.37drakx-18.37.tar  drakx-18.37.tar.gz  drakx-18.37.tar.bz2  drakx-18.37.tar.xz  drakx-18.37.zip  Thierry Vignaud5 years
2.78drakx-2.78.tar  drakx-2.78.tar.gz  drakx-2.78.tar.bz2  drakx-2.78.tar.xz  drakx-2.78.zip  Martin Whitaker5 years
2.77drakx-2.77.tar  drakx-2.77.tar.gz  drakx-2.77.tar.bz2  drakx-2.77.tar.xz  drakx-2.77.zip  Martin Whitaker5 years
2.76drakx-2.76.tar  drakx-2.76.tar.gz  drakx-2.76.tar.bz2  drakx-2.76.tar.xz  drakx-2.76.zip  Martin Whitaker5 years
2.50drakx-2.50.tar  drakx-2.50.tar.gz  drakx-2.50.tar.bz2  drakx-2.50.tar.xz  drakx-2.50.zip  Martin Whitaker5 years
18.36drakx-18.36.tar  drakx-18.36.tar.gz  drakx-18.36.tar.bz2  drakx-18.36.tar.xz  drakx-18.36.zip  Thierry Vignaud5 years
18.35drakx-18.35.tar  drakx-18.35.tar.gz  drakx-18.35.tar.bz2  drakx-18.35.tar.xz  drakx-18.35.zip  Thierry Vignaud5 years
18.34drakx-18.34.tar  drakx-18.34.tar.gz  drakx-18.34.tar.bz2  drakx-18.34.tar.xz  drakx-18.34.zip  Thierry Vignaud6 years
18.33drakx-18.33.tar  drakx-18.33.tar.gz  drakx-18.33.tar.bz2  drakx-18.33.tar.xz  drakx-18.33.zip  Thierry Vignaud6 years
18.32drakx-18.32.tar  drakx-18.32.tar.gz  drakx-18.32.tar.bz2  drakx-18.32.tar.xz  drakx-18.32.zip  Martin Whitaker6 years
18.31drakx-18.31.tar  drakx-18.31.tar.gz  drakx-18.31.tar.bz2  drakx-18.31.tar.xz  drakx-18.31.ziphl opt">)) { return; } // Disable board if the install/ directory is st/drakx/snapshot/drakx-1.65.tar'>drakx-1.65.taror the brave development army we do not care about this, else we need to comment out this every time we develop locally if (!$phpbb_container->getParameter('allow_install_dir') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install')) { // Adjust the message slightly according to the permissions if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) { $message = 'REMOVE_INSTALL'; } else { $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; } trigger_error($message); } // Is board disabled and user not an admin or moderator? if ($config['board_disable'] && !defined('IN_INSTALL') && !defined('IN_LOGIN') && !defined('SKIP_CHECK_DISABLED') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { if ($this->data['is_bot']) { send_status_line(503, 'Service Unavailable'); } $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; trigger_error($message); } // Is load exceeded? if ($config['limit_load'] && $this->load !== false) { if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !defined('IN_ADMIN')) { // Set board disabled to true to let the admins/mods get the proper notification $config['board_disable'] = '1'; if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { if ($this->data['is_bot']) { send_status_line(503, 'Service Unavailable'); } trigger_error('BOARD_UNAVAILABLE'); } } } if (isset($this->data['session_viewonline'])) { // Make sure the user is able to hide his session if (!$this->data['session_viewonline']) { // Reset online status if not allowed to hide the session... if (!$auth->acl_get('u_hideonline')) { $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_viewonline = 1 WHERE session_user_id = ' . $this->data['user_id']; $db->sql_query($sql); $this->data['session_viewonline'] = 1; } } else if (!$this->data['user_allow_viewonline']) { // the user wants to hide and is allowed to -> cloaking device on. if ($auth->acl_get('u_hideonline')) { $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_viewonline = 0 WHERE session_user_id = ' . $this->data['user_id']; $db->sql_query($sql); $this->data['session_viewonline'] = 0; } } } // Does the user need to change their password? If so, redirect to the // ucp profile reg_details page ... of course do not redirect if we're already in the ucp if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && !empty($this->data['is_registered']) && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) { if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx") { redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&amp;mode=reg_details')); } } $this->is_setup_flag = true; return; } /** * More advanced language substitution * Function to mimic sprintf() with the possibility of using phpBB's language system to substitute nullar/singular/plural forms. * Params are the language key and the parameters to be substituted. * This function/functionality is inspired by SHS` and Ashe. * * Example call: <samp>$user->lang('NUM_POSTS_IN_QUEUE', 1);</samp> * * If the first parameter is an array, the elements are used as keys and subkeys to get the language entry: * Example: <samp>$user->lang(array('datetime', 'AGO'), 1)</samp> uses $user->lang['datetime']['AGO'] as language entry. * * @deprecated 3.2.0-dev (To be removed 4.0.0) */ function lang() { $args = func_get_args(); return call_user_func_array(array($this->language, 'lang'), $args); } /** * Determine which plural form we should use. * For some languages this is not as simple as for English. * * @param $number int|float The number we want to get the plural case for. Float numbers are floored. * @param $force_rule mixed False to use the plural rule of the language package * or an integer to force a certain plural rule * @return int|bool The plural-case we need to use for the number plural-rule combination, false if $force_rule * was invalid. * * @deprecated: 3.2.0-dev (To be removed: 4.0.0) */ function get_plural_form($number, $force_rule = false) { return $this->language->get_plural_form($number, $force_rule); } /** * Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion) * * @param mixed $lang_set specifies the language entries to include * @param bool $use_db internal variable for recursion, do not use @deprecated 3.2.0-dev (To be removed: 4.0.0) * @param bool $use_help internal variable for recursion, do not use @deprecated 3.2.0-dev (To be removed: 4.0.0) * @param string $ext_name The extension to load language from, or empty for core files * * Examples: * <code> * $lang_set = array('posting', 'help' => 'faq'); * $lang_set = array('posting', 'viewtopic', 'help' => array('bbcode', 'faq')) * $lang_set = array(array('posting', 'viewtopic'), 'help' => array('bbcode', 'faq')) * $lang_set = 'posting' * $lang_set = array('help' => 'faq', 'db' => array('help:faq', 'posting')) * </code> * * Note: $use_db and $use_help should be removed. The old function was kept for BC purposes, * so the BC logic is handled here. * * @deprecated: 3.2.0-dev (To be removed: 4.0.0) */ function add_lang($lang_set, $use_db = false, $use_help = false, $ext_name = '') { if (is_array($lang_set)) { foreach ($lang_set as $key => $lang_file) { // Please do not delete this line. // We have to force the type here, else [array] language inclusion will not work $key = (string) $key; if ($key == 'db') { // This is never used $this->add_lang($lang_file, true, $use_help, $ext_name); } else if ($key == 'help') { $this->add_lang($lang_file, $use_db, true, $ext_name); } else if (!is_array($lang_file)) { $this->set_lang($lang_file, $use_help, $ext_name); } else { $this->add_lang($lang_file, $use_db, $use_help, $ext_name); } } unset($lang_set); } else if ($lang_set) { $this->set_lang($lang_set, $use_help, $ext_name); } } /** * BC function for loading language files * * @deprecated 3.2.0-dev (To be removed: 4.0.0) */ private function set_lang($lang_set, $use_help, $ext_name) { if (empty($ext_name)) { $ext_name = null; } if ($use_help && strpos($lang_set, '/') !== false) { $component = dirname($lang_set) . '/help_' . basename($lang_set); if ($component[0] === '/') { $component = substr($component, 1); } } else { $component = (($use_help) ? 'help_' : '') . $lang_set; } $this->language->add_lang($component, $ext_name); } /** * Add Language Items from an extension - use_db and use_help are assigned where needed (only use them to force inclusion) * * @param string $ext_name The extension to load language from, or empty for core files * @param mixed $lang_set specifies the language entries to include * @param bool $use_db internal variable for recursion, do not use * @param bool $use_help internal variable for recursion, do not use * * Note: $use_db and $use_help should be removed. Kept for BC purposes. * * @deprecated: 3.2.0-dev (To be removed: 4.0.0) */ function add_lang_ext($ext_name, $lang_set, $use_db = false, $use_help = false) { if ($ext_name === '/') { $ext_name = ''; } $this->add_lang($lang_set, $use_db, $use_help, $ext_name); } /** * Format user date * * @param int $gmepoch unix timestamp * @param string $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i. * @param bool $forcedate force non-relative date format. * * @return mixed translated date */ function format_date($gmepoch, $format = false, $forcedate = false) { global $phpbb_dispatcher; static $utc; if (!isset($utc)) { $utc = new \DateTimeZone('UTC'); } $format_date_override = false; $function_arguments = func_get_args(); /** * Execute code and/or override format_date() * * To override the format_date() function generated value * set $format_date_override to new return value * * @event core.user_format_date_override * @var DateTimeZone utc Is DateTimeZone in UTC * @var array function_arguments is array comprising a function's argument list * @var string format_date_override Shall we return custom format (string) or not (false) * @since 3.2.1-RC1 */ $vars = array('utc', 'function_arguments', 'format_date_override'); extract($phpbb_dispatcher->trigger_event('core.user_format_date_override', compact($vars))); if (!$format_date_override) { $time = new $this->datetime($this, '@' . (int) $gmepoch, $utc); $time->setTimezone($this->timezone); return $time->format($format, $forcedate); } else { return $format_date_override; } } /** * Create a \phpbb\datetime object in the context of the current user * * @since 3.1 * @param string $time String in a format accepted by strtotime(). * @param DateTimeZone $timezone Time zone of the time. * @return \phpbb\datetime Date time object linked to the current users locale */ public function create_datetime($time = 'now', \DateTimeZone $timezone = null) { $timezone = $timezone ?: $this->timezone; return new $this->datetime($this, $time, $timezone); } /** * Get the UNIX timestamp for a datetime in the users timezone, so we can store it in the database. * * @param string $format Format of the entered date/time * @param string $time Date/time with the timezone applied * @param DateTimeZone $timezone Timezone of the date/time, falls back to timezone of current user * @return int Returns the unix timestamp */ public function get_timestamp_from_format($format, $time, \DateTimeZone $timezone = null) { $timezone = $timezone ?: $this->timezone; $date = \DateTime::createFromFormat($format, $time, $timezone); return ($date !== false) ? $date->format('U') : false; } /** * Get language id currently used by the user */ function get_iso_lang_id() { global $config, $db; if (!empty($this->lang_id)) { return $this->lang_id; } if (!$this->lang_name) { $this->lang_name = $config['default_lang']; } $sql = 'SELECT lang_id FROM ' . LANG_TABLE . " WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'"; $result = $db->sql_query($sql); $this->lang_id = (int) $db->sql_fetchfield('lang_id'); $db->sql_freeresult($result); return $this->lang_id; } /** * Get users profile fields */ function get_profile_fields($user_id) { global $db; if (isset($this->profile_fields)) { return; } $sql = 'SELECT * FROM ' . PROFILE_FIELDS_DATA_TABLE . " WHERE user_id = $user_id"; $result = $db->sql_query_limit($sql, 1); $this->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row; $db->sql_freeresult($result); } /** * Specify/Get image */ function img($img, $alt = '') { $title = ''; if ($alt) { $alt = $this->language->lang($alt); $title = ' title="' . $alt . '"'; } return '<span class="imageset ' . $img . '"' . $title . '>' . $alt . '</span>'; } /** * Get option bit field from user options. * * @param int $key option key, as defined in $keyoptions property. * @param int $data bit field value to use, or false to use $this->data['user_options'] * @return bool true if the option is set in the bit field, false otherwise */ function optionget($key, $data = false) { $var = ($data !== false) ? $data : $this->data['user_options']; return phpbb_optionget($this->keyoptions[$key], $var); } /** * Set option bit field for user options. * * @param int $key Option key, as defined in $keyoptions property. * @param bool $value True to set the option, false to clear the option. * @param int $data Current bit field value, or false to use $this->data['user_options'] * @return int|bool If $data is false, the bit field is modified and * written back to $this->data['user_options'], and * return value is true if the bit field changed and * false otherwise. If $data is not false, the new * bitfield value is returned. */ function optionset($key, $value, $data = false) { $var = ($data !== false) ? $data : $this->data['user_options']; $new_var = phpbb_optionset($this->keyoptions[$key], $value, $var); if ($data === false) { if ($new_var != $var) { $this->data['user_options'] = $new_var; return true; } else { return false; } } else { return $new_var; } } /** * Function to make the user leave the NEWLY_REGISTERED system group. * @access public */ function leave_newly_registered() { if (empty($this->data['user_new'])) { return false; } if (!function_exists('remove_newly_registered')) { global $phpbb_root_path, $phpEx; include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } if ($group = remove_newly_registered($this->data['user_id'], $this->data)) { $this->data['group_id'] = $group; } $this->data['user_permissions'] = ''; $this->data['user_new'] = 0; return true; } /** * Returns all password protected forum ids the user is currently NOT authenticated for. * * @return array Array of forum ids * @access public */ function get_passworded_forums() { global $db; $sql = 'SELECT f.forum_id, fa.user_id FROM ' . FORUMS_TABLE . ' f LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($this->session_id) . "') WHERE f.forum_password <> ''"; $result = $db->sql_query($sql); $forum_ids = array(); while ($row = $db->sql_fetchrow($result)) { $forum_id = (int) $row['forum_id']; if ($row['user_id'] != $this->data['user_id']) { $forum_ids[$forum_id] = $forum_id; } } $db->sql_freeresult($result); return $forum_ids; } }