Permalink
Browse files

Merge pull request #84 from shirosaki/php7

Fixes for PHP7.2
  • Loading branch information...
nao-pon committed Dec 28, 2017
2 parents 68aafb2 + 3c07e43 commit 9a1170c48a5133b93a9d06a7ca40e633d6d11850
Showing with 285 additions and 88 deletions.
  1. +4 −0 html/class/pagenav.php
  2. +4 −0 html/class/template.php
  3. +4 −0 html/class/xoopsform/form.php
  4. +4 −0 html/class/xoopsform/formbreak.php
  5. +4 −0 html/class/xoopsform/formbutton.php
  6. +4 −0 html/class/xoopsform/formcheckbox.php
  7. +4 −0 html/class/xoopsform/formdatetime.php
  8. +5 −1 html/class/xoopsform/formdhtmltextarea.php
  9. +4 −0 html/class/xoopsform/formelement.php
  10. +4 −0 html/class/xoopsform/formelementtray.php
  11. +4 −0 html/class/xoopsform/formfile.php
  12. +4 −0 html/class/xoopsform/formhidden.php
  13. +4 −0 html/class/xoopsform/formhiddentoken.php
  14. +4 −0 html/class/xoopsform/formlabel.php
  15. +4 −0 html/class/xoopsform/formpassword.php
  16. +4 −0 html/class/xoopsform/formradio.php
  17. +4 −0 html/class/xoopsform/formradioyn.php
  18. +4 −0 html/class/xoopsform/formselect.php
  19. +4 −0 html/class/xoopsform/formselectcountry.php
  20. +4 −0 html/class/xoopsform/formselectgroup.php
  21. +4 −0 html/class/xoopsform/formselectlang.php
  22. +4 −0 html/class/xoopsform/formselectmatchoption.php
  23. +4 −0 html/class/xoopsform/formselecttheme.php
  24. +4 −0 html/class/xoopsform/formselecttimezone.php
  25. +4 −0 html/class/xoopsform/formselectuser.php
  26. +4 −0 html/class/xoopsform/formtext.php
  27. +4 −0 html/class/xoopsform/formtextarea.php
  28. +4 −0 html/class/xoopsform/formtextdateselect.php
  29. +6 −2 html/class/xoopsform/formtoken.php
  30. +5 −1 html/class/xoopstopic.php
  31. +5 −1 html/class/xoopstree.php
  32. +4 −0 html/core/XCube_PageNavigator.class.php
  33. +4 −0 html/kernel/block.php
  34. +9 −1 html/kernel/cachetime.php
  35. +4 −0 html/kernel/comment.php
  36. +8 −0 html/kernel/group.php
  37. +4 −0 html/kernel/groupperm.php
  38. +4 −0 html/kernel/member.php
  39. +9 −1 html/kernel/notification.php
  40. +4 −0 html/kernel/online.php
  41. +4 −0 html/kernel/privmessage.php
  42. +4 −0 html/kernel/session.php
  43. +9 −1 html/kernel/timezone.php
  44. +4 −0 html/kernel/tplfile.php
  45. +4 −0 html/kernel/user.php
  46. +4 −4 html/modules/legacy/admin/actions/ActSearchAction.class.php
  47. +3 −3 html/modules/legacy/admin/actions/HelpAction.class.php
  48. +2 −2 html/modules/legacy/admin/actions/ModuleUpdateAction.class.php
  49. +1 −1 html/modules/legacy/admin/actions/PreferenceEditAction.class.php
  50. +8 −8 html/modules/legacy/admin/class/ModuleInstallInformation.class.php
  51. +1 −1 html/modules/legacy/admin/class/ModuleInstaller.class.php
  52. +1 −1 html/modules/legacy/admin/class/ModuleUninstaller.class.php
  53. +1 −1 html/modules/legacy/admin/class/ModuleUpdater.class.php
  54. +1 −1 html/modules/legacy/admin/forms/ModuleListFilterForm.class.php
  55. +2 −2 html/modules/legacy/admin/forms/PreferenceEditForm.class.php
  56. +1 −1 html/modules/legacy/class/AbstractFilterForm.class.php
  57. +2 −2 html/modules/legacy/class/ActionFrame.class.php
  58. +2 −2 html/modules/legacy/class/Module.class.php
  59. +2 −2 html/modules/legacy/class/columnside.php
  60. +1 −1 html/modules/legacy/class/group_permission.php
  61. +1 −1 html/modules/legacy/class/newblocks.php
  62. +1 −1 html/modules/legacy/class/smiles.php
  63. +2 −2 html/modules/legacy/class/theme.php
  64. +2 −2 html/modules/legacy/preload/ThemeSelect.class.php
  65. +2 −2 html/modules/legacyRender/class/Module.class.php
  66. +1 −1 html/modules/legacyRender/kernel/Legacy_AdminRenderSystem.class.php
  67. +3 −3 html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php
  68. +8 −8 html/modules/legacyRender/kernel/Legacy_RenderTarget.class.php
  69. +2 −2 html/modules/legacyRender/preload/ThemeSelect.class.php
  70. +1 −1 html/modules/message/admin/class/myUpdater.class.php
  71. +1 −1 html/modules/profile/class/AbstractAction.class.php
  72. +1 −1 html/modules/profile/class/handler/Data.class.php
  73. +1 −1 html/modules/profile/class/handler/Definitions.class.php
  74. +1 −1 html/modules/stdCache/language/ja_utf8/help/help.html
  75. +7 −7 html/modules/user/admin/actions/UserDataUploadConfAction.class.php
  76. +2 −2 html/modules/user/admin/actions/UserDataUploadDoAction.class.php
  77. +1 −1 html/modules/user/admin/actions/UserListAction.class.php
  78. +1 −1 html/modules/user/class/AbstractFilterForm.class.php
  79. +2 −2 html/modules/user/class/ActionFrame.class.php
  80. +2 −2 html/modules/user/class/Module.class.php
  81. +1 −1 html/modules/user/class/groups_users_link.php
  82. +1 −1 html/modules/user/class/ranks.php
  83. +1 −1 html/modules/user/class/users.php
  84. +2 −2 html/modules/user/forms/AbstractUserEditForm.class.php
  85. +1 −0 html/preload/CorePackPreload.class.php
  86. +1 −1 html/preload/UserInfoProtector.class.php
View
@@ -59,6 +59,10 @@ class XoopsPageNav
* @param string $extra_arg Additional arguments to pass in the URL
**/
public function XoopsPageNav($total_items, $items_perpage, $current_start, $start_name="start", $extra_arg="")
{
return self::__construct($total_items, $items_perpage, $current_start, $start_name, $extra_arg);
}
public function __construct($total_items, $items_perpage, $current_start, $start_name="start", $extra_arg="")
{
$this->total = intval($total_items);
$this->perpage = intval($items_perpage);
View
@@ -59,6 +59,10 @@ class XoopsTpl extends Smarty
* Constructor
**/
public function XoopsTpl()
{
return self::__construct();
}
public function __construct()
{
global $xoopsConfig;
$this->Smarty();
@@ -108,6 +108,10 @@ class XoopsForm
* @param bool $addtoken whether to add a security token to the form
*/
public function XoopsForm($title, $name, $action, $method="post", $addtoken = false)
{
return self::__construct($title, $name, $action, $method, $addtoken);
}
public function __construct($title, $name, $action, $method="post", $addtoken = false)
{
$this->_title = $title;
$this->_name = $name;
@@ -7,6 +7,10 @@
class XoopsFormBreak extends XoopsFormElement
{
public function XoopsFormBreak($extra = '', $class= '')
{
return self::__construct($extra, $class);
}
public function __construct($extra = '', $class= '')
{
$this->setExtra($extra);
$this->setClass($class);
@@ -78,6 +78,10 @@ class XoopsFormButton extends XoopsFormElement
* This could be either "button", "submit", or "reset"
*/
public function XoopsFormButton($caption, $name, $value="", $type="button")
{
return self::__construct($caption, $name, $value, $type);
}
public function __construct($caption, $name, $value="", $type="button")
{
$this->setCaption($caption);
$this->setName($name);
@@ -74,6 +74,10 @@ class XoopsFormCheckBox extends XoopsFormElement
* @param mixed $value Either one value as a string or an array of them.
*/
public function XoopsFormCheckBox($caption, $name, $value = null)
{
return self::__construct($caption, $name, $value);
}
public function __construct($caption, $name, $value = null)
{
$this->setCaption($caption);
$this->setName($name);
@@ -56,6 +56,10 @@ class XoopsFormDateTime extends XoopsFormElementTray
{
public function XoopsFormDateTime($caption, $name, $size = 15, $value=0)
{
return self::__construct($caption, $name, $size, $value);
}
public function __construct($caption, $name, $size = 15, $value=0)
{
$this->XoopsFormElementTray($caption, ' ');
$value = intval($value);
@@ -94,7 +94,11 @@ class XoopsFormDhtmlTextArea extends XoopsFormTextArea
*/
public function XoopsFormDhtmlTextArea($caption, $name, $value, $rows=5, $cols=50, $hiddentext="xoopsHiddenText")
{
$this->XoopsFormTextArea($caption, $name, $value, $rows, $cols);
return self::__construct($caption, $name, $value, $rows, $cols, $hiddentext);
}
public function __construct($caption, $name, $value, $rows=5, $cols=50, $hiddentext="xoopsHiddenText")
{
parent::__construct($caption, $name, $value, $rows, $cols);
$this->_xoopsHiddenText = $hiddentext;
}
@@ -115,6 +115,10 @@ class XoopsFormElement
*
*/
public function XoopsFormElement()
{
return self::__construct();
}
public function __construct()
{
exit("This class cannot be instantiated!");
}
@@ -82,6 +82,10 @@ class XoopsFormElementTray extends XoopsFormElement
* @param string $delimiter HTML to separate the elements
*/
public function XoopsFormElementTray($caption, $delimeter=" ", $name="")
{
return self::__construct($caption, $delimeter, $name);
}
public function __construct($caption, $delimeter=" ", $name="")
{
$this->setName($name);
$this->setCaption($caption);
@@ -69,6 +69,10 @@ class XoopsFormFile extends XoopsFormElement
* @param int $maxfilesize Maximum size for an uploaded file
*/
public function XoopsFormFile($caption, $name, $maxfilesize)
{
return self::__construct($caption, $name, $maxfilesize);
}
public function __construct($caption, $name, $maxfilesize)
{
$this->setCaption($caption);
$this->setName($name);
@@ -66,6 +66,10 @@ class XoopsFormHidden extends XoopsFormElement
* @param string $value "value" attribute
*/
public function XoopsFormHidden($name, $value)
{
return self::__construct($name, $value);
}
public function __construct($name, $value)
{
$this->setName($name);
$this->setHidden();
@@ -52,6 +52,10 @@ class XoopsFormHiddenToken extends XoopsFormHidden
* @param string $name "name" attribute
*/
public function XoopsFormHiddenToken($name = null, $timeout = 360)
{
return self::__construct($name, $timeout);
}
public function __construct($name = null, $timeout = 360)
{
if (empty($name)) {
$token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_DEFAULT);
@@ -66,6 +66,10 @@ class XoopsFormLabel extends XoopsFormElement
* @param string $value Text
*/
public function XoopsFormLabel($caption="", $value="")
{
return self::__construct($caption, $value);
}
public function __construct($caption="", $value="")
{
$this->setCaption($caption);
$this->_value = $value;
@@ -86,6 +86,10 @@ class XoopsFormPassword extends XoopsFormElement
* <b>Warning:</b> this is readable in cleartext in the page's source!
*/
public function XoopsFormPassword($caption, $name, $size, $maxlength, $value="")
{
return self::__construct($caption, $name, $size, $maxlength, $value);
}
public function __construct($caption, $name, $size, $maxlength, $value="")
{
$this->setCaption($caption);
$this->setName($name);
@@ -76,6 +76,10 @@ class XoopsFormRadio extends XoopsFormElement
* @param string $value Pre-selected value
*/
public function XoopsFormRadio($caption, $name, $value = null)
{
return self::__construct($caption, $name, $value);
}
public function __construct($caption, $name, $value = null)
{
$this->setCaption($caption);
$this->setName($name);
@@ -69,6 +69,10 @@ class XoopsFormRadioYN extends XoopsFormRadio
* @param string $no String for "No"
*/
public function XoopsFormRadioYN($caption, $name, $value=null, $yes=_YES, $no=_NO)
{
return self::__construct($caption, $name, $value, $yes, $no);
}
public function __construct($caption, $name, $value=null, $yes=_YES, $no=_NO)
{
$this->XoopsFormRadio($caption, $name, $value);
$this->addOption(1, $yes);
@@ -91,6 +91,10 @@ class XoopsFormSelect extends XoopsFormElement
* @param bool $multiple Allow multiple selections?
*/
public function XoopsFormSelect($caption, $name, $value=null, $size=1, $multiple=false)
{
return self::__construct($caption, $name, $value, $size, $multiple);
}
public function __construct($caption, $name, $value=null, $size=1, $multiple=false)
{
$this->setCaption($caption);
$this->setName($name);
@@ -72,6 +72,10 @@ class XoopsFormSelectCountry extends XoopsFormSelect
* @param int $size Number or rows. "1" makes a drop-down-list
*/
public function XoopsFormSelectCountry($caption, $name, $value=null, $size=1)
{
return self::__construct($caption, $name, $value, $size);
}
public function __construct($caption, $name, $value=null, $size=1)
{
$this->XoopsFormSelect($caption, $name, $value, $size);
$this->addOptionArray(XoopsLists::getCountryList());
@@ -68,6 +68,10 @@ class XoopsFormSelectGroup extends XoopsFormSelect
* @param bool $multiple Allow multiple selections?
*/
public function XoopsFormSelectGroup($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false)
{
return self::__construct($caption, $name, $include_anon, $value, $size, $multiple);
}
public function __construct($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false)
{
$this->XoopsFormSelect($caption, $name, $value, $size, $multiple);
$member_handler =& xoops_gethandler('member');
@@ -70,6 +70,10 @@ class XoopsFormSelectLang extends XoopsFormSelect
* @param int $size Number of rows. "1" makes a drop-down-list.
*/
public function XoopsFormSelectLang($caption, $name, $value=null, $size=1)
{
return self::__construct($caption, $name, $value, $size);
}
public function __construct($caption, $name, $value=null, $size=1)
{
$this->XoopsFormSelect($caption, $name, $value, $size);
$this->addOptionArray(XoopsLists::getLangList());
@@ -67,6 +67,10 @@ class XoopsFormSelectMatchOption extends XoopsFormSelect
* @param int $size Number of rows. "1" makes a drop-down-list
*/
public function XoopsFormSelectMatchOption($caption, $name, $value=null, $size=1)
{
return self::__construct($caption, $name, $value, $size);
}
public function __construct($caption, $name, $value=null, $size=1)
{
$this->XoopsFormSelect($caption, $name, $value, $size, false);
$this->addOption(XOOPS_MATCH_START, _STARTSWITH);
@@ -69,6 +69,10 @@ class XoopsFormSelectTheme extends XoopsFormSelect
* @param int $size Number or rows. "1" makes a drop-down-list
*/
public function XoopsFormSelectTheme($caption, $name, $value=null, $size=1)
{
return self::__construct($caption, $name, $value, $size);
}
public function __construct($caption, $name, $value=null, $size=1)
{
$this->XoopsFormSelect($caption, $name, $value, $size);
$this->addOptionArray(XoopsLists::getThemesList());
@@ -71,6 +71,10 @@ class XoopsFormSelectTimezone extends XoopsFormSelect
* @param int $size Number of rows. "1" makes a drop-down-box.
*/
public function XoopsFormSelectTimezone($caption, $name, $value=null, $size=1)
{
return self::__construct($caption, $name, $value, $size);
}
public function __construct($caption, $name, $value=null, $size=1)
{
$this->XoopsFormSelect($caption, $name, $value, $size);
$this->addOptionArray(XoopsLists::getTimeZoneList());
@@ -70,6 +70,10 @@ class XoopsFormSelectUser extends XoopsFormSelect
* @param bool $multiple Allow multiple selections?
*/
public function XoopsFormSelectUser($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false)
{
return self::__construct($caption, $name, $include_anon, $value, $size, $multiple);
}
public function __construct($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false)
{
$this->XoopsFormSelect($caption, $name, $value, $size, $multiple);
$member_handler =& xoops_gethandler('member');
@@ -84,6 +84,10 @@ class XoopsFormText extends XoopsFormElement
* @param string $value Initial text
*/
public function XoopsFormText($caption, $name, $size, $maxlength, $value="")
{
return self::__construct($caption, $name, $size, $maxlength, $value);
}
public function __construct($caption, $name, $size, $maxlength, $value="")
{
$this->setCaption($caption);
$this->setName($name);
@@ -84,6 +84,10 @@ class XoopsFormTextArea extends XoopsFormElement
* @param int $cols number of columns
*/
public function XoopsFormTextArea($caption, $name, $value="", $rows=5, $cols=50)
{
return self::__construct($caption, $name, $value, $rows, $cols);
}
public function __construct($caption, $name, $value="", $rows=5, $cols=50)
{
$this->setCaption($caption);
$this->setName($name);
@@ -55,6 +55,10 @@ class XoopsFormTextDateSelect extends XoopsFormText
{
public function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)
{
return self::__construct($caption, $name, $size, $value);
}
public function __construct($caption, $name, $size = 15, $value= 0)
{
$value = !is_numeric($value) ? time() : intval($value);
$this->XoopsFormText($caption, $name, $size, 25, $value);
@@ -20,11 +20,15 @@ class XoopsFormToken extends XoopsFormHidden
* @param object $token XoopsToken instance
*/
public function XoopsFormToken($token)
{
return self::__construct($token);
}
public function __construct($token)
{
if (is_object($token)) {
parent::XoopsFormHidden($token->getTokenName(), $token->getTokenValue());
parent::__construct($token->getTokenName(), $token->getTokenValue());
} else {
parent::XoopsFormHidden('', '');
parent::__construct('', '');
}
}
}
@@ -33,7 +33,7 @@
}
include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
class xoopstopic
class XoopsTopic
{
public $table;
public $topic_id;
@@ -45,6 +45,10 @@ class xoopstopic
public $mid; // module id used for setting permission
public function XoopsTopic($table, $topicid=0)
{
return self::__construct($table, $topicid);
}
public function __construct($table, $topicid=0)
{
$this->db =& Database::getInstance();
$this->table = $table;
View
@@ -29,7 +29,7 @@
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
class xoopstree
class XoopsTree
{
public $table; //table with parent-child structure
public $id; //name of unique id for records in table $table
@@ -41,6 +41,10 @@ class xoopstree
//constructor of class XoopsTree
//sets the names of table, unique id, and parend id
public function XoopsTree($table_name, $id_name, $pid_name)
{
return self::__construct($table_name, $id_name, $pid_name);
}
public function __construct($table_name, $id_name, $pid_name)
{
$this->db =& Database::getInstance();
$this->table = $table_name;
@@ -111,6 +111,10 @@ class XCube_PageNavigator
* @param int flag
*/
public function XCube_PageNavigator($url, $flags = XCUBE_PAGENAVI_START)
{
return self::__construct($url, $flags);
}
public function __construct($url, $flags = XCUBE_PAGENAVI_START)
{
$this->mUrl = $url;
$this->mFlags = $flags;
View
@@ -60,6 +60,10 @@ class XoopsBlock extends XoopsObject
* @param mixed $id
**/
public function XoopsBlock($id = null)
{
return self::__construct($id);
}
public function __construct($id = null)
{
static $initVars, $initMap;
if (isset($initVars)) {
Oops, something went wrong.

0 comments on commit 9a1170c

Please sign in to comment.