1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 07:36:32 +02:00

14374 Commits

Author SHA1 Message Date
camer0n
1a019e671d Fixes #5089 - Admin-UI: custom true/false values when inline editing is disabled. 2023-10-13 10:51:44 -07:00
camer0n
dd9c011fdd Closes #4804 - Conversion of diacritics in name2id() 2023-09-28 09:36:31 -07:00
camer0n
720ea0c03d Fixes #5080 - Undefined constant. 2023-09-26 14:12:55 -07:00
camer0n
00a66eaadd Fixes #5087 - Outdated javascript enable instructions link. 2023-09-26 14:04:06 -07:00
camer0n
26f393b7ab Issue #5083 - Inline editor order fix for userclasses etc. 2023-09-25 10:07:48 -07:00
camer0n
cb1bbc7f3c #5079 PHP 8.2 notice removal 2023-09-18 13:43:43 -07:00
camer0n
e904dd99d5 Extra cron script checks. 2023-09-18 12:43:44 -07:00
Cameron
7394a6c539 Merge pull request #5073 from Deltik/fix/5072
install.php: PHP 8.2 exception handler signature compatibility
2023-09-12 08:23:41 -07:00
Cameron
86ff4d6c69 Merge pull request #5070 from Deltik/fix/5064
Fixes: #5064 Unify logic of `e_user_model::checkAdminPerms()` and `getperms()`
2023-09-12 08:22:14 -07:00
Nick Liu
c6401ff247 install.php: PHP 8.2 exception handler signature compatibility
The exception handler parameter has to be of type `Throwable`, but we
are remaining compatible with PHP 5.6, which didn't have `Throwable`,
so let's fix this by moving the type to the phpDoc block.

Fixes: https://github.com/e107inc/e107/issues/5072
2023-09-11 23:11:52 +02:00
Nick Liu
dd36fbd51d Unify logic of e_user_model::checkAdminPerms() and getperms()
Along with extensive documentation, `getperms()` is now deprecated and
its replacements now have first-class support:
* `e_user_model::checkAdminPerms()` and `getperms()` both use
  `e_userperms::simulateHasAdminPerms()`.
* `e_user_model::checkPluginAdminPerms()` and `getperms('P', …, …)`
  both use `e_userperms::simulateHasPluginAdminPerms()`.

----

Partially reverts: https://github.com/e107inc/e107/commit/44526b43

Reverts: https://github.com/e107inc/e107/commit/001799cb

Fixes: https://github.com/e107inc/e107/issues/5064
2023-09-09 12:03:14 +02:00
camer0n
001799cb5f Issue #5064 - Added user object vars. 2023-09-08 14:25:29 -07:00
camer0n
44526b435c Issue #5064 - Draft fix for user impersonation (getperms()) 2023-09-08 14:18:06 -07:00
camer0n
1ef0cc3352 PHPDoc fix. 2023-09-01 07:31:52 -07:00
camer0n
3af99c70cd HybridAuth patch for PHP5.6 2023-08-24 17:18:22 -07:00
camer0n
9aa8de4f7d Issue GHSA-92fr-7h4f-22pp 2023-08-22 13:28:10 -07:00
camer0n
abf94d0310 Fixes #5045 - Removed inline editing for when only "Quick Add User" has been granted, and removed adding of admin perms to avoid access escalation. 2023-08-22 12:51:23 -07:00
camer0n
9949a297f6 HybridAuth upgrade v3.9.0 => v3.10.0 2023-08-22 12:10:30 -07:00
Cameron
068bf05e92 Merge pull request #5055 from Deltik/fix/5054
Fixes #5054 db_verify::getIndex(): Support index_col_name optional parts
2023-08-17 11:52:47 -07:00
Cameron
1f06bb34c0 Merge pull request #5058 from Jimmi08/fix4683
Fixes #4683 Missing preferences in bootstrap5
2023-08-17 11:16:50 -07:00
Nick Liu
b623868756 db_verify::getIndex(): Support index_col_name optional parts
In the MariaDB `CREATE TABLE` [`index_definition`](https://mariadb.com/kb/en/create-table/#index-definitions),
 the `index_col_name` could have an optional length and a sort order:

```
index_definition:
    {INDEX|KEY} [index_name] [index_type] (index_col_name,...) [index_option] ...
  {{{|}}} {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...) [index_option] ...
  {{{|}}} [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...) [index_option] ...
  {{{|}}} [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY] [index_name] [index_type] (index_col_name,...) [index_option] ...
  {{{|}}} [CONSTRAINT [symbol]] FOREIGN KEY [index_name] (index_col_name,...) reference_definition

index_col_name:
    col_name [(length)] [ASC | DESC]

index_type:
    USING {BTREE | HASH | RTREE}

index_option:
    [ KEY_BLOCK_SIZE [=] value
  {{{|}}} index_type
  {{{|}}} WITH PARSER parser_name
  {{{|}}} COMMENT 'string'
  {{{|}}} CLUSTERING={YES| NO} ]
  [ IGNORED | NOT IGNORED ]

reference_definition:
    REFERENCES tbl_name (index_col_name,...)
      [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]
      [ON DELETE reference_option]
      [ON UPDATE reference_option]

reference_option:
    RESTRICT | CASCADE | SET NULL | NO ACTION
```

`db_verify::getIndex()` didn't handle this possibility, leading to a
database validity check failure despite the index actually existing.

Fixes: https://github.com/e107inc/e107/issues/5054
2023-08-17 17:27:26 +02:00
camer0n
5ff319cd5c Fixes #5052, Issue #5041 - Usersettings update redirect. 2023-08-16 07:52:07 -07:00
Cameron
0b6b28b455 Merge pull request #5048 from Jimmi08/patch-12
Fixes #4474 Admin-UI checkboxes with filter and batch.
2023-08-16 06:18:33 -07:00
Cameron
4eafc42f88 Merge pull request #5015 from Jimmi08/patch-7
Fixes #4866 RSS logo image
2023-08-14 10:00:16 -07:00
Nick Liu
3c571a884e #5060: [PHP 8.3] Fix get_class() deprecations
Fixes: https://github.com/e107inc/e107/pull/5060
2023-08-14 18:05:02 +02:00
Nick Liu
96666f176f e_user_provider: Replace "${var}"-style string interpolation
Deprecated in PHP 8.2:
https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.dollar-brace-interpolation

Discussed in Gitter:
https://matrix.to/#/!srhnCKlMgxFeuSPXPb:gitter.im/$4QOsTBHp8DKFsmHotpHAzuAAX1Ky3m0n2R-jIsVlxUg
2023-08-08 13:53:34 +02:00
Jimako
b495efef5f Update theme.html
applying shortcodes
2023-08-06 17:56:47 +02:00
Jimako
6e5aed03e8 Update theme_shortcodes.php
adding shortcodes
2023-08-06 17:56:02 +02:00
Jimako
0177a00291 Update theme_config.php
adding preferences
2023-08-06 17:55:16 +02:00
Jimako
8f95213773 Update English_admin.php 2023-08-06 17:53:28 +02:00
Jimako
724ee1be06 fix for type checkboxes and filtering #4474
FIX #4474
2023-07-28 20:29:29 +02:00
Cameron
95296d11f2 Merge pull request #5036 from Jimmi08/patch-11
Fixes #5000 user profile UEF change added to event
2023-07-10 12:25:52 -07:00
Cameron
2e81e37ca1 Merge pull request #5033 from Jimmi08/patch-10
Fixes #4517 UEF settings in plugin.xml - fix for parms
2023-07-10 12:24:24 -07:00
Cameron
1ee2e9f492 Merge pull request #5032 from Jimmi08/patch-9
Fixes #5031 for false error when deleting plugin DB field
2023-07-10 12:23:32 -07:00
Cameron
044481ab80 Merge pull request #5014 from Jimmi08/patch-6
Fixes #5013 False Error if UEF type DBField has no records
2023-07-10 12:21:13 -07:00
Cameron
e615bcf59e Merge pull request #5027 from Deltik/fix/5025
Fixes #5025: Type error when sending a PM without the attachment field
2023-07-10 12:20:15 -07:00
Cameron
802e046b11 Merge pull request #5029 from Jimmi08/patch-8
Partial fix #4517 - fix for settings of plugin.xml
2023-07-10 12:18:41 -07:00
Jimako
7999397726 user profile UEF change added to event 2023-07-04 08:43:48 +02:00
Jimako
43f0e1bcf1 Fix #4517 UEF settings in plugin.xml - fix for parms 2023-07-02 17:59:57 +02:00
Jimako
46a063a8f5 fix for false error when deleting plugin DB field #5031
https://github.com/e107inc/e107/issues/5031
2023-07-02 10:57:53 +02:00
Jimako
dd6bff4e76 partial fix for 4517 - fix for settings of plugin.xml
#4517
2023-07-02 09:09:25 +02:00
Nick Liu
5196c4f56d Fix #5025: Type error when sending a PM without the attachment field 2023-07-01 14:01:26 -05:00
Nick Liu
b893cba9b6 CI: Fix acceptance test setup failure
Should fix this SaltStack error:

```
[ERROR   ] Command '/opt/saltstack/salt/salt-pip' failed with return code: 1
[ERROR   ] stdout: Collecting mysqlclient
  Downloading mysqlclient-2.2.0.tar.gz (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 10.5 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
[ERROR   ] stderr:   error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      /bin/sh: 1: pkg-config: not found
      /bin/sh: 1: pkg-config: not found
      Trying pkg-config --exists mysqlclient
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
      Trying pkg-config --exists mariadb
      Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
      Traceback (most recent call last):
        File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 154, in <module>
        File "<string>", line 48, in get_config_posix
        File "<string>", line 27, in find_package_name
      Exception: Can not find valid pkg-config name.
      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
[ERROR   ] retcode: 1
[ERROR   ] Failed to install packages: mysqlclient. Error: Collecting mysqlclient
  Downloading mysqlclient-2.2.0.tar.gz (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 10.5 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'   error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      /bin/sh: 1: pkg-config: not found
      /bin/sh: 1: pkg-config: not found
      Trying pkg-config --exists mysqlclient
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
      Trying pkg-config --exists mariadb
      Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
      Traceback (most recent call last):
        File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 154, in <module>
        File "<string>", line 48, in get_config_posix
        File "<string>", line 27, in find_package_name
      Exception: Can not find valid pkg-config name.
      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
[ERROR   ] State 'mysql_user.present' was not found in SLS 'e107-dev'
Reason: 'mysql_user' __virtual__ returned False: mysql module could not be loaded

[ERROR   ] State 'mysql_user.present' was not found in SLS 'e107-dev'
Reason: 'mysql_user' __virtual__ returned False: mysql module could not be loaded

[ERROR   ] State 'mysql_database.present' was not found in SLS 'e107-dev'
Reason: 'mysql_database' __virtual__ returned False: mysql module could not be loaded
```
2023-06-22 20:46:10 -05:00
Nick Liu
714e9f9abe PHP bug 66773 workaround in Hybridauth
In PHP 7.0.12 and earlier, a class could not be loaded with the same
name as another class in a different namespace.  This commit patches the
Hybridauth dependency to avoid PHP bug 66773.  Unfortunately, the fix
will be rolled back any time Hybridauth is updated or overwritten.

PHP bug link: https://bugs.php.net/bug.php?id=66773

(cherry picked from commit 539c3f1a67)
(cherry picked from commit 7994746dab)
2023-06-22 12:31:28 -05:00
camer0n
7d8c6ad073 Fixes #5020 Error message removal. 2023-06-22 09:49:32 -07:00
camer0n
4cc9d8b085 Updated vendor packages:
hybridauth/hybridauth (v3.8.2 => v3.9.0)
ifsnop/mysqldump-php (v2.9 => v2.12)
guzzlehttp/psr7 (1.9.0 => 1.9.1)
matthiasmullie/minify (1.3.70 => 1.3.71)
phpmailer/phpmailer (v6.7.1 => v6.8.0)
2023-06-22 09:47:35 -07:00
Nick Liu
18eff9d774 CI: Update actions/checkout@v2 → actions/checkout@v3
To fix the node12 deprecation warning and move to node16
2023-06-20 22:35:01 -05:00
camer0n
accc345b79 Fixes #5017 - System logs message fix. 2023-06-20 18:00:10 -07:00
Nick Liu
4ef2f73a59 CI: Fix pecl install xdebug-2.5.5 for php:5.6 image 2023-06-20 18:51:18 -05:00
camer0n
23df6c1072 Issue #5016 - Avoid sending 'Array' in hidden field. 2023-06-20 10:04:07 -07:00