aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/.gitignore6
-rw-r--r--lib/CssXPath/NotYetImplementedException.php4
-rw-r--r--lib/composer.json2
-rw-r--r--lib/lib_rss.php7
-rw-r--r--lib/phpgt/cssxpath/LICENSE (renamed from lib/CssXPath/LICENSE)0
-rw-r--r--lib/phpgt/cssxpath/README.md (renamed from lib/CssXPath/README.md)0
-rw-r--r--lib/phpgt/cssxpath/src/CssXPathException.php (renamed from lib/CssXPath/CssXPathException.php)2
-rw-r--r--lib/phpgt/cssxpath/src/NotYetImplementedException.php4
-rw-r--r--lib/phpgt/cssxpath/src/Translator.php (renamed from lib/CssXPath/Translator.php)0
9 files changed, 18 insertions, 7 deletions
diff --git a/lib/.gitignore b/lib/.gitignore
index f1e6fdd7e..b599767a7 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -1,6 +1,12 @@
autoload.php
composer.lock
composer/
+phpgt/cssxpath/.github/
+phpgt/cssxpath/.gitignore
+phpgt/cssxpath/.scrutinizer.yml
+phpgt/cssxpath/composer.json
+phpgt/cssxpath/CONTRIBUTING.md
+phpgt/cssxpath/test/
phpmailer/phpmailer/*oauth*
phpmailer/phpmailer/COMMITMENT*
phpmailer/phpmailer/composer.*
diff --git a/lib/CssXPath/NotYetImplementedException.php b/lib/CssXPath/NotYetImplementedException.php
deleted file mode 100644
index 70d9492cf..000000000
--- a/lib/CssXPath/NotYetImplementedException.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-namespace Gt\CssXPath;
-
-class NotYetImplementedException extends CssXPathException {}
diff --git a/lib/composer.json b/lib/composer.json
index 3d307f6e8..6fdc90ef4 100644
--- a/lib/composer.json
+++ b/lib/composer.json
@@ -6,9 +6,11 @@
"license": "AGPL-3.0",
"require": {
"php": ">=7.0.0",
+ "phpgt/cssxpath": "v1.1.4",
"phpmailer/phpmailer": "6.6.0"
},
"config": {
+ "sort-packages": true,
"vendor-dir": "./"
},
"scripts": {
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index a4a9df36a..96a9cb2a8 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -52,8 +52,11 @@ function classAutoloader($class) {
include(LIB_PATH . '/' . str_replace('_', '/', $class) . '.php');
} elseif (strpos($class, 'SimplePie') === 0) {
include(LIB_PATH . '/SimplePie/' . str_replace('_', '/', $class) . '.php');
- } elseif (strpos($class, 'CssXPath') !== false) {
- include(LIB_PATH . '/CssXPath/' . basename(str_replace('\\', '/', $class)) . '.php');
+ } elseif (str_starts_with($class, 'Gt\\CssXPath\\')) {
+ $prefix = 'Gt\\CssXPath\\';
+ $base_dir = LIB_PATH . '/phpgt/cssxpath/src/';
+ $relative_class_name = substr($class, strlen($prefix));
+ require $base_dir . str_replace('\\', '/', $relative_class_name) . '.php';
} elseif (str_starts_with($class, 'PHPMailer\\PHPMailer\\')) {
$prefix = 'PHPMailer\\PHPMailer\\';
$base_dir = LIB_PATH . '/phpmailer/phpmailer/src/';
diff --git a/lib/CssXPath/LICENSE b/lib/phpgt/cssxpath/LICENSE
index 12b514c97..12b514c97 100644
--- a/lib/CssXPath/LICENSE
+++ b/lib/phpgt/cssxpath/LICENSE
diff --git a/lib/CssXPath/README.md b/lib/phpgt/cssxpath/README.md
index 9082c8bbf..9082c8bbf 100644
--- a/lib/CssXPath/README.md
+++ b/lib/phpgt/cssxpath/README.md
diff --git a/lib/CssXPath/CssXPathException.php b/lib/phpgt/cssxpath/src/CssXPathException.php
index bd7798243..81ad3ac9d 100644
--- a/lib/CssXPath/CssXPathException.php
+++ b/lib/phpgt/cssxpath/src/CssXPathException.php
@@ -3,4 +3,4 @@ namespace Gt\CssXPath;
use RuntimeException;
-class CssXPathException extends RuntimeException {}
+class CssXPathException extends RuntimeException {} \ No newline at end of file
diff --git a/lib/phpgt/cssxpath/src/NotYetImplementedException.php b/lib/phpgt/cssxpath/src/NotYetImplementedException.php
new file mode 100644
index 000000000..39d12b3bc
--- /dev/null
+++ b/lib/phpgt/cssxpath/src/NotYetImplementedException.php
@@ -0,0 +1,4 @@
+<?php
+namespace Gt\CssXPath;
+
+class NotYetImplementedException extends CssXPathException {} \ No newline at end of file
diff --git a/lib/CssXPath/Translator.php b/lib/phpgt/cssxpath/src/Translator.php
index 140909099..140909099 100644
--- a/lib/CssXPath/Translator.php
+++ b/lib/phpgt/cssxpath/src/Translator.php