From a37efd0c5b1db9be712e7d6667be30a8cf2ea763 Mon Sep 17 00:00:00 2001
From: Nuno Luciano <1905497+gigamaster@users.noreply.github.com>
Date: Wed, 16 Feb 2022 08:05:51 +0100
Subject: [PATCH 01/11] Active AltSys Repo
---
README.md | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index f8c2f50..ddd77ba 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,35 @@
-## 🚧 Altsys module was merged into XCL branch module/altsys !
-https://github.com/xoopscube/xcl/tree/module/altsys
+[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/2.0.0/active.svg)](https://github.com/xoopscube/xcl)
+![License GPL](https://img.shields.io/badge/License-GPL-green)
+![License GPL](https://img.shields.io/badge/X--Update%20Store-Pending-red)
+
+## ///// — AltSys UI Common Library
+
+![alt text](https://repository-images.githubusercontent.com/8041517/16f372e9-91e2-4ff8-8d79-ccbb6b2ad0d9)
+
+
+MODULE | ALTSYS
+------------ | -------------
+Description | UI Common Library to create and manage Modules Blocks, Templates, Localization
+Render Engine | Smarty v2 and XCube Layout
+Version | 2.3.1
+Author | Original by GiJoe ( peak.ne.jp )
+Author | Update by Nuno Luciano (aka Gigamaster)
+Copyright | 2005-2022 Authors
+License | GPL
+
+
+##### :computer: The Minimum Requirements
+
+
+
+ Apache, Nginx, etc. PHP 7.2.x
+ MySQL 5.6, MariaDB InnoDB utf8 / utf8mb4
+ XCL version 2.3.+
+
+
+
+-----
-## ⚠️ This repository is planned to be archived !
== ALTSYS == alternative system module & library
From 770cb2acf6b890266e9ac91d5fbdb805c626f833 Mon Sep 17 00:00:00 2001
From: gigamaster <1905497+gigamaster@users.noreply.github.com>
Date: Wed, 16 Feb 2022 08:46:04 +0100
Subject: [PATCH 02/11] =?UTF-8?q?=E2=9A=A1=20=F0=9F=94=A8=20=F0=9F=8E=A8?=
=?UTF-8?q?=20Code=20refactoring=20for=20XCL=20PHP7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
xoops_trust_path/libs/altsys/CHANGELOG | 343 ---
xoops_trust_path/libs/altsys/README | 282 ---
xoops_trust_path/libs/altsys/TODO | 37 -
xoops_trust_path/libs/altsys/admin_menu.php | 96 +-
xoops_trust_path/libs/altsys/blocks.php | 38 +-
.../libs/altsys/blocks/block_functions.php | 219 +-
.../altsys/class/AltsysBreadcrumbs.class.php | 110 +-
.../altsys/class/D3LanguageManager.class.php | 178 +-
.../class/D3NotificationHandler.class.php | 184 +-
.../libs/altsys/class/D3Tpl.class.php | 28 +-
.../libs/altsys/class/MyBlocksAdmin.class.php | 2215 +++++++++--------
.../class/MyBlocksAdminForICMS.class.php | 161 --
.../class/MyBlocksAdminForX20S.class.php | 90 -
.../class/MyBlocksAdminForX22.class.php | 544 ----
.../class/MyBlocksAdminForX25.class.php | 364 ---
.../class/MyBlocksAdminForXCL21.class.php | 104 +-
.../altsys/class/SetupAltsysLangMgr.class.php | 211 +-
.../libs/altsys/class/altsysUtils.class.php | 70 +-
.../libs/altsys/class/d3utilities.php | 338 ++-
.../libs/altsys/compilehookadmin.php | 505 ++--
xoops_trust_path/libs/altsys/controllers.php | 43 +-
.../libs/altsys/get_templates.php | 81 +-
.../libs/altsys/get_tplsvarsinfo.php | 317 +--
.../libs/altsys/include/Archive_Zip.php | 1141 +++++----
.../Legacy_AltsysAdminRenderSystem.class.php | 43 +-
.../libs/altsys/include/Text_Diff.php | 1556 ++++++------
.../altsys/include/Text_Diff_Renderer.php | 450 ++--
.../include/Text_Diff_Renderer_inline.php | 365 +--
.../include/Text_Diff_Renderer_unified.php | 100 +-
.../altsys/include/admin_in_theme.inc.php | 67 +-
.../include/admin_in_theme_functions.php | 292 +--
.../include/admin_in_theme_header.inc.php | 509 ++--
.../altsys/include/adminmenu_functions.php | 333 +--
.../libs/altsys/include/altsys_functions.php | 227 +-
.../include/autoupdate_from_d3module.inc.php | 73 +-
.../include/autoupdate_from_module.inc.php | 81 +-
.../include/autoupdate_from_theme.inc.php | 41 +-
.../libs/altsys/include/compilehook.inc.php | 56 +-
.../libs/altsys/include/formcheckboxgroup.php | 111 +-
.../libs/altsys/include/gtickets.php | 784 +++---
.../libs/altsys/include/index.php | 2 +
.../libs/altsys/include/lang_functions.php | 208 +-
.../libs/altsys/include/mygroupperm.php | 226 +-
.../libs/altsys/include/mygrouppermform.php | 764 +++---
.../libs/altsys/include/tpls_functions.php | 411 +--
.../include/x20_keepblockoptions.inc.php | 141 +-
xoops_trust_path/libs/altsys/index.php | 67 +-
.../altsys/language/english/blocks_common.php | 4 +-
.../language/english/compilehookadmin.php | 18 +-
.../libs/altsys/language/english/modinfo.php | 46 +-
.../altsys/language/english/myblocksadmin.php | 2 +-
.../altsys/language/english/mylangadmin.php | 12 +-
.../altsys/language/english/mytplsadmin.php | 8 +-
.../altsys/language/english/mytplsform.php | 2 +-
.../libs/altsys/language/fr_utf8/admin.php | 3 +
.../{french => fr_utf8}/admin_in_theme.php | 0
.../{french => fr_utf8}/blocks_common.php | 0
.../{french => fr_utf8}/blocks_each.php | 2 +-
.../{french => fr_utf8}/compilehookadmin.php | 0
.../language/{french => fr_utf8}/modinfo.php | 18 +-
.../{french => fr_utf8}/myblocksadmin.php | 30 +-
.../altsys/language/fr_utf8/mylangadmin.php | 27 +
.../altsys/language/fr_utf8/mypreferences.php | 4 +
.../altsys/language/fr_utf8/mytplsadmin.php | 27 +
.../{french => fr_utf8}/mytplsform.php | 6 +-
.../libs/altsys/language/french/admin.php | 3 -
.../altsys/language/french/mylangadmin.php | 27 -
.../altsys/language/french/mypreferences.php | 4 -
.../altsys/language/french/mytplsadmin.php | 27 -
.../altsys/language/ja_utf8/blocks_common.php | 4 +-
.../language/ja_utf8/compilehookadmin.php | 2 +-
.../libs/altsys/language/ja_utf8/modinfo.php | 2 +-
.../libs/altsys/language/japanese/admin.php | 3 -
.../language/japanese/admin_in_theme.php | 4 -
.../language/japanese/blocks_common.php | 5 -
.../altsys/language/japanese/blocks_each.php | 13 -
.../language/japanese/compilehookadmin.php | 50 -
.../libs/altsys/language/japanese/modinfo.php | 37 -
.../language/japanese/myblocksadmin.php | 56 -
.../altsys/language/japanese/mylangadmin.php | 27 -
.../language/japanese/mypreferences.php | 4 -
.../altsys/language/japanese/mytplsadmin.php | 28 -
.../altsys/language/japanese/mytplsform.php | 11 -
.../libs/altsys/language/portuguese/admin.php | 4 -
.../language/portuguese/admin_in_theme.php | 5 -
.../language/portuguese/blocks_common.php | 5 -
.../language/portuguese/blocks_each.php | 12 -
.../language/portuguese/compilehookadmin.php | 42 -
.../altsys/language/portuguese/index.html | 18 -
.../altsys/language/portuguese/modinfo.php | 28 -
.../language/portuguese/myblocksadmin.php | 48 -
.../language/portuguese/mylangadmin.php | 23 -
.../language/portuguese/mypreferences.php | 5 -
.../language/portuguese/mytplsadmin.php | 25 -
.../altsys/language/portuguese/mytplsform.php | 12 -
.../libs/altsys/myblocksadmin.php | 89 +-
xoops_trust_path/libs/altsys/mylangadmin.php | 447 ++--
xoops_trust_path/libs/altsys/mymenu.php | 105 +-
.../libs/altsys/mymenusub/myblocksadmin.php | 105 +-
.../libs/altsys/mymenusub/mylangadmin.php | 68 +-
.../libs/altsys/mymenusub/mytplsadmin.php | 90 +-
.../libs/altsys/mypreferences.php | 574 ++---
xoops_trust_path/libs/altsys/mytplsadmin.php | 626 ++---
xoops_trust_path/libs/altsys/mytplsform.php | 425 ++--
xoops_trust_path/libs/altsys/oninstall.php | 260 +-
xoops_trust_path/libs/altsys/onuninstall.php | 124 +-
xoops_trust_path/libs/altsys/onupdate.php | 198 +-
xoops_trust_path/libs/altsys/preload.php | 26 +-
.../libs/altsys/put_templates.php | 148 +-
.../altsys/smarty_plugins/resource.db.php | 184 +-
xoops_trust_path/libs/altsys/sql/mysql.sql | 15 +-
.../altsys/templates/block_admin_menu.html | 20 +-
.../libs/altsys/templates/inc_menu.html | 17 +
.../libs/altsys/templates/inc_menu_sub.html | 6 +
.../libs/altsys/templates/inc_mymenu.css | 34 -
.../libs/altsys/templates/inc_mymenu.html | 9 -
.../libs/altsys/templates/inc_mymenusub.html | 8 -
.../libs/altsys/templates/inc_mytplsadmin.css | 29 -
...egacy.html => main_blocks_admin_edit.html} | 72 +-
.../templates/main_blocks_admin_list.html | 154 ++
..._mylangadmin.html => main_lang_admin.html} | 78 +-
.../templates/main_myblocksadmin_edit.html | 136 -
.../main_myblocksadmin_edit_4x25.html | 177 --
.../templates/main_myblocksadmin_list.html | 73 -
.../libs/altsys/xoops_version.php | 158 +-
125 files changed, 9144 insertions(+), 10660 deletions(-)
delete mode 100644 xoops_trust_path/libs/altsys/CHANGELOG
delete mode 100644 xoops_trust_path/libs/altsys/README
delete mode 100644 xoops_trust_path/libs/altsys/TODO
delete mode 100644 xoops_trust_path/libs/altsys/class/MyBlocksAdminForICMS.class.php
delete mode 100644 xoops_trust_path/libs/altsys/class/MyBlocksAdminForX20S.class.php
delete mode 100644 xoops_trust_path/libs/altsys/class/MyBlocksAdminForX22.class.php
delete mode 100644 xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php
create mode 100644 xoops_trust_path/libs/altsys/include/index.php
create mode 100644 xoops_trust_path/libs/altsys/language/fr_utf8/admin.php
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/admin_in_theme.php (100%)
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/blocks_common.php (100%)
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/blocks_each.php (81%)
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/compilehookadmin.php (100%)
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/modinfo.php (67%)
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/myblocksadmin.php (64%)
create mode 100644 xoops_trust_path/libs/altsys/language/fr_utf8/mylangadmin.php
create mode 100644 xoops_trust_path/libs/altsys/language/fr_utf8/mypreferences.php
create mode 100644 xoops_trust_path/libs/altsys/language/fr_utf8/mytplsadmin.php
rename xoops_trust_path/libs/altsys/language/{french => fr_utf8}/mytplsform.php (64%)
delete mode 100644 xoops_trust_path/libs/altsys/language/french/admin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/french/mylangadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/french/mypreferences.php
delete mode 100644 xoops_trust_path/libs/altsys/language/french/mytplsadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/admin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/admin_in_theme.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/blocks_common.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/blocks_each.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/compilehookadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/modinfo.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/myblocksadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/mylangadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/mypreferences.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/mytplsadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/japanese/mytplsform.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/admin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/admin_in_theme.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/blocks_common.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/blocks_each.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/compilehookadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/index.html
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/modinfo.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/myblocksadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/mylangadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/mypreferences.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/mytplsadmin.php
delete mode 100644 xoops_trust_path/libs/altsys/language/portuguese/mytplsform.php
create mode 100644 xoops_trust_path/libs/altsys/templates/inc_menu.html
create mode 100644 xoops_trust_path/libs/altsys/templates/inc_menu_sub.html
delete mode 100644 xoops_trust_path/libs/altsys/templates/inc_mymenu.css
delete mode 100644 xoops_trust_path/libs/altsys/templates/inc_mymenu.html
delete mode 100644 xoops_trust_path/libs/altsys/templates/inc_mymenusub.html
delete mode 100644 xoops_trust_path/libs/altsys/templates/inc_mytplsadmin.css
rename xoops_trust_path/libs/altsys/templates/{main_myblocksadmin_edit_4legacy.html => main_blocks_admin_edit.html} (52%)
create mode 100644 xoops_trust_path/libs/altsys/templates/main_blocks_admin_list.html
rename xoops_trust_path/libs/altsys/templates/{main_mylangadmin.html => main_lang_admin.html} (52%)
delete mode 100644 xoops_trust_path/libs/altsys/templates/main_myblocksadmin_edit.html
delete mode 100644 xoops_trust_path/libs/altsys/templates/main_myblocksadmin_edit_4x25.html
delete mode 100644 xoops_trust_path/libs/altsys/templates/main_myblocksadmin_list.html
diff --git a/xoops_trust_path/libs/altsys/CHANGELOG b/xoops_trust_path/libs/altsys/CHANGELOG
deleted file mode 100644
index e280488..0000000
--- a/xoops_trust_path/libs/altsys/CHANGELOG
+++ /dev/null
@@ -1,343 +0,0 @@
-[xlang:en]
-
-
-
-v0.71 (2008-12-21)
-- modified rendering options form for XCL2.1 cl::{BlockClass} (thx tohokuaiki)
-- modified some behaviors for XOOPS2.3
-- fixed group permissions is lost in custom block previewing
-- added RTL support (use _GLOBAL_LEFT/RIGHT instead of left,right directly)
-- updated language files
--- persian (thx voltan)
--- portuguesebr (thx leco1) 0.71b
-- fixed _GLOBAL_LEFT is defined as 'right' if _ADM_USE_RTL is not defined 0.71a
-- _ADM_USE_RTLƤʤĶ_GLOBAL_LEFTrightˤʤХ 0.71a
-- added a delegate D3NotificationHandler.Trigger into D3NotificationHandler 0.71b
-
-v0.70 (2008-12-14) Note: update the module
-- rewritten myblocksadmin fully
-- modified groups can be selected in list_blocks and edit_block
-- added a support for ImpressCMS (page ID and block positions)
-- removed a support for XOOPS2.2
-- added WYSIWYG edition for custom blocks by common/fckeditor (fckxoops)
-- removed WYSIWYG edition for custom blocks by common/spaw
-- added language files
--- portuguesebr (thx leco1)
-
-v0.61 (2008-09-05)
-- added D3NotificationHandler
-- fixed some modinfo.php loaded twice with langauge overridding 0.61a
-
-v0.60 (2008-08-07)
-- fixed warning by assert() in Text_Diff
-- fixed notices missing modinfo.php (thx shige-p)
-
-v0.59 (2008-05-22)
-- fixed css for admin with XCL2.1 and "admin in theme"
-- modified the compatibility of blocksadmin with XCL2.1
-- updated gtickets.php
-- updated language files
--- persian (thx stranger) 0.59a
-
-v0.58 (2008-04-10)
-- fixed wrong breadcrumbs as my*admin
-- modified "admin in theme" read language files under the theme
-- added setup_xoops_trust_path.php
-
-v0.57 (2008-04-01)
-- modified public top altsys
-- fixed typo in langman (thx nobunobu)
-- fixed templates_c/index.html can be removed (thx nobunobu)
-- added module's language files under the theme for XCL2.1
-- added pagetype's language files under the theme for XCL2.1
-- fixed menu duplication with admin in theme and XCL2.1 (thx nobunobu)
-- added a class named AltsysBreadcrumbs
-- modified xoops_breadcrumbs for "admin in theme"
-- added language files
--- spanish (thx debianus)
-
-v0.56 (2007-12-28)
-- added a feature of custom template file (not custom "template set")
-- modified cloned blocks have independent "func_num" each other
-- modified compatibility with some XCL special modules about admin_in_theme
-- added partially overriding language constants by XOOPS_ROOT_PATH/my_language
-- modified mylangadmin displays which constants are overridden partially 0.56a
-- modified compatibility with NBFrame 0.56a
-
-v0.55 (2007-07-12)
-- modified the compatibility against XOOPS 2.0.14/15/16
-- added a class D3Tpl extends XoopsTpl
-- modified adminmenu hack (thx nobu) 0.55a
-- updated language files 0.55a
--- persian (thx voltan)
-- added language files 0.55a
--- german (thx rene)
-
-v0.54 (2007-07-06)
-- fixed admin_in_theme conflicts PHP debug of conventinal XOOPS2
-- fixed admin_in_theme conflicts redirect hack
-
-v0.53 (2007-06-05)
-- modified some interfaces
-- renamed language
--- ja_utf8 (formerly japanaeseutf)
-
-v0.52 (2007-05-11)
-- added config of "force block cloning"
-- mofieid cache files for overriding language constants
-- modified mylangadmin can treat modinfo.php even
-
-v0.51 (2007-05-10)
-- added mylangadmin for conventional modules
-- added a preload for overriding XC Legacy 2.1 Language Manager
-- modified interface of mylangadmin
-- templatized mymenu for altsys
-- templatized mymenusub for altsys
-
-v0.50 (2007-05-07)
-- added mylangadmin - the override system for language constants
-- templatized mymenu
-- added "update and continue to edit" button into mytplsadmin
-- added language files
--- japaneseutf
-- modified the compatibility of mylangadmin 0.50a
-- updated language files 0.50a
--- persian (thx voltan)
-
-v0.41 (2007-04-04)
-- modified tplsadmin can edit themes with dbtheme module
-- fixed compatibility between "admin in theme" and Legacy 2.1 (thx sakichi)
-- fixed redirect_message 0.41a
-
-v0.40 (2007-03-27) note: overwrite XOOPS_ROOT_PATH/modules/altsys also
-- modified the structure radically
-- added a bridge "admin in theme" to XC Legacy 2.1
-- added a block of adminmenu
-- modified README better
-
-v0.36 (2007-03-23)
-- modified compatibilities of "admin in theme" still
-- added a feature blocks can be displayed in "admin in theme" (also xoops.org)
-- changed blocks displaying rule in "admin in theme" (specify ALTSYS explicitly)
-- added xoops_breadcrumbs for "admin in theme"
-- fixed compatibity problem with php5 on "admin in theme" (thx sakichi) 0.36a
-
-v0.35 (2007-03-22)
-- modified compatibilities of "admin in theme"
-- added a feature any blocks can be displayed in "admin in theme" (only with JP)
-
-v0.34 (2007-03-21)
-- added a feature of "admin in theme"
-
-v0.33 (2007-03-20)
-- modified admin menu hacks a little bit
-- modified compilehookadmin for other than html templates
-- updated language files
--- persian (thx voltan)
-
-v0.32 (2007-03-19)
-- modified admin menu hacks
-- fixed a bug on installing newly (thx fourpsk)
-
-v0.31 (2007-03-18)
-- added admin menu hacks :-)
-
-v0.30 (2007-03-14) note: remove XOOPS_ROOT_PATH/modules/altsys once
-- modified the structure of file tree
-
-v0.21 (2006-10-27)
-- fixed wrong link from templates (thx makimaki)
-- added language persian (thx voltan)
-
-v0.20 (2006-10-18)
-- modified compatibility with Cube 2.1 beta
-- fixed wrong links of admin menu (thx usagiya) 0.20a
-
-v0.12 (2006-07-18)
-- modified compatibility with Cube 2.1 alpha3 without system module
-
-v0.11 (2006-06-21)
-- fixed uri of spaw in myblocksadmin (thx nico)
-- modified icon (thx argon)
-
-v0.10 (2006-05-19)
-- 1st release as altsys
-- myblocksadmin
-- mytplsadmin
-- mypreferences
-- compilehookadmin
-- fixed escaping rule of & (myblocksadmin)
-- XOOPS 2.2 ready (myblocksadmin)
-
-
-[/xlang:en]
-[xlang:ja]
-
-v0.71 (2008-12-21)
-- XCL2.1cl::{BlockClass}б (thx tohokuaiki)
-- XOOPS2.3Ǥưǧ
-- ץӥ塼˥롼¤ƤΤ
-- RTLݡ (leftrightľ˵Ҥˡ_GLOBAL_LEFT/RIGHTȤ)
--
--- persian (thx voltan)
--- portuguesebr (thx leco1) 0.71b
-- _ADM_USE_RTLƤʤĶ_GLOBAL_LEFTrightˤʤХ 0.71a
-- ٥Υϥɥ餬 D3NotificationHandler.Trigger call褦ѹ 0.71b
-
-v0.70 (2008-12-14) ץ⥸塼륢åץǡ
-- myblocksadminޤޤľ
-- ɽоݥ롼פľǤ褦ˤ
-- ImpressCMSбʥڡIDɲå֥åݥ
-- XOOPS2.2ؤб
-- common/fckeditor (fckxoops)ǥ֥åԽǤ褦ˤ
-- ֥åԽspawؤб
-- ɲ
--- portuguesebr (thx leco1)
-
-v0.61 (2008-09-05)
-- D3NotificationHandler ɲ
-- С饤ɤ modinfo.php ɤޤƤޤݤ 0.61a
-
-v0.60 (2008-08-07)
-- Text_DiffǤassert()ˤWarningȤꤢä
-- modinfo.phpɤ߹ޤʤNoticeФƤΤ (thx shige-p)
-
-v0.59 (2008-05-22)
-- XCL2.1ˤ̥ơޤǡCSSɤ߹ޤʤβ
-- XCL2.1ˤ֥å
-- gtickets.php ι
-- ե빹
--- persian (thx stranger) 0.59a
-
-v0.58 (2008-04-10)
-- ѥϢΥХ
-- ̥ơޤΥơեб
-- XOOPS_TRUST_PATHꤷƤʤбɲ
-
-v0.57 (2008-04-01)
-- Altsysϥ⥸塼ȤƤޤäнɲ
-- ޥ͡typo (thx nobunobu)
-- ƥץ졼ȥåեθ (thx nobunobu)
-- XCL2.1Ѹޥ͡եåpreloadΥơեб
-- XCL2.1Ѹޥ͡եåpreloadmy_language/ڡեб
-- XCL2.1δ̥ơޤǡ˥塼ܤʣХν (thx nobunobu)
-- AltsysBreadcrumbs 饹ο
-- Altsysxoops_breadcrumbsŪܤ˺ä
-- եɲ
--- spanish (thx debianus)
-
-v0.56 (2007-12-28)
-- ƥץ졼Ȥμ
-- ʣ֥åfunc_numʤ٤֤ʤ褦ˤ
-- ̥ơޤ Module.class.php ǥС饤ɤ⥸塼б
-- XOOPS_ROOT_PATH/my_language ˤκʬС饤ɤ
-- ʬС饤ɾ̤ǤǧǤ褦ˤ 0.56a
-- NBFrameؤб 0.56a
-
-v0.55 (2007-07-12)
-- ܲǥ2.0.14/15/16Ȥθߴ
-- XoopsTplѾD3Tpl饹μ
-- ̥˥塼ǽβ (thx nobu) 0.55a
-- ե빹 0.55a
--- persian (thx voltan)
-- եɲ 0.55a
--- german (thx rene)
-
-v0.54 (2007-07-06)
-- ̥ơޤȤȥ顼ɽʤʤäƤޤäΤ
-- ̥ơޤȤڹ®HackȤξͤ
-
-v0.53 (2007-06-05)
-- ٤
-- ե̾ѹ
--- ja_utf8 ( japanaeseutf)
-
-v0.52 (2007-05-11)
-- ֥åʣǽץο
-- åե롼ѹ
-- ե륪С饤ɤ modinfo.php ⰷ褦ˤ
-
-v0.51 (2007-05-10)
-- ̾⥸塼ե륪С饤ɥƥǰ褦˻ѹ
-- XoopsCube Legacy 2.1 ѤΥޥ͡㥪С饤preloadƱ
-- mylangadmin
-- altsysmymenuΥƥץ졼Ȳ
-- Ʊ֥˥塼Υƥץ졼Ȳ
-
-v0.50 (2007-05-07)
-- ե륪С饤ɥƥmylangadminμ
-- mymenuΥƥץ졼Ȳ
-- ƥץ졼ԽǤγǧܥɲ
-- եɲ
--- japaneseutf
-- mylangadminθߴ 0.50a
-- ե뽤 0.50a
--- persian (thx voltan)
-
-v0.41 (2007-04-04)
-- tplsadmin ơԽб (dbtheme⥸塼Ȥʻѻ)
-- ̥ơޤLegacy 2.1ߴ夵 (thx sakichi)
-- ڹ®HackǥåɽƤʤäΤ 0.41a
-
-v0.40 (2007-03-27) ¦Ƥ
-- ¤ѹ
-- ̥ơޤXC Legacy 2.1ư褦ˤ
-- ̥˥塼֥å
-- ɥȤ
-
-v0.36 (2007-03-23)
-- ̥ơޤθߴΤʤ
-- ̥ơޤǡܲ2.0.xǤ֥åɽǽȤ
-- ̥ơޥ֥åɽѹ оݤ"ALTSYS"Ū˻ꤵ줿
-- ̥ơޤǤxoops_breadcrumbsб
-- PHPȴ̥ơޤǽʤäΤ (thx sakichi) 0.36a
-
-v0.35 (2007-03-22)
-- ̥ơޤθߴ
-- ֥åɽǽˤ (ǤJPǤΤ)
-
-v0.34 (2007-03-21)
-- ̤¦ơޤɽ뵡ǽɲ
-
-v0.33 (2007-03-20)
-- ˥塼νǽ⤦ɤ
-- ƥץ졼Ȥι٤ʴǡHTMLʳΥƥץ졼Ȥνѹ
-- ե빹
--- persian (thx voltan)
-
-v0.32 (2007-03-19)
-- ˥塼νǽδ٤
-- 0.31ǥȡǤʤʤäƤХν (thx fourpsk)
-
-v0.31 (2007-03-18)
-- ˥塼νǽɲ
-
-v0.30 (2007-03-14) ¦ääƤ
-- ե빽θľʰʹߤXOOPS_TRUST_PATHΤ߾ɤˤ
-
-v0.21 (2006-10-27)
-- ƥץ졼Ȥؤߤǥ褬äΤ (thx makimaki)
-- ȥ륳ɲ (thx voltan)
-
-v0.20 (2006-10-18)
-- Cube 2.1 beta ư褦ˤ
-- ˥塼äΤ (thx usagiya) 0.20a
-
-v0.12 (2006-07-18)
-- Cube 2.1 alpha3 system⥸塼뤬¸ߤʤؤбɲ
-
-v0.11 (2006-06-21)
-- myblocksadminspawäΤ (thx nico)
-- (thx argon)
-
-v0.10 (2006-05-19)
-- ǽΥ
-- myblocksadmin
-- mytplsadmin
-- mypreferences
-- compilehookadmin
-- & ΰ (myblocksadmin)
-- XOOPS 2.2б (myblocksadmin)
-
-
-[/xlang:ja]
diff --git a/xoops_trust_path/libs/altsys/README b/xoops_trust_path/libs/altsys/README
deleted file mode 100644
index aaab031..0000000
--- a/xoops_trust_path/libs/altsys/README
+++ /dev/null
@@ -1,282 +0,0 @@
-[mlimg]
-[xlang:en]
-== ALTSYS == alternative system module & library
-
-[b]SUMMARY:[/b]
-
-The unified module of blocksadmin, tplsadmin, etc around the system.
-
-I'm appreciated your bug reports :-)
-
-I'll maintain this module instead of blocksadmin, tplsadmin, avaman etc.
-
-
-[b]INSTALL:[/b]
-
-- set XOOPS_TRUST_PATH into mainfile.php
-- copy xoops_trus_path/libs/ in the archive into XOOPS_TRUST_PATH/
-- copy html/modules/altsys in the archive into XOOPS_ROOT_PATH/modules/
-- install it
-
-
-[b]UPDATE[/b]
-from 0.2x/0.3x:
- - remove XOOPS_ROOT_PATH/modules/altsys/ once
- - upload/overwrite both XOOPS_ROOT_PATH/modules/altsys and XOOPS_TRUST_PATH/libs/altsys
-
-
-[b]FEATURES[/b]
-
-- easy block administration
-- easy permission adminstration
-- easy copy/delete/edit any DB templates
-- easy import/export any DB templates
-- displaying diff between each version of templates
-- finding the template you want to edit easily
-- making an Extension for Dreamweaver to edit templates
-- modifying adminmenu in the left side of XOOPS 2.0.x easier
-- displaying admin controll panels in any conventional themes
-- supporting three types of template auto-updating into the DB
-- modifying operations/developments of any versions of core (X2,XCL2.1,ImpressCMS etc.) efficient
-
-
-[b]DB template auto-updating feature[/b]
-
-This feature make your customizing/developping DB templates much efficient.
-Altsys supports three types of auto-updating into the DB.
-
-(1) auto-updating template under the theme.
-This feature is useful for developper of site/theme.
-Insert a line just after including common.php of mainfile.php.
-[code]
- include XOOPS_ROOT_PATH."/include/common.php";
- [color=ff0000]
- include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_theme.inc.php" ;
- [/color]
-[/code]
-Then, just modifying the templates of /themes/(your_theme)/templates/* will be updated into the DB
-
-(2) auto-updating template under the module
-This feature is useful for developper of modules.
-Insert two lines just after including common.php of mainfile.php.
-[code]
- include XOOPS_ROOT_PATH."/include/common.php";
- [color=ff0000]
- $tplsadmin_autoupdate_dirnames = array( '(your_module)' ) ;
- include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_module.inc.php" ;
- [/color]
-[/code]
-Then, just modifying the templates of /modules/(your_module)/templates/* will be updated into the DB.
-You can specify modules multiply. eg) array( 'piCal' , 'tinyd0' )
-
-(3) auto-updating template under XOOPS_TRUST_PATH
-This feature is useful for developper of D3 modules.
-Insert two lines just after including common.php of mainfile.php.
-[code]
- include XOOPS_ROOT_PATH."/include/common.php";
- [color=ff0000]
- $tplsadmin_autoupdate_mydirnames = array( 'pico' , 'd3forum' ) ;
- include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_d3module.inc.php" ;
- [/color]
-[/code]
-Then, just modifying the templates of XOOPS_TRUST_PATH/modules/pico/templates/* and XOOPS_TRUST_PATH/modules/d3forum/templates/* will be updated into the DB.
-
-
-[b]admin in theme[/b]
-
-You can display admin side in the theme for XOOPS.
-This must be useful for accessibility or mobile.
-
-You have to make some patch for enabling this feature.
-
-(1) XOOPS2.0.x
-Insert a line just after including common.php of mainfile.php.
-[code]
- include XOOPS_TRUST_PATH.'/libs/altsys/include/admin_in_theme.inc.php' ;
-[/code]
-
-(2) XOOPS Cube Legacy 2.1
-Insert some lines into settings/site_custom.ini.php (If this file does not exist, make it newly)
-[code]
-[RenderSystems]
-Legacy_AdminRenderSystem=Legacy_AltsysAdminRenderSystem
-
-[Legacy_AltsysAdminRenderSystem]
-path=/modules/altsys/include
-class=Legacy_AltsysAdminRenderSystem
-[/code]
-
-(3) XOOPS 2.2 and ORETEKI
-Not supported yet
-
-Specify the theme for admin in the preferences of altsys.
-This means that you can specify different themes between public and admin.
-If you disable "admin in theme", set blank here.
-
-If you want to diplaying a block into the admin, Specify "ALTSYS" as the target explicitly.
-
-
-[b]Admin menu hack[/b]
-
-Even if you turn "admin in theme" disabled, you can modify the adminmenu in the left side of admin area. (for 2.0.x)
-
-Just change "Rewrite admin menu" in altsys's preferences.
-This is not a core hack but a cache hack.
-If your admin area is broken, just remove cache/adminmenu.
-
-
-[b]Language constants override system[/b]
-
-mylangadmin offers you to override the language constants of each modules.
-
-But, there are a hardle to enable this feature.
-
-- You always override constants of module using D3LanguageManager natively.
-
-- With core XoopsCube Legacy2.1, you can use this feature with conventional modules just by copying preload/SetupAltsysLangMgr.class.php
-
-- With conventinal core of XOOPS2, you have to hack the core. (follow the instruction in mylangadmin)
-
-[/xlang:en]
-[xlang:ja]
-== ALTSYS == إƥ⥸塼饤֥
-
-
-
-ȤŤ餤ƥ⥸塼ȤƺäƤblocksadmintplsadminȤä˴ؤ礷⥸塼Ǥ
-
-Duplicatable V3⥸塼뤫顢饤֥ȤѤǤˤᡢ¤礭ľƤޤ
-Х紿ޤޤ
-
-ϡavamanۼ伫ȤΥƥʥڤˤȻפޤ
-
-
-ȡ
-
-- mainfile.php ˤ XOOPS_TRUST_PATH ꤷƤ
-- ֤xoops_trus_path/XOOPS_TRUST_PATHŸƤ
-- ֤html/XOOPS_ROOT_PATHŸƤ
-- ⥸塼Ȥƥȡ뤷Ƥ
-- ̥ơǽѤϡμ˽äƤ
-
-
-åץǡ
-
-0.2x 0.3x ΥåץǡȤǤϡ¦(XOOPS_ROOT_PATH/modules/altsys)ääƤ顢Ƥ
-
-0.4顢altsysϸᥤĤ褦ˤʤޤᥤ˥塼ʤɤˡALTSYSɽƺϡ⥸塼ɽ0ѹƤ
-
-
-ǽ
-
-- X2Ƚ䤹֥åǤޤ
-- X2Ƚ䤹´Ǥޤ
-- DBƥץ졼Ȥǽ褫ԽǤޤ
-- ƥץ졼ȤΥݡ/ݡȤͳߤǤ
-- ƥץ졼Խκʬɽޤ
-- оݥƥץ졼ȤĤ䤹Ǥޤ
-- ƥץ졼Խ䤹뤿DreamWeaverExtensionưޤ
-- X2̤δ˥塼ʬɽǤޤ
-- ̤̾ơޤɽ뤳ȤǤޤʴ̥ơǽȡ
-- ƥץ졼ȼưǽޤʥƥץ졼ȼưǽȡ
-- X2, XCL2.1, ImpressCMS륳ȯΨ夷ޤ
-
-
-ƥץ졼ȼưǽ
-
-DBƥץ졼ȤԽݤˤϡեǡưŪDBƥץ졼ȤȿǤƤ뵡ǽȡȤƤⳫȯΨ夷ޤaltsysǤϡ3ĤΥѥޤ
-
-(1)ơƥץ졼ȼưǽ
-ȤơȯԤˤȤäʵǽǤ
-mainfile.phpcommon.phpɹԤľˡʲΤ褦ˣޤ
-[code]
- include XOOPS_ROOT_PATH."/include/common.php";
- [color=ff0000]
- include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_theme.inc.php" ;
- [/color]
-[/code]
-ˤꡢ줿ơtemplates/ե֤줿ƥץ졼ȤưŪɤ߹褦ˤʤޤ
-
-(2)⥸塼ƥץ졼ȼưǽ
-⥸塼볫ȯԤˤȤäʵǽǤ
-mainfile.phpcommon.phpɹԤľˡʲΤ褦ˣޤ
-[code]
- include XOOPS_ROOT_PATH."/include/common.php";
- [color=ff0000]
- $tplsadmin_autoupdate_dirnames = array( 'piCal' ) ;
- include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_module.inc.php" ;
- [/color]
-[/code]
-Τ褦˵Ҥ뤳ȤǡpiCal⥸塼Υƥץ졼ȤθեԽǡ¨˥ǡ١ȿǤޤincludeˡ$tplsadmin_autoupdate_dirnamesåȤƤȤפǤ
-ʣΥ⥸塼Ʊꤹ뤳ȤǽǤarray( 'piCal' , 'tinyd0' ) Τ褦˻ꤷޤ
-
-(3)TRUST_PATHƥץ졼ȼưǽ
-D3⥸塼볫ȯԤˤȤäʵǽǤ
-mainfile.phpcommon.phpɹԤľˡʲΤ褦ˣޤ
-[code]
- include XOOPS_ROOT_PATH."/include/common.php";
- [color=ff0000]
- $tplsadmin_autoupdate_mydirnames = array( 'pico' , 'd3forum' ) ;
- include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_d3module.inc.php" ;
- [/color]
-[/code]
-Τ褦˵Ҥ뤳Ȥǡpico⥸塼d3forumΥƥץ졼ȤθեԽǡ¨˥ǡ١ȿǤޤincludeˡ$tplsadmin_autoupdate_mydirnamesåȤƤȤפǤ
-
-(1)(3)Τ⡢ʻѤǽǤ
-
-
-̥ơǽ
-
-̤ѤΥơޤɽޤˤꡢ̤̤Ʊ̤ǥ쥹ѤǤ褦ˤʤꡢѼԤˤȤäƤΰ´ʤʤåȤޤȤΤ⡢ơޡƥץ졼ȥ٥ǤǤ夵뤳ȤǤޤ
-
-פˤäͭˡ㤤ޤʲŪXOOPS2.2ˤбƤޤ
-
-(1) XOOPS2.0.x
-mainfile.php common.phpɹԤľˡʲΣԤޤ
-[code]
- include XOOPS_TRUST_PATH.'/libs/altsys/include/admin_in_theme.inc.php' ;
-[/code]
-̵ˤϡΣԤƤ
-
-(2) XOOPS Cube Legacy 2.1
-settings/site_custom.ini.php ˰ʲιԤޤʤΥե뤬ʤк
-[code]
-[RenderSystems]
-Legacy_AdminRenderSystem=Legacy_AltsysAdminRenderSystem
-
-[Legacy_AltsysAdminRenderSystem]
-path=/modules/altsys/include
-class=Legacy_AltsysAdminRenderSystem
-[/code]
-̵ˤϡιԤƤ
-
-̥ơޤϡaltsysΰǻꤷޤ
-Ĥޤꡢ¦ơޤȴ¦ơޤ̡ΤΤǤޤ
-ˤǤ⡢̥ơޤ̵뤳ȤǤޤ
-ȯˤϡˡȤΤǤ
-
-ۤȤɤΥ֥ḁ̊ơޤɽ뤳ȤǽǤ֥åǡڡפȻꤷƤ̤ˤɽޤALTSYS⥸塼Фɽꤵ줿֥åɽޤ̤ˤ̤ˤɽ֥åǤСڡפȡALTSYSפCTRL+åξƤ
-
-̤ǤΥϥޥ뤿ˡ̤ˤϤʤ餺˥塼֥åɽޤŪɽƤʤ硢֥åΰ־˶ޤɽꤵƤСΤޤɽޤ
-
-
-˥塼
-
-0.4顢ִ˥塼ץ֥åaltsysˤĤޤ֥å顢ALTSYS⥸塼Фɽꤹ뤳Ȥǡ˥֥åɽޤϡ̥ơޤͭˤʤäƤΤߤǤ
-
-XOOPS2.0.x ˤơ̤̾ѤƤʴ̥ơޤѤƤʤˡaltsysΡִѥ˥塼νפ̣ޤƤߤƤˤäƤ⤷̤ʤäʤ顢cache/adminmenu.php ȤեƤ顢餿ƴ̤줷ޤʳǧ̤ǡ֤ϤפƤ
-
-
-ե륪С饤
-
-0.5ե륪С饤ɵǽaltsysˤĤޤ顢⥸塼->->եǡɬפʬǤ
-
-줬ͭˤʤʤ¿դɬפǤ
-
-D3LanguageManagerб⥸塼ǤС̵ͭ˵ǽޤʳΥ⥸塼ˤĤƤϡСˤޤ
-
-XoopsCube Legacy2.1ǤкǤñǤźդpreloadͭˤǤǰŪʥ⥸塼ϽǽǤ
-
-XOOPS2ˤĤơεǽͭˤ뤿ˤϡHackɬפˤʤäƤޤޤեζɹˤʤ뤿ᡢŪϡɥ⤯ޤꤪᤷޤʤ⤳ǤϽޤ
-
-[/xlang:ja]
diff --git a/xoops_trust_path/libs/altsys/TODO b/xoops_trust_path/libs/altsys/TODO
deleted file mode 100644
index 6aa3751..0000000
--- a/xoops_trust_path/libs/altsys/TODO
+++ /dev/null
@@ -1,37 +0,0 @@
-x myblocksadmin ΰ̤
-x xoops 2.2 б
-x ѡߥåǧ (äget_ put_ compilehook)
-x ֥åΥ˥塼
-x autoupdate_from_module.inc.php μ
-x Υå
-x system⥸塼ʸäƤ
-x optionsνå
-x argonˤȤäƤ餦:-)
-x ̥˥塼եå
-
-importing avaman
-hasMainʤ⥸塼Υ⥸塼륢
-2.0.14ʹߤɽɡˤ롩
-
-altsysΤθС饤ɥƥ
-Legacyʳglobal.phpԽ
-Legacyʳadmin.phpNotice̤˽Ф
-
-gzipžȴ̥ơޤȤΥХåƥĴ٤
-
-
-
-
-
-= Premissions =
-mypreferences -> module_admin of the module
-myblocksadmin -> module_admin of altsys (old XOOPS_SYSTEM_BLOCK)
-mytplsadmin,mytplsform -> module_admin of altsys (old XOOPS_SYSTEM_TPLSET)
-compilehookadmin,get_*,put_* -> module_admin of altsys
-mylangadmin -> module_admin of altsys
-
-
-= Pending =
-myblocksadmin edit "Visible In" for 2.2
-custom block preview for 2.2
-
diff --git a/xoops_trust_path/libs/altsys/admin_menu.php b/xoops_trust_path/libs/altsys/admin_menu.php
index 12e2f82..574b37a 100644
--- a/xoops_trust_path/libs/altsys/admin_menu.php
+++ b/xoops_trust_path/libs/altsys/admin_menu.php
@@ -1,48 +1,58 @@
_MI_ALTSYS_MENU_CUSTOMBLOCKS ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__' ,
- ) ,
- array(
- 'title' => _MI_ALTSYS_MENU_NEWCUSTOMBLOCK ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__&op=edit' ,
- 'show' => false ,
- ) ,
- array(
- 'title' => _MI_ALTSYS_MENU_MYBLOCKSADMIN ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' ,
- ) ,
- array(
- 'title' => _MI_ALTSYS_MENU_MYTPLSADMIN ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin' ,
- ) ,
- array(
- 'title' => _MI_ALTSYS_MENU_COMPILEHOOKADMIN ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=compilehookadmin' ,
- ) ,
- array(
- 'title' => _MI_ALTSYS_MENU_MYLANGADMIN ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mylangadmin' ,
- ) ,
-/* array(
- 'title' => _MI_ALTSYS_MENU_MYAVATAR ,
- 'link' => 'index.php?mode=admin&lib=altsys&page=myavatar' ,
- ) ,*/
-/* array(
- 'title' => _MI_ALTSYS_MENU_MYSMILEY ,
- 'link' => 'index.php?mode=admin&lib=altsys&page=mysmiley' ,
- ) ,*/
-) ;
+$adminmenu = [
+ [
+ 'title' => _MI_ALTSYS_MENU_CUSTOMBLOCKS,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__',
+ ],
+ [
+ 'title' => _MI_ALTSYS_MENU_NEWCUSTOMBLOCK,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__&op=edit',
+ 'show' => false,
+ ],
+ [
+ 'title' => _MI_ALTSYS_MENU_MYBLOCKSADMIN,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin',
+ ],
+ [
+ 'title' => _MI_ALTSYS_MENU_MYTPLSADMIN,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin',
+ ],
+ [
+ 'title' => _MI_ALTSYS_MENU_COMPILEHOOKADMIN,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=compilehookadmin',
+ ],
+ [
+ 'title' => _MI_ALTSYS_MENU_MYLANGADMIN,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mylangadmin',
+ ],
+ /* array(
+ 'title' => _MI_ALTSYS_MENU_MYAVATAR ,
+ 'link' => 'index.php?mode=admin&lib=altsys&page=myavatar' ,
+ ) ,*/
+ /* array(
+ 'title' => _MI_ALTSYS_MENU_MYSMILEY ,
-$adminmenu4altsys = array(
- array(
- 'title' => 'ALTSYS '._PREFERENCES ,
- 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' ,
- ) ,
-) ;
+ 'link' => 'index.php?mode=admin&lib=altsys&page=mysmiley' ,
+ ) ,*/
+];
+
+$adminmenu4altsys = [
+ [
+ 'title' => _PREFERENCES,
+ 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences',
+ ],
+];
diff --git a/xoops_trust_path/libs/altsys/blocks.php b/xoops_trust_path/libs/altsys/blocks.php
index d3a3721..ab6bb0d 100644
--- a/xoops_trust_path/libs/altsys/blocks.php
+++ b/xoops_trust_path/libs/altsys/blocks.php
@@ -1,21 +1,31 @@
getVar("mid") ;
+ if (is_object(@$GLOBALS['xoopsModule'])) {
+ $mid_selected = $GLOBALS['xoopsModule']->getVar('mid');
// for system->preferences
- if ($mid_selected == 1 && @$_GET["fct"] == "preferences" && @$_GET["op"] == "showmod" && ! empty($_GET["mod"])) {
- $mid_selected = intval($_GET["mod"]) ;
+ if (1 == $mid_selected && 'preferences' == @$_GET['fct'] && 'showmod' == @$_GET['op'] && !empty($_GET['mod'])) {
+ $mid_selected = (int)$_GET['mod'];
}
} else {
- $mid_selected = 0 ;
+ $mid_selected = 0;
}
$db =& XoopsDatabaseFactory::getDatabaseConnection();
+
(method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance();
$module_handler =& xoops_gethandler('module');
+
$current_module =& $module_handler->getByDirname($mydirname);
+
$config_handler =& xoops_gethandler('config');
- $current_configs = $config_handler->getConfigList($current_module->mid()) ;
+
+ $current_configs = $config_handler->getConfigList($current_module->mid());
+
$moduleperm_handler =& xoops_gethandler('groupperm');
+
$admin_mids = $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups());
- $modules = $module_handler->getObjects(new Criteria('mid', '('.implode(',', $admin_mids) . ')', 'IN'), true) ;
- $block = array(
- 'mydirname' => $mydirname ,
- 'mod_url' => XOOPS_URL.'/modules/'.$mydirname ,
- 'mod_imageurl' => XOOPS_URL.'/modules/'.$mydirname.'/'.$current_configs['images_dir'] ,
- 'mod_config' => $current_configs ,
- ) ;
+ $modules = $module_handler->getObjects(new Criteria('mid', '(' . implode(',', $admin_mids) . ')', 'IN'), true);
+
+ $block = [
+ 'mydirname' => $mydirname,
+ 'mod_url' => XOOPS_URL . '/modules/' . $mydirname,
+ 'mod_imageurl' => XOOPS_URL . '/modules/' . $mydirname . '/' . $current_configs['images_dir'],
+ 'mod_config' => $current_configs,
+ ];
foreach ($modules as $mod) {
- $mid = intval($mod->getVar('mid')) ;
- $dirname = $mod->getVar('dirname') ;
- $modinfo = $mod->getInfo() ;
- $submenus4assign = array() ;
- $adminmenu = array() ;
- $adminmenu4altsys = array() ;
- unset($adminmenu_use_altsys) ;
- @include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/'.@$modinfo['adminmenu'] ;
+
+ $mid = (int)$mod->getVar('mid');
+
+ $dirname = $mod->getVar('dirname');
+
+ $modinfo = $mod->getInfo();
+
+ $submenus4assign = [];
+
+ $adminmenu = [];
+
+ $adminmenu4altsys = [];
+
+ unset($adminmenu_use_altsys);
+
+ @include XOOPS_ROOT_PATH . '/modules/' . $dirname . '/' . @$modinfo['adminmenu'];
// from admin_menu.php etc.
- $adminmenu = array_merge($adminmenu, $adminmenu4altsys) ;
+
+ $adminmenu = array_merge($adminmenu, $adminmenu4altsys);
+
foreach ($adminmenu as $sub) {
- $link = empty($sub['altsys_link']) ? $sub['link'] : $sub['altsys_link'] ;
- if (isset($sub['show']) && $sub['show'] === false) {
- continue ;
+ $link = empty($sub['altsys_link']) ? $sub['link'] : $sub['altsys_link'];
+ if (isset($sub['show']) && false === $sub['show']) {
+ continue;
}
- $submenus4assign[] = array(
- 'title' => $myts->makeTboxData4Show($sub['title']) ,
- 'url' => XOOPS_URL.'/modules/'.$dirname.'/'.htmlspecialchars($link, ENT_QUOTES) ,
- ) ;
+ $submenus4assign[] = [
+ 'title' => $myts->makeTboxData4Show($sub['title']),
+ 'url' => XOOPS_URL . '/modules/' . $dirname . '/' . htmlspecialchars($link, ENT_QUOTES),
+ ];
}
// for modules overriding Module.class.php (eg. Analyzer for XC)
- if (empty($submenus4assign) && defined('XOOPS_CUBE_LEGACY') && ! empty($modinfo['cube_style'])) {
+ if (empty($submenus4assign) && defined('XOOPS_CUBE_LEGACY') && !empty($modinfo['cube_style'])) {
+
$module_handler =& xoops_gethandler('module');
+
$module =& $module_handler->get($mid);
+
$moduleObj =& Legacy_Utils::createModule($module);
- $modinfo['adminindex'] = $moduleObj->getAdminIndex() ;
- $modinfo['adminindex_absolute'] = true ;
+
+ $modinfo['adminindex'] = $moduleObj->getAdminIndex();
+
+ $modinfo['adminindex_absolute'] = true;
+
foreach ($moduleObj->getAdminMenu() as $sub) {
- if (@$sub['show'] === false) {
- continue ;
+ if (false === @$sub['show']) {
+ continue;
}
- $submenus4assign[] = array(
- 'title' => $myts->makeTboxData4Show($sub['title']) ,
- 'url' => strncmp($sub['link'], 'http', 4) === 0 ? htmlspecialchars($sub['link'], ENT_QUOTES) : XOOPS_URL.'/modules/'.$dirname.'/'.htmlspecialchars($sub['link'], ENT_QUOTES) ,
- ) ;
+ $submenus4assign[] = [
+ 'title' => $myts->makeTboxData4Show($sub['title']),
+ 'url' => 0 === strncmp($sub['link'], 'http', 4) ? htmlspecialchars($sub['link'], ENT_QUOTES) : XOOPS_URL . '/modules/' . $dirname . '/' . htmlspecialchars($sub['link'], ENT_QUOTES),
+ ];
}
} elseif (empty($adminmenu4altsys)) {
// add preferences
- if ($mod->getVar('hasconfig') && ! in_array($mod->getVar('dirname'), array( 'system', 'legacy' ))) {
- $submenus4assign[] = array(
- 'title' => _PREFERENCES ,
- 'url' => htmlspecialchars(altsys_get_link2modpreferences($mid, $coretype), ENT_QUOTES) ,
- ) ;
+ if ($mod->getVar('hasconfig') && !in_array($mod->getVar('dirname'), ['system', 'legacy'])) {
+ $submenus4assign[] = [
+ 'title' => _PREFERENCES,
+ 'url' => htmlspecialchars(altsys_get_link2modpreferences($mid, $coretype), ENT_QUOTES),
+ ];
}
// add help
- if (defined('XOOPS_CUBE_LEGACY') && ! empty($modinfo['help'])) {
- $submenus4assign[] = array(
- 'title' => _HELP ,
- 'url' => XOOPS_URL.'/modules/legacy/admin/index.php?action=Help&dirname='.$dirname ,
- ) ;
+ if (defined('XOOPS_CUBE_LEGACY') && !empty($modinfo['help'])) {
+ $submenus4assign[] = [
+ 'title' => _HELP,
+ 'url' => XOOPS_URL . '/modules/legacy/admin/index.php?action=Help&dirname=' . $dirname,
+ ];
}
}
- $module4assign = array(
- 'mid' => $mid ,
- 'dirname' => $dirname ,
- 'name' => $mod->getVar('name') ,
- 'version_in_db' => sprintf('%.2f', $mod->getVar('version') / 100.0) ,
- 'version_in_file' => sprintf('%.2f', $modinfo['version']) ,
- 'description' => htmlspecialchars(@$modinfo['description'], ENT_QUOTES) ,
- 'image' => htmlspecialchars($modinfo['image'], ENT_QUOTES) ,
- 'isactive' => $mod->getVar('isactive') ,
- 'hasmain' => $mod->getVar('hasmain') ,
- 'hasadmin' => $mod->getVar('hasadmin') ,
- 'hasconfig' => $mod->getVar('hasconfig') ,
- 'weight' => $mod->getVar('weight') ,
- 'adminindex' => htmlspecialchars(@$modinfo['adminindex'], ENT_QUOTES) ,
- 'adminindex_absolute' => @$modinfo['adminindex_absolute'] ,
- 'submenu' => $submenus4assign ,
- 'selected' => $mid == $mid_selected ? true : false ,
- 'dot_suffix' => $mid == $mid_selected ? 'selected_opened' : 'closed' ,
- ) ;
- $block['modules'][] = $module4assign ;
+ $module4assign = [
+ 'mid' => $mid,
+ 'dirname' => $dirname,
+ 'name' => $mod->getVar('name'),
+ 'version_in_db' => sprintf('%.2f', $mod->getVar('version') / 100.0),
+ 'version_in_file' => sprintf('%.2f', $modinfo['version']),
+ 'description' => htmlspecialchars(@$modinfo['description'], ENT_QUOTES),
+ 'image' => htmlspecialchars($modinfo['image'], ENT_QUOTES),
+ 'isactive' => $mod->getVar('isactive'),
+ 'hasmain' => $mod->getVar('hasmain'),
+ 'hasadmin' => $mod->getVar('hasadmin'),
+ 'hasconfig' => $mod->getVar('hasconfig'),
+ 'weight' => $mod->getVar('weight'),
+ 'adminindex' => htmlspecialchars(@$modinfo['adminindex'], ENT_QUOTES),
+ 'adminindex_absolute' => @$modinfo['adminindex_absolute'],
+ 'submenu' => $submenus4assign,
+ 'selected' => $mid == $mid_selected ? true : false,
+ 'dot_suffix' => $mid == $mid_selected ? 'selected_opened' : 'closed',
+ ];
+ $block['modules'][] = $module4assign;
}
- require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
- $tpl = new D3Tpl() ;
- $tpl->assign('block', $block) ;
- $ret['content'] = $tpl->fetch($this_template) ;
- return $ret ;
+ require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
+
+ $tpl = new D3Tpl();
+
+ $tpl->assign('block', $block);
+
+ $ret['content'] = $tpl->fetch($this_template);
+
+ return $ret;
}
function b_altsys_admin_menu_edit($options)
{
- $mydirname = empty($options[0]) ? 'd3forum' : $options[0] ;
- $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]) ;
+ $mydirname = empty($options[0]) ? 'd3forum' : $options[0];
+
+ $this_template = empty($options[1]) ? 'db:' . $mydirname . '_block_admin_menu.html' : trim($options[1]);
if (preg_match('/[^0-9a-zA-Z_-]/', $mydirname)) {
- die('Invalid mydirname') ;
+ die('Invalid mydirname');
}
$form = "
-
- :
-
-
- \n" ;
+
+ :
+
+
+ \n";
return $form;
}
diff --git a/xoops_trust_path/libs/altsys/class/AltsysBreadcrumbs.class.php b/xoops_trust_path/libs/altsys/class/AltsysBreadcrumbs.class.php
index 5ee6b4a..3e5cfa2 100644
--- a/xoops_trust_path/libs/altsys/class/AltsysBreadcrumbs.class.php
+++ b/xoops_trust_path/libs/altsys/class/AltsysBreadcrumbs.class.php
@@ -1,62 +1,94 @@
paths as $val) {
// delayed language constant
- if (substr($val['name'], 0, 1) == '_' && defined($val['name'])) {
- $ret[] = array(
- 'url' => $val['url'] ,
- 'name' => constant($val['name']) ,
- ) ;
- } else {
- $ret[] = $val ;
- }
+
+ if ('_' == mb_substr($val['name'], 0, 1) && defined($val['name'])) {
+ $ret[] = [
+ 'url' => $val['url'],
+ 'name' => constant($val['name']),
+ ];
+ } else {
+ $ret[] = $val;
+ }
}
- unset($ret[ sizeof($ret) - 1 ]['url']) ;
- return $ret ;
+
+ unset($ret[count($ret) - 1]['url']);
+
+ return $ret;
}
-// all data should be escaped
-public function appendPath($url_or_path, $name = '...')
-{
- if (is_array($url_or_path)) {
- if (empty($url_or_path['name'])) {
- // multiple paths
- $this->paths = array_merge($this->paths, $url_or_path) ;
+ /**
+ * all data should be escaped
+ * @param $url_or_path
+ * @param string $name
+ */
+ public function appendPath($url_or_path, string $name = '...')
+ {
+ if (is_array($url_or_path)) {
+ if (empty($url_or_path['name'])) {
+ // multiple paths
+
+ $this->paths = array_merge($this->paths, $url_or_path);
+ } else {
+ // array format (just a path)
+
+ $this->paths[] = $url_or_path;
+ }
} else {
- // array format (just a path)
- $this->paths[] = $url_or_path ;
+ // separate format
+ $this->paths[] = ['url' => $url_or_path, 'name' => $name];
}
- } else {
- // separate format
- $this->paths[] = array( 'url' => $url_or_path , 'name' => $name ) ;
}
-}
- public function hasPaths()
+ /**
+ * @return bool
+ */
+ public function hasPaths(): bool
{
- return ! empty($this->paths) ;
+ return !empty($this->paths);
}
}
diff --git a/xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php b/xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php
index c0e5e55..89ec5c3 100644
--- a/xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php
+++ b/xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php
@@ -1,113 +1,153 @@
language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']) ;
- $this->salt = substr(md5(XOOPS_ROOT_PATH . XOOPS_DB_USER . XOOPS_DB_PREFIX), 0, 6) ;
- $this->cache_path = XOOPS_TRUST_PATH.'/cache' ;
+ public $cache_path;
- if (defined('ALTSYS_MYLANGUAGE_ROOT_PATH') && file_exists(ALTSYS_MYLANGUAGE_ROOT_PATH)) {
- $this->my_language = ALTSYS_MYLANGUAGE_ROOT_PATH ;
- }
-}
-//HACK by domifara for php5.3+
-//function &getInstance( $conn = null )
-public static function &getInstance($conn = null)
-{
- static $instance ;
- if (! isset($instance)) {
- $instance = new D3LanguageManager() ;
+ public $cache_prefix = 'lang';
+
+ public $my_language = false;
+
+
+ /**
+ * D3LanguageManager constructor.
+ */
+ public function __construct()
+ {
+ $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']);
+
+ $this->salt = mb_substr(md5(XOOPS_ROOT_PATH . XOOPS_DB_USER . XOOPS_DB_PREFIX), 0, 6);
+
+ $this->cache_path = XOOPS_TRUST_PATH . '/cache';
+
+ if (defined('ALTSYS_MYLANGUAGE_ROOT_PATH') && file_exists(ALTSYS_MYLANGUAGE_ROOT_PATH)) {
+ $this->my_language = ALTSYS_MYLANGUAGE_ROOT_PATH;
+ }
}
- return $instance ;
-}
- public function read($resource, $mydirname, $mytrustdirname = null, $read_once = true)
+ /**
+ * @param null $conn
+ * @return \D3LanguageManager
+ */
+ public static function getInstance($conn = null)
+ {
+ static $instance;
+
+ if (!isset($instance)) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /**
+ * @param $resource
+ * @param $mydirname
+ * @param null $mytrustdirname
+ * @param bool $read_once
+ */
+ public function read($resource, $mydirname, $mytrustdirname = null, bool $read_once = true)
{
- $d3file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php' ;
+ $d3file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/mytrustdirname.php';
- if (empty($mytrustdirname) && file_exists($d3file)) {
- require $d3file ;
+ if (empty($mytrustdirname) && is_file($d3file)) {
+ require $d3file;
}
if (empty($this->language)) {
- $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']) ;
+ $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']);
}
- $cache_file = $this->getCacheFileName($resource, $mydirname) ;
- $root_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->language.'/'.$resource ;
+ $cache_file = $this->getCacheFileName($resource, $mydirname);
+
+ $root_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->language . '/' . $resource;
- // language overriding by XOOPS_ROOT_PATH/my_language
- if ($this->my_language) {
- $mylang_file = $this->my_language.'/modules/'.$mydirname.'/'.$this->language.'/'.$resource ;
- if (file_exists($mylang_file)) {
- require_once $mylang_file ;
+ // language overriding by XOOPS_ROOT_PATH/my_language
+ if ($this->my_language) {
+ $mylang_file = $this->my_language . '/modules/' . $mydirname . '/' . $this->language . '/' . $resource;
+
+ if (is_file($mylang_file)) {
+ require_once $mylang_file;
+ }
+
+ $original_error_level = error_reporting();
+
+ error_reporting($original_error_level & ~E_NOTICE);
}
- $original_error_level = error_reporting() ;
- error_reporting($original_error_level & ~ E_NOTICE) ;
- }
if (empty($mytrustdirname)) {
// conventional module
- $default_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->default_language.'/'.$resource ;
+ $default_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->default_language . '/' . $resource;
- if (file_exists($cache_file)) {
- require_once $cache_file ;
- } elseif (file_exists($root_file)) {
- require_once $root_file ;
- } elseif (file_exists($default_file)) {
+ if (is_file($cache_file)) {
+ require_once $cache_file;
+ } elseif (is_file($root_file)) {
+ require_once $root_file;
+ } elseif (is_file($default_file)) {
// fall back english
- require_once $default_file ;
+
+ require_once $default_file;
}
} else {
// D3 modules
- $trust_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->language.'/'.$resource ;
- $default_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->default_language.'/'.$resource ;
-
- if (file_exists($cache_file)) {
- require_once $cache_file ;
- } elseif (file_exists($root_file)) {
- require_once $root_file ;
- } elseif (file_exists($trust_file)) {
+ $trust_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->language . '/' . $resource;
+
+ $default_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->default_language . '/' . $resource;
+
+ if (is_file($cache_file)) {
+ require_once $cache_file;
+ } elseif (is_file($root_file)) {
+ require_once $root_file;
+ } elseif (is_file($trust_file)) {
if ($read_once) {
- require_once $trust_file ;
+ require_once $trust_file;
} else {
- require $trust_file ;
+ require $trust_file;
+ }
+ } elseif (is_file($default_file)) {
+ // fall back to english
+ if ($read_once) {
+ require_once $default_file;
+ } else {
+ require $default_file;
}
- } elseif (file_exists($default_file)) {
- // fall back english
- if ($read_once) {
- require_once $default_file ;
- } else {
- require $default_file ;
- }
}
}
if ($this->my_language) {
- error_reporting($original_error_level) ;
+ error_reporting($original_error_level);
}
}
-
+ /**
+ * @param $resource
+ * @param $mydirname
+ * @param null $language
+ * @return string
+ */
public function getCacheFileName($resource, $mydirname, $language = null)
{
if (empty($language)) {
- $language = $this->language ;
+ $language = $this->language;
}
- return $this->cache_path . '/' . $this->cache_prefix . '_' . $this->salt . '_' . $mydirname . '_' . $language . '_' . $resource ;
+
+ return $this->cache_path . '/' . $this->cache_prefix . '_' . $this->salt . '_' . $mydirname . '_' . $language . '_' . $resource;
}
}
diff --git a/xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php b/xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php
index 49ab743..01564fa 100644
--- a/xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php
+++ b/xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php
@@ -1,62 +1,145 @@
getByDirname($mydirname) ;
+ $module_handler =& xoops_gethandler('module');
+
+ $module =& $module_handler->getByDirname($mydirname);
+
+ $notification_handler = xoops_gethandler('notification');
+
+ $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname);
+
+ // calling a delegate before
+ if (class_exists('XCube_DelegateUtils')) {
+ $force_return = false;
+
+ //Gigamaster fixed deprecated XCube_DelegateUtils::raiseEvent(). Use call()
+ XCube_DelegateUtils::call(
+ 'D3NotificationHandler.Trigger',
+ new XCube_Ref($category),
+ new XCube_Ref($event),
+ new XCube_Ref($item_id),
+ new XCube_Ref($extra_tags),
+ new XCube_Ref($module),
+ new XCube_Ref($user_list),
+ new XCube_Ref($omit_user_id),
+ $module->getInfo('notification'),
+ new XCube_Ref($force_return),
+ new XCube_Ref($mail_template_dir),
+ $mydirname,
+ $mytrustdirname
+ );
+
+ if ($force_return) {
+ return;
+ }
+ }
+
+ $mid = $module->getVar('mid');
+
+ // Check if event is enabled
+
+ $configHandler =& xoops_getHandler('config');
- $notification_handler =& xoops_gethandler('notification') ;
- $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname) ;
+ $mod_config =& $configHandler->getConfigsByCat(0, $mid);
// calling a delegate before
if (class_exists('XCube_DelegateUtils')) {
- $force_return = false ;
- XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname) ;
+
+ //Gigamaster fixed deprecated XCube_DelegateUtils::raiseEvent(). Use call()
+ XCube_DelegateUtils::call(
+ 'D3NotificationHandler.Trigger',
+ new XCube_Ref($category),
+ new XCube_Ref($event),
+ new XCube_Ref($item_id),
+ new XCube_Ref($extra_tags),
+ new XCube_Ref($module),
+ new XCube_Ref($user_list),
+ new XCube_Ref($omit_user_id),
+ $module->getInfo('notification'),
+ new XCube_Ref($force_return),
+ new XCube_Ref($mail_template_dir),
+ $mydirname,
+ $mytrustdirname) ;
if ($force_return) {
return ;
}
@@ -85,24 +168,29 @@ public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $
}
}
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('not_modid', intval($mid)));
+ $criteria->add(new Criteria('not_modid', (int)$mid));
$criteria->add(new Criteria('not_category', $category));
- $criteria->add(new Criteria('not_itemid', intval($item_id)));
+ $criteria->add(new Criteria('not_itemid', (int)$item_id));
$criteria->add(new Criteria('not_event', $event));
$mode_criteria = new CriteriaCompo();
$mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDALWAYS), 'OR');
$mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE), 'OR');
$mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT), 'OR');
$criteria->add($mode_criteria);
- $notifications =& $notification_handler->getObjects($criteria);
+
+ $notifications = &$notification_handler->getObjects($criteria);
+
if (empty($notifications)) {
return;
}
- // Add some tag substitutions here
- $tags = array();
- // {X_ITEM_NAME} {X_ITEM_URL} {X_ITEM_TYPE} from lookup_func are disabled
- $tags['X_MODULE'] = $module->getVar('name', 'n');
+ // Add some tag substitutions here
+
+ $tags = [];
+
+ // {X_ITEM_NAME} {X_ITEM_URL} {X_ITEM_TYPE} from lookup_func are disabled
+ $tags['X_MODULE'] = $module->getVar('name', 'n');
+
$tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/';
$tags['X_NOTIFY_CATEGORY'] = $category;
$tags['X_NOTIFY_EVENT'] = $event;
@@ -116,12 +204,14 @@ public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $
foreach ($notifications as $notification) {
$send_uid = $notification->getVar('not_uid');
if ((empty($omit_user_id) || $send_uid != $omit_user_id)
- &&
- (!$user_list || isset($user_list[$send_uid]))) {
+ && (!$user_list || isset($user_list[$send_uid]))) {
// user-specific tags
- //$tags['X_UNSUBSCRIBE_URL'] = 'TODO';
- // TODO: don't show unsubscribe link if it is 'one-time' ??
- $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
+ // $tags['X_UNSUBSCRIBE_URL'] = 'TODO';
+
+ // TODO: don't show unsubscribe link if it is 'one-time' ??
+
+ $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
+
$tags = array_merge($tags, $extra_tags);
$notification->notifyUser($mail_template_dir, $template, $subject, $tags);
diff --git a/xoops_trust_path/libs/altsys/class/D3Tpl.class.php b/xoops_trust_path/libs/altsys/class/D3Tpl.class.php
index 24ce380..35a1339 100644
--- a/xoops_trust_path/libs/altsys/class/D3Tpl.class.php
+++ b/xoops_trust_path/libs/altsys/class/D3Tpl.class.php
@@ -1,22 +1,30 @@
plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins') ;
- }
// for RTL users
- @define('_GLOBAL_LEFT', @_ADM_USE_RTL == 1 ? 'right' : 'left') ;
- @define('_GLOBAL_RIGHT', @_ADM_USE_RTL == 1 ? 'left' : 'right') ;
+ @define('_GLOBAL_LEFT', 1 == @_ADM_USE_RTL ? 'right' : 'left') ;
+ @define('_GLOBAL_RIGHT', 1 == @_ADM_USE_RTL ? 'left' : 'right') ;
}
}
diff --git a/xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php b/xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php
index 55fbb8a..e602a56 100644
--- a/xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php
+++ b/xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php
@@ -1,1073 +1,1200 @@
db =& XoopsDatabaseFactory::getDatabaseConnection() ;
- $this->lang = @$GLOBALS['xoopsConfig']['language'] ;
-
- $this->cachetime_options = array(
- 0 => _NOCACHE ,
- 30 => sprintf(_SECONDS, 30) ,
- 60 => _MINUTE ,
- 300 => sprintf(_MINUTES, 5) ,
- 1800 => sprintf(_MINUTES, 30) ,
- 3600 => _HOUR ,
- 18000 => sprintf(_HOURS, 5) ,
- 86400 => _DAY ,
- 259200 => sprintf(_DAYS, 3) ,
- 604800 => _WEEK ,
- 2592000 => _MONTH ,
- );
-
- $this->ctype_options = array(
- 'H' => _MD_A_MYBLOCKSADMIN_CTYPE_HTML ,
- 'T' => _MD_A_MYBLOCKSADMIN_CTYPE_NOSMILE ,
- 'S' => _MD_A_MYBLOCKSADMIN_CTYPE_SMILE ,
- 'P' => _MD_A_MYBLOCKSADMIN_CTYPE_PHP ,
- ) ;
-
- $this->type_options = array(
- 'C' => 'custom block' ,
- 'E' => 'cloned custom block' ,
- 'M' => 'module\'s block' ,
- 'D' => 'cloned module\'s block' ,
- 'S' => 'system block' ,
- ) ;
- }
-
-//HACK by domifara for php5.3+
-//function &getInstance()
-public static function &getInstance()
-{
- static $instance;
- if (!isset($instance)) {
- $instance = new MyBlocksAdmin() ;
- $instance->construct() ;
- }
- return $instance;
-}
+/**
+ * Altsys library (UI-Components) for D3 modules
+ * Class MyBlocksAdmin
+ * @package Altsys
+ * @version XCL 2.3.1
+ * @author Other authors Gigamaster, 2020 XCL PHP7
+ * @author Gijoe (Peak)
+ * @copyright (c) 2005-2022 Author
+ * @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
+ */
-// virtual
-public function checkPermission()
-{
- // only groups have 'module_admin' of 'altsys' can do that.
- $module_handler =& xoops_gethandler('module') ;
- $module =& $module_handler->getByDirname('altsys') ;
- $moduleperm_handler =& xoops_gethandler('groupperm') ;
- if (! is_object(@$GLOBALS['xoopsUser']) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $GLOBALS['xoopsUser']->getGroups())) {
- die('only admin of altsys can access this area') ;
- }
-}
+class MyBlocksAdmin {
+ public $db;
+ public $lang;
- public function init($xoopsModule)
- {
- // altsys "module" MODE
- if ($xoopsModule->getVar('dirname') == 'altsys') {
- // set target_module if specified by $_GET['dirname']
- $module_handler =& xoops_gethandler('module');
- if (! empty($_GET['dirname'])) {
- $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', $_GET['dirname']) ;
- $target_module =& $module_handler->getByDirname($dirname) ;
- }
-
- if (is_object(@$target_module)) {
- // module's blocks
- $this->target_mid = $target_module->getVar('mid') ;
- $this->target_mname = $target_module->getVar('name') . " " . sprintf("(%2.2f)", $target_module->getVar('version') / 100.0) ;
- $this->target_dirname = $target_module->getVar('dirname') ;
- $modinfo = $target_module->getInfo() ;
- // breadcrumbs
- $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
- $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN') ;
- $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$this->target_dirname, $this->target_mname) ;
- } else {
- // custom blocks
- $this->target_mid = 0 ;
- $this->target_mname = _MI_ALTSYS_MENU_CUSTOMBLOCKS ;
- $this->target_dirname = '__CustomBlocks__' ;
- // breadcrumbs
- $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
- $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN') ;
- $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$this->target_dirname, '_MI_ALTSYS_MENU_CUSTOMBLOCKS') ;
- }
- } else {
- // myblocksadmin as a library
- $this->target_mid = $xoopsModule->getVar('mid') ;
- $this->target_mname = $xoopsModule->getVar('name') . " " . sprintf("(%2.2f)", $xoopsModule->getVar('version') / 100.0) ;
- $this->target_dirname = $xoopsModule->getVar('dirname') ;
- $mod_url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname') ;
- $modinfo = $xoopsModule->getInfo() ;
- $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
- $breadcrumbsObj->appendPath($mod_url.'/'.@$modinfo['adminindex'], $this->target_mname) ;
- $breadcrumbsObj->appendPath($mod_url.'/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', _MD_A_MYBLOCKSADMIN_BLOCKADMIN) ;
- }
-
- // read xoops_version.php of the target
- $this->block_configs = $this->get_block_configs() ;
- }
-
-
-// virtual
-public function canEdit($block)
-{
- return true ;
-}
+ public $cachetime_options = [];
+ public $ctype_options = [];
-// virtual
-public function canDelete($block)
-{
- // can delete if it is a cloned block
- if ($block->getVar("block_type") == 'D' || $block->getVar("block_type") == 'C') {
- return true ;
- } else {
- return false ;
- }
-}
+ public $type_options = [];
+ public $target_mid = 0;
-// virtual
-// ret 0 : cannot
-// ret 1 : forced by altsys or system
-// ret 2 : can_clone
-public function canClone($block)
-{
- // can clone link if it is marked as cloneable block
- if ($block->getVar("block_type") == 'D' || $block->getVar("block_type") == 'C') {
- return 2 ;
- } else {
- // $modversion['blocks'][n]['can_clone']
- foreach ($this->block_configs as $bconf) {
- if ($block->getVar("show_func") == @$bconf['show_func'] && $block->getVar("func_file") == @$bconf['file'] && (empty($bconf['template']) || $block->getVar("template") == @$bconf['template'])) {
- if (! empty($bconf['can_clone'])) {
- return 2 ;
- }
- }
- }
- }
-
- if (! empty($GLOBALS['altsysModuleConfig']['enable_force_clone'])) {
- return 1 ;
- }
-
- return 0 ;
-}
+ public $target_dirname = '';
+ public $target_mname = '';
-// virtual
-// options
-public function renderCell4BlockOptions($block_data)
-{
- $bid = intval($block_data['bid']) ;
-
-//HACK by domifara
- if (defined('XOOPS_CUBE_LEGACY')) {
- $handler =& xoops_gethandler('block');
- $block =& $handler->create(false) ;
- $block->load($bid) ;
- } else {
- $block = new XoopsBlock($bid) ;
- }
- return $block->getOptions() ;
-}
+ public $block_configs = [];
+ public $preview_request = [];
-// virtual
-// link blocks - modules
-public function renderCell4BlockModuleLink($block_data)
-{
- $bid = intval($block_data['bid']) ;
-
- // get selected targets
- if (is_array(@$block_data['bmodule'])) {
- // bmodule origined from request (preview etc.)
- $selected_mids = $block_data['bmodule'] ;
- } else {
- // origined from the table of `block_module_link`
- $result = $this->db->query("SELECT module_id FROM ".$this->db->prefix('block_module_link')." WHERE block_id='$bid'") ;
- $selected_mids = array();
- while (list($selected_mid) = $this->db->fetchRow($result)) {
- $selected_mids[] = intval($selected_mid) ;
- }
- if (empty($selected_mids)) {
- $selected_mids = array( 0 ) ;
- } // all pages
- }
-
- // get all targets
- $module_handler =& xoops_gethandler('module');
- $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
- $criteria->add(new Criteria('isactive', 1));
- $module_list = $module_handler->getList($criteria);
- $module_list= array( -1 => _MD_A_MYBLOCKSADMIN_TOPPAGE , 0 => _MD_A_MYBLOCKSADMIN_ALLPAGES ) + $module_list ;
-
- // build options
- $module_options = '' ;
- foreach ($module_list as $mid => $mname) {
- $mname = htmlspecialchars($mname) ;
- if (in_array($mid, $selected_mids)) {
- $module_options .= "\n" ;
- } else {
- $module_options .= "\n" ;
- }
- }
-
- $ret = "
- " ;
+ public function MyBlocksAadmin() {
+ }
- return $ret ;
-}
+ public function construct() {
+ $this->db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $this->lang = @$GLOBALS['xoopsConfig']['language'];
-// virtual
-// group_permission - 'block_read'
-public function renderCell4BlockReadGroupPerm($block_data)
-{
- $bid = intval($block_data['bid']) ;
-
- // get selected targets
- if (is_array(@$block_data['bgroup'])) {
- // bgroup origined from request (preview etc.)
- $selected_gids = $block_data['bgroup'] ;
- } else {
- // origined from the table of `group_perm`
- $result = $this->db->query("SELECT gperm_groupid FROM ".$this->db->prefix('group_permission')." WHERE gperm_itemid='$bid' AND gperm_name='block_read'") ;
- $selected_gids = array();
- while (list($selected_gid) = $this->db->fetchRow($result)) {
- $selected_gids[] = intval($selected_gid) ;
- }
- if ($bid == 0 && empty($selected_gids)) {
- $selected_gids = $GLOBALS['xoopsUser']->getGroups() ;
- }
- }
-
- // get all targets
- $group_handler =& xoops_gethandler('group');
- $groups = $group_handler->getObjects() ;
-
- // build options
- $group_options = '' ;
- foreach ($groups as $group) {
- $gid = $group->getVar('groupid') ;
- $gname = $group->getVar('name', 's') ;
- if (in_array($gid, $selected_gids)) {
- $group_options .= "\n" ;
- } else {
- $group_options .= "\n" ;
- }
- }
-
- $ret = "
- " ;
+ $this->cachetime_options = [
+ 0 => _NOCACHE,
+ 30 => sprintf( _SECONDS, 30 ),
+ 60 => _MINUTE,
+ 300 => sprintf( _MINUTES, 5 ),
+ 1800 => sprintf( _MINUTES, 30 ),
+ 3600 => _HOUR,
+ 18000 => sprintf( _HOURS, 5 ),
+ 86400 => _DAY,
+ 259200 => sprintf( _DAYS, 3 ),
+ 604800 => _WEEK,
+ 2592000 => _MONTH,
+ ];
- return $ret ;
-}
+ $this->ctype_options = [
+ 'H' => _MD_A_MYBLOCKSADMIN_CTYPE_HTML,
+ 'T' => _MD_A_MYBLOCKSADMIN_CTYPE_NOSMILE,
+ 'S' => _MD_A_MYBLOCKSADMIN_CTYPE_SMILE,
+ 'P' => _MD_A_MYBLOCKSADMIN_CTYPE_PHP,
+ ];
+ $this->type_options = [
+ 'C' => 'custom block',
+ 'E' => 'cloned custom block',
+ 'M' => 'module\'s block',
+ 'D' => 'cloned module\'s block',
+ 'S' => 'system block',
+ ];
+ }
-// virtual
-// visible and side
-public function renderCell4BlockPosition($block_data)
-{
- $bid = intval($block_data['bid']) ;
- $side = intval($block_data['side']) ;
- $visible = intval($block_data['visible']) ;
-
- $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = "";
- $scoln = $scol0 = $scol1 = $scol2 = $scol3 = $scol4 = "unselected";
- $stextbox = "unselected" ;
- $value4extra_side = '' ;
-
- if ($visible != 1) {
- $sseln = " checked='checked'";
- $scoln = "disabled";
- } else {
- switch ($side) {
- case XOOPS_SIDEBLOCK_LEFT :
- $ssel0 = " checked='checked'";
- $scol0 = "selected";
- break ;
- case XOOPS_SIDEBLOCK_RIGHT :
- $ssel1 = " checked='checked'";
- $scol1 = "selected";
- break ;
- case XOOPS_CENTERBLOCK_LEFT :
- $ssel2 = " checked='checked'";
- $scol2 = "selected";
- break ;
- case XOOPS_CENTERBLOCK_RIGHT :
- $ssel4 = " checked='checked'";
- $scol4 = "selected";
- break ;
- case XOOPS_CENTERBLOCK_CENTER :
- $ssel3 = " checked='checked'";
- $scol3 = "selected";
- break ;
- default :
- $value4extra_side = $side ;
- $stextbox = "selected" ;
- break ;
- }
- }
-
- return "
-
".$this->renderRadio4BlockPosition(1, $block_data)." | -".$this->renderRadio4BlockPosition(3, $block_data)." | -".$this->renderRadio4BlockPosition(4, $block_data)." | -".$this->renderRadio4BlockPosition(5, $block_data)." | -".$this->renderRadio4BlockPosition(2, $block_data)." | -
".$this->renderRadio4BlockPosition(6, $block_data)." | -".$this->renderRadio4BlockPosition(7, $block_data)." | -".$this->renderRadio4BlockPosition(8, $block_data)." | -||
".$this->renderRadio4BlockPositions($block_data, array(1, 2, 3, 4, 5, 6, 7, 8))." | -
".$this->renderRadio4BlockPosition(0, $block_data)." | -".$this->renderRadio4BlockPosition(3, $block_data)." | -".$this->renderRadio4BlockPosition(5, $block_data)." | -".$this->renderRadio4BlockPosition(4, $block_data)." | -".$this->renderRadio4BlockPosition(1, $block_data)." | -
".$this->renderRadio4BlockPosition(7, $block_data)." | -".$this->renderRadio4BlockPosition(9, $block_data)." | -".$this->renderRadio4BlockPosition(8, $block_data)." | -||
".$this->renderRadio4BlockPosition(-1, $block_data)._NONE." | -
-
-
-
- -
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
- -
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
- |
- ||
-
-
-
-
-
-
- "._NONE."
- |
-