Commits vergleichen

..

2 Commits

Autor SHA1 Nachricht Datum
eacbe1ea8e Merge pull request 'update main with develop' (#48) from develop into main
Reviewed-on: #48
2023-10-16 16:13:59 +00:00
o.pinke
5175025b58 Merge branch 'hotfix/issue#16' 2021-05-06 12:59:54 +02:00
280 geänderte Dateien mit 32990 neuen und 2194 gelöschten Zeilen

2
.gitignore gevendort
Datei anzeigen

@ -1,5 +1,4 @@
/nbproject/private/ /nbproject/private/
/.idea/workspace.xml
/data/config/production/config.php /data/config/production/config.php
/_dev/ /_dev/
/conlite/plugins/pluginmanager/_src /conlite/plugins/pluginmanager/_src
@ -24,4 +23,3 @@
/cms/cache/* /cms/cache/*
composer.phar composer.phar
/conlite/vendor/ /conlite/vendor/
*.old.php

Datei anzeigen

@ -4,16 +4,30 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/conlite/external/endroid/qr-code/tests" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/conlite/external/endroid/qr-code/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/phpmailer/phpmailer/tests" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/conlite/external/phpmailer/phpmailer/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/classes" isTestSource="false" packagePrefix="ConLite\" /> <sourceFolder url="file://$MODULE_DIR$/conlite/external/myclabs/deep-copy/fixtures" isTestSource="true" packagePrefix="DeepCopy\" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/myclabs/deep-copy/src/DeepCopy" isTestSource="false" packagePrefix="DeepCopy\" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/myclabs/deep-copy/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/myclabs/deep-copy/tests/DeepCopyTest" isTestSource="true" packagePrefix="DeepCopyTest\" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/nikic/php-parser/lib/PhpParser" isTestSource="false" packagePrefix="PhpParser\" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/nikic/php-parser/test/PhpParser" isTestSource="true" packagePrefix="PhpParser\" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/nikic/php-parser/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/phpunit/php-file-iterator/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/sebastian/cli-parser/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/sebastian/code-unit-reverse-lookup/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/sebastian/comparator/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/sebastian/complexity/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/conlite/external/sebastian/object-enumerator/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/conlite/vendor/composer" /> <excludeFolder url="file://$MODULE_DIR$/conlite/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/conlite/vendor/phpmailer/phpmailer" /> <excludeFolder url="file://$MODULE_DIR$/conlite/vendor/phpmailer/phpmailer" />
<excludeFolder url="file://$MODULE_DIR$/conlite/vendor/phpstan/phpstan" /> <excludeFolder url="file://$MODULE_DIR$/conlite/vendor/phpstan/phpstan" />
<excludeFolder url="file://$MODULE_DIR$/conlite/vendor/rector/rector" /> <excludeFolder url="file://$MODULE_DIR$/conlite/vendor/rector/rector" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" /> <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpmailer/phpmailer" /> <excludeFolder url="file://$MODULE_DIR$/vendor/phpmailer/phpmailer" />
<excludeFolder url="file://$MODULE_DIR$/conlite/plugins/de.ortwinpinke.soccer_betting_game/vendor/composer" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
<excludeFolder url="file://$MODULE_DIR$/conlite/plugins/de.ortwinpinke.soccer_betting_game/vendor/rinvex/countries" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />

Datei anzeigen

@ -18,18 +18,6 @@
<Configuration> <Configuration>
<option name="path" value="$PROJECT_DIR$/tests" /> <option name="path" value="$PROJECT_DIR$/tests" />
</Configuration> </Configuration>
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
</list> </list>
</option> </option>
</component> </component>

Datei anzeigen

@ -14,14 +14,11 @@
<include_path> <include_path>
<path value="$PROJECT_DIR$/conlite/external/phpqrcode/bindings" /> <path value="$PROJECT_DIR$/conlite/external/phpqrcode/bindings" />
<path value="$PROJECT_DIR$/conlite/external/phpqrcode/tools" /> <path value="$PROJECT_DIR$/conlite/external/phpqrcode/tools" />
<path value="$PROJECT_DIR$/conlite/vendor/phpmailer/phpmailer" />
<path value="$PROJECT_DIR$/conlite/vendor/composer" />
<path value="$PROJECT_DIR$/conlite/vendor/rector/rector" />
<path value="$PROJECT_DIR$/conlite/vendor/phpstan/phpstan" />
<path value="$PROJECT_DIR$/conlite/plugins/de.ortwinpinke.soccer_betting_game/vendor/composer" />
<path value="$PROJECT_DIR$/conlite/plugins/de.ortwinpinke.soccer_betting_game/vendor/rinvex/countries" />
<path value="$PROJECT_DIR$/vendor/composer" /> <path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/phpmailer/phpmailer" /> <path value="$PROJECT_DIR$/vendor/phpmailer/phpmailer" />
<path value="$PROJECT_DIR$/vendor/twig/twig" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
</include_path> </include_path>
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.0"> <component name="PhpProjectSharedConfiguration" php_language_level="8.0">

Datei anzeigen

@ -17,18 +17,6 @@
<PhpSpecSuiteConfiguration> <PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" /> <option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration> </PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
</suites> </suites>
</component> </component>
</project> </project>

Datei anzeigen

@ -2,8 +2,6 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" /> <mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/conlite/plugins/cl-content-allocation" vcs="Git" />
<mapping directory="$PROJECT_DIR$/conlite/plugins/cl-mod-rewrite" vcs="Git" /> <mapping directory="$PROJECT_DIR$/conlite/plugins/cl-mod-rewrite" vcs="Git" />
<mapping directory="$PROJECT_DIR$/conlite/plugins/cl-newsletter" vcs="Git" />
</component> </component>
</project> </project>

236
.idea/workspace.xml Normale Datei
Datei anzeigen

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="8eedb38c-41ce-4f3c-a016-df6a207a4233" name="Changes" comment="gitadmin" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerConfigs">
<option name="configs">
<option value="$PROJECT_DIR$/conlite/external/endroid/qr-code/composer.json" />
<option value="$PROJECT_DIR$/conlite/external/rector/rector/composer.json" />
<option value="$PROJECT_DIR$/conlite/external/phpstan/phpstan/composer.json" />
<option value="$PROJECT_DIR$/conlite/external/symfony/options-resolver/composer.json" />
<option value="$PROJECT_DIR$/cms/securimage/composer.json" />
</option>
</component>
<component name="ComposerSettings" synchronizationState="SYNCHRONIZE">
<pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
<execution>
<executable path="composer" />
</execution>
</component>
<component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="dev_php82" />
<entry key="$PROJECT_DIR$/cms/secureimage" value="master" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="ROOT_SYNC" value="DONT_SYNC" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="/usr/bin/php">
<include_path>
<path value="$PROJECT_DIR$/conlite/vendor/phpmailer/phpmailer" />
<path value="$PROJECT_DIR$/conlite/vendor/composer" />
<path value="$PROJECT_DIR$/conlite/vendor/rector/rector" />
<path value="$PROJECT_DIR$/conlite/vendor/phpstan/phpstan" />
</include_path>
</component>
<component name="ProjectId" id="2OsnK7aTqPj8IgMHzGyLAOICLU1" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;/var/www/html/clphp8/cms/data/modules/cl_contactform/php&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/cms/data/modules/cl_contactform/php" />
</key>
</component>
<component name="RunManager" selected="Rector.cl_contactform_output.php">
<configuration name="cl_contactform_output.php" type="RectorRunConfigurationType" factoryName="RectorRunConfigurationType" temporary="true" nameIsGenerated="true">
<option name="pathsToProcess">
<list>
<option value="$PROJECT_DIR$/cms/data/modules/cl_contactform/php/cl_contactform_output.php" />
</list>
</option>
<option name="rectorConfigPath" value="$PROJECT_DIR$/rector.php" />
<option name="pathsToProcess">
<list>
<option value="$PROJECT_DIR$/cms/data/modules/cl_contactform/php/cl_contactform_output.php" />
</list>
</option>
<option name="rectorConfigPath" value="$PROJECT_DIR$/rector.php" />
<method v="2" />
</configuration>
<configuration name="xtcdynspryform0.9.2" type="RectorRunConfigurationType" factoryName="RectorRunConfigurationType" temporary="true" nameIsGenerated="true">
<option name="pathsToProcess">
<list>
<option value="$PROJECT_DIR$/cms/data/modules/xtcdynspryform0.9.2" />
</list>
</option>
<option name="rectorConfigPath" value="$PROJECT_DIR$/rector.php" />
<option name="pathsToProcess">
<list>
<option value="$PROJECT_DIR$/cms/data/modules/xtcdynspryform0.9.2" />
</list>
</option>
<option name="rectorConfigPath" value="$PROJECT_DIR$/rector.php" />
<method v="2" />
</configuration>
<configuration name="xtcdynspryform0.9.2_input.php" type="RectorRunConfigurationType" factoryName="RectorRunConfigurationType" temporary="true" nameIsGenerated="true">
<option name="pathsToProcess">
<list>
<option value="$PROJECT_DIR$/cms/data/modules/xtcdynspryform0.9.2/php/xtcdynspryform0.9.2_input.php" />
</list>
</option>
<option name="rectorConfigPath" value="$PROJECT_DIR$/rector.php" />
<option name="pathsToProcess">
<list>
<option value="$PROJECT_DIR$/cms/data/modules/xtcdynspryform0.9.2/php/xtcdynspryform0.9.2_input.php" />
</list>
</option>
<option name="rectorConfigPath" value="$PROJECT_DIR$/rector.php" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Rector.cl_contactform_output.php" />
<item itemvalue="Rector.xtcdynspryform0.9.2_input.php" />
<item itemvalue="Rector.xtcdynspryform0.9.2" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="8eedb38c-41ce-4f3c-a016-df6a207a4233" name="Changes" comment="" />
<created>1682358089636</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1682358089636</updated>
<workItem from="1682358110742" duration="8528000" />
<workItem from="1682512199591" duration="40000" />
<workItem from="1682512266209" duration="329000" />
<workItem from="1682512610923" duration="100000" />
<workItem from="1682512717674" duration="523000" />
</task>
<task id="LOCAL-00001" summary="move composer vendor folder">
<created>1682442332378</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1682442332378</updated>
</task>
<task id="LOCAL-00002" summary="add rector.php">
<created>1682442467699</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1682442467700</updated>
</task>
<task id="LOCAL-00003" summary="gitadmin">
<created>1682442642783</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1682442642783</updated>
</task>
<task id="LOCAL-00004" summary="updates for php8">
<created>1682445298959</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1682445298959</updated>
</task>
<task id="LOCAL-00005" summary="documentation and cleaning code">
<created>1682445879204</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1682445879204</updated>
</task>
<task id="LOCAL-00006" summary="add module package xml">
<created>1682446236100</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1682446236100</updated>
</task>
<task id="LOCAL-00007" summary="updated doc-blocks and module package">
<created>1682446918410</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1682446918410</updated>
</task>
<task id="LOCAL-00008" summary="gitadmin">
<created>1682450834252</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1682450834252</updated>
</task>
<task id="LOCAL-00009" summary="gitadmin">
<created>1682513087275</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1682513087275</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="move composer vendor folder" />
<MESSAGE value="add rector.php" />
<MESSAGE value="updates for php8" />
<MESSAGE value="documentation and cleaning code" />
<MESSAGE value="add module package xml" />
<MESSAGE value="updated doc-blocks and module package" />
<MESSAGE value="gitadmin" />
<option name="LAST_COMMIT_MESSAGE" value="gitadmin" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>

Datei anzeigen

@ -1,75 +1,73 @@
This is the readme file for **ConLite 3.0.0** This is the readme file for ConLite 2.2.0 beta
Any help you need you may find by visiting the following links. Any help you need you may find by visiting the following links.
* CL-Portal [https://conlite.org](https://conlite.org) CL-Portal http//conlite.org
* CL-Forum [http://forum.conlite.org](http://forum.conlite.org) CL-Forum http://forum.conlite.org
* CL-Bugtracker [https://gitport.de/ConLite/ConLite/issues](https://gitport.de/ConLite/ConLite/issues) CL-Bugtracker http://bugs.conlite.org
* CL-API-Doc [https://api.conlite.org/CL3_0_0](https://api.conlite.org/CL3_0_0) CL-API-Doc http://conlite.conrepo.org/api/4.8.16CL
### !!! Attention !!! !!! Attention !!!
We tried to fix all known bugs of Contenido 4.8 and earlier but cannot give any garanties for that. So use
We tried to fix all known bugs of Contenido 4.8 and earlier but cannot give any garanties for that. So use it on your own risk. If you find any bug or have any idea to enhance ConLite, feel free to visit our
it on your own risk. If you find any bug or have any idea to enhance ConLite, feel free to visit our bugtracker and register at http://bugs.conlite.org
bugtracker at [https://gitport.de/ConLite/ConLite/issues](https://gitport.de/ConLite/ConLite/issues)
Any help and ideas are welcome :) Any help and ideas are welcome :)
### Mini FAQ ** Mini FAQ **
#### What is ConLite? What is ConLite?
CL (short for ConLite) is dedicated to close the gap between Contenido 4.8 and the version 4.10. CL (short for ConLite) is dedicated to close the gap between Contenido 4.8 and the version 4.10.
In downloadable 4.8.20 (and former 4.8.15) are still a lot of bugs and some missing feautures and In downloadable 4.8.20 (and former 4.8.15) are still a lot of bugs and some missing feautures and
enhancements so one cannot use the version without problems. Our goal is to give you a bugfixed and enhancements so one cannot use the version without problems. Our goal is to give you a bugfixed and
really stable version of Contenido till the 4.9 or 4.10 is stable. By the way, there are still a lot of big sides really stable version of Contenido till the 4.9 or 4.10 is stable. By the way, there are still a lot of big sides
build with 4.8.x out there where upgrading to 4.10.x is not possible or cost a lot of money. build with 4.8.x out there where upgrading to 4.10.x is not possible or cost a lot of money.
#### Why i have to use ConLite? Why i have to use ConLite?
You don't have to, but feel free to do it. ConLite will show you an easier way to upgrade step by step to Contenido You don't have to, but feel free to do it. ConLite will show you an easier way to upgrade step by step to Contenido
4.10. The new version of Contenido has a lot of changes, so you have to do a lot of work 4.10. The new version of Contenido has a lot of changes, so you have to do a lot of work
with modules or custom plugins to adapt them to the new version. That's not what ConLite does nor will with modules or custom plugins to adapt them to the new version. That's not what ConLite does nor will
do in the future. ConLite will do changes step by step, or better version by version to adapt your do in the future. ConLite will do changes step by step, or better version by version to adapt your
4.8.x or higher installation to work with the new 4.9 of Contenido. And ConLite will try to give you a 4.8.x or higher installation to work with the new 4.9 of Contenido. And ConLite will try to give you a
stable and bugfixed Content-Management-System in the future. stable and bugfixed Content-Management-System in the future.
#### Who are the people behind ConLite? Who are the people behind ConLite?
The Team behind the CL-version are some well known guys from CONTENIDO-forum, working since many years with The Team behind the CL-version are some well known guys from CONTENIDO-forum, working since many years with
and within CONTENIDO core or coding modules and plugins for CONTENIDO. and within CONTENIDO core or coding modules and plugins for CONTENIDO.
And we love CONTENIDO :) And we love CONTENIDO :)
### Copyright ** Copyright **
The copyright for the code of CONTENIDO still remains to 4fb and the named coders for all codes coming The copyright for the code of CONTENIDO still remains to 4fb and the named coders for all codes coming
from 4.8.15 and/or from svn- or git-repository of CONTENDIO. from 4.8.15 and/or from svn- or git-repository of CONTENDIO.
All ads, enhancements or new parts, coded by the CL-Team are copyright by their named coders or All ads, enhancements or new parts, coded by the CL-Team are copyright by their named coders or
by CL-Team and conlite.org. by CL-Team and conlite.org.
### Know Bugs ** Know Bugs **
FS#25 - Collision with pre-installed AMR after Migration FS#25 - Collision with pre-installed AMR after Migration
!!! Attention !!! !!! Attention !!!
If you want to upgrade with an installed AMR-plugin, uninstall AMR before upgrade. If you want to upgrade with an installed AMR-plugin, uninstall AMR before upgrade.
We will include a fix for that in one of the next versions of CL We will include a fix for that in one of the next versions of CL
### History / Changelog
**ConLite 2.1.3**
**ConLite 2.1.2** ** History / Changelog **
ConLite 2.2.0 beta
**ConLite 2.1.1** ConLite 2.1.3
ConLite 2.1.2
ConLite 2.1.1
ConLite 2.1.0
* see https://gitport.de/ConLite/ConLite/milestones
**ConLite 2.1.0** ConLite 2.0
* see [https://gitport.de/ConLite/ConLite/milestones](https://gitport.de/ConLite/ConLite/milestones) ConLite 1.0
**ConLite 2.0**
**ConLite 1.0**
* old svn history lost * old svn history lost
**CONTENIDO 4.8.16 CL** CONTENIDO 4.8.16 CL
* 20 Bug Report genericdb: urlencode() expects parameter 1 to be string ... * 20 Bug Report genericdb: urlencode() expects parameter 1 to be string ...
* 16 Enhancement RSS-Reader austauschen/überarbeiten * 16 Enhancement RSS-Reader austauschen/überarbeiten
* 31 Optimization Test CL installation with newest PHP and SQL on XAMPP * 31 Optimization Test CL installation with newest PHP and SQL on XAMPP

Datei anzeigen

@ -8,12 +8,12 @@ if (file_exists($configEnv)) {
if (!defined('CL_ENVIRONMENT')) { if (!defined('CL_ENVIRONMENT')) {
if (getenv('CONLITE_ENVIRONMENT')) { if (getenv('CONLITE_ENVIRONMENT')) {
$sEnvironment = getenv('CONLITE_ENVIRONMENT'); define('CL_ENVIRONMENT', getenv('CONLITE_ENVIRONMENT'));
} elseif (getenv('CL_ENVIRONMENT')) { } if (getenv('CONTENIDO_ENVIRONMENT')) {
$sEnvironment = getenv('CL_ENVIRONMENT'); define('CL_ENVIRONMENT', getenv('CONTENIDO_ENVIRONMENT'));
} else { } else {
$sEnvironment = 'production'; define('CL_ENVIRONMENT', 'production');
} }
define('CL_ENVIRONMENT', $sEnvironment); }
unset($sEnvironment);
} //echo CL_ENVIRONMENT;

Datei anzeigen

@ -131,6 +131,9 @@ if (isset($_GET['action']) && $_GET['action'] == 'get_compressed') {
exit(); exit();
} }
// Call hook after plugins are loaded, added by Murat Purc, 2008-09-07
CEC_Hook::execute('Contenido.Frontend.AfterLoadPlugins');
if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0) { if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0) {
// get encodings of all languages // get encodings of all languages
$encoding = array(); $encoding = array();

Datei anzeigen

@ -10,7 +10,8 @@
], ],
"require": { "require": {
"php": "^8.0", "php": "^8.0",
"phpmailer/phpmailer": "v6.9.1" "phpmailer/phpmailer": "v6.8.0",
"twig/twig": "^3.0"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "^1.10", "phpstan/phpstan": "^1.10",

567
composer.lock generiert

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -185,8 +185,7 @@ class DB_Sql extends DB_Sql_Abstract {
/** /**
* @see DB_Sql_Abstract::next_record() * @see DB_Sql_Abstract::next_record()
*/ */
public function next_record(): bool|int public function next_record() {
{
if (!$this->Query_ID instanceof mysqli_result) { if (!$this->Query_ID instanceof mysqli_result) {
return false; return false;
} }

Datei anzeigen

@ -80,20 +80,16 @@ class DB_ConLite extends DB_Sql {
/** /**
* Fetches the next recordset from result set * Fetches the next recordset from result set
* *
* @deprecated since ConLite 2.3 * @param bool
*/ */
public function next_record(): bool|int public function next_record() {
{ global $cCurrentModule;
return $this->nextRecord(); // FIXME For what reason is NoRecord used???
} $this->NoRecord = false;
public function nextRecord(): bool|int
{
$currentModule = cRegistry::getCurrentModule();
if (!$this->Query_ID) { if (!$this->Query_ID) {
if ($currentModule > 0) { $this->NoRecord = true;
$this->halt("next_record called with no query pending in Module ID $currentModule."); if ($cCurrentModule > 0) {
$this->halt("next_record called with no query pending in Module ID $cCurrentModule.");
} else { } else {
$this->halt("next_record called with no query pending."); $this->halt("next_record called with no query pending.");
} }

Datei anzeigen

@ -39,7 +39,7 @@ class DebuggerFactory {
/** /**
* *
* @param string $sType * @param type $sType
* @return Debug_VisibleAdv * @return Debug_VisibleAdv
*/ */
public static function getDebugger($sType) { public static function getDebugger($sType) {

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Exceptions;
class ConUserException extends Exception
{
}

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Exceptions;
class Exception extends \Exception
{
}

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Exceptions;
class FileNotFoundException extends RuntimeException
{
}

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Exceptions;
class InvalidArgumentException extends LogicException
{
}

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Exceptions;
class LogicException extends Exception
{
}

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Exceptions;
class RuntimeException extends Exception
{
}

Datei anzeigen

@ -1,306 +0,0 @@
<?php
namespace ConLite\Log;
use ConLite\Exceptions\InvalidArgumentException;
use cString;
use ReflectionClass;
class Log
{
/**
* logging level
*
* @var int
*/
const EMERG = 0;
/**
* logging level
*
* @var int
*/
const ALERT = 1;
/**
* logging level
*
* @var int
*/
const CRIT = 2;
/**
* logging level
*
* @var int
*/
const ERR = 3;
/**
* logging level
*
* @var int
*/
const WARN = 4;
/**
* logging level
*
* @var int
*/
const NOTICE = 5;
/**
* logging level
*
* @var int
*/
const INFO = 6;
/**
* logging level
*
* @var int
*/
const DEBUG = 7;
protected $writer;
protected $shortcutHandlers = [];
protected $priorities = [];
protected $defaultPriorities = [];
protected $buffer = [];
/**
* @throws InvalidArgumentException
*/
public function __construct(LogWriter $writer = null)
{
$createWriter = false;
if(!$writer) {
$createWriter = true;
} elseif (!is_object($writer) || !($writer instanceof LogWriter)) {
cWarning(__FILE__, __LINE__, 'The passed class is not a subclass of ConLite LogWriter. Creating new one.');
$createWriter = true;
}
if($createWriter) {
$options = ['destination' => \cRegistry::getConfigValue('path', 'logs') . 'conlite.log'];
$writer = LogWriter::factory('File', $options);
}
$this->setWriter($writer);
$this->setShortcutHandler('%date', [$this, 'shDate']);
$this->setShortcutHandler('%level', [$this, 'shLevel']);
$this->setShortcutHandler('%message', [$this, 'shMessage']);
$this->getWriter()->setOption('log_format', '[%date] [%level] %message', false);
$reflection = new ReflectionClass($this);
$this->priorities = $this->defaultPriorities = array_flip($reflection->getConstants());
}
public function getWriter() {
return $this->writer;
}
public function setWriter(LogWriter $writer): void
{
$this->writer = $writer;
}
/**
* @throws InvalidArgumentException
*/
public function setShortcutHandler($shortcut, $handler): bool
{
if ($shortcut == '') {
throw new InvalidArgumentException('The shortcut name must not be empty.');
}
if (cString::getPartOfString($shortcut, 0, 1) == '%') {
$shortcut = cString::getPartOfString($shortcut, 1);
}
if (!is_callable($handler)) {
throw new InvalidArgumentException('The specified shortcut handler does not exist.');
}
if (array_key_exists($shortcut, $this->shortcutHandlers)) {
throw new InvalidArgumentException('The shortcut ' . $shortcut . ' is already in use!');
}
$this->shortcutHandlers[$shortcut] = $handler;
return true;
}
public function unsetShortcutHandler($shortcut)
{
if(!in_array($shortcut, $this->shortcutHandlers)) {
throw new InvalidArgumentException('The specified shortcut handler does not exist.');
}
unset($this->shortcutHandlers[$shortcut]);
return true;
}
public function buffer(string $message, $priority = null): void
{
$this->buffer[] = [$message, $priority];
}
public function commit(bool $clearBuffer = true)
{
if (count($this->buffer) == 0) {
cWarning(__FILE__, __LINE__, 'There are no buffered messages to commit.');
return false;
}
foreach ($this->buffer as $bufferInfo) {
$this->log($bufferInfo[0], $bufferInfo[1]);
}
if ($clearBuffer) {
$this->clearBuffer();
}
}
public function clearBuffer(): void
{
$this->buffer = [];
}
public function log(string $message, $priority = null): void
{
if ($priority && !is_int($priority) && in_array($priority, $this->priorities)) {
$priority = array_search($priority, $this->priorities);
}
if ($priority === null || !array_key_exists($priority, $this->priorities)) {
$priority = $this->getWriter()->getOption('default_priority');
}
$logMessage = $this->getWriter()->getOption('log_format');
$lineEnding = $this->getWriter()->getOption('line_ending');
foreach ($this->shortcutHandlers as $shortcut => $handler) {
if (cString::getPartOfString($shortcut, 0, 1) != '%') {
$shortcut = '%' . $shortcut;
}
$info = [
'message' => $message,
'priority' => $priority
];
$value = call_user_func($handler, $info);
$logMessage = str_replace($shortcut, $value, $logMessage);
}
$this->getWriter()->write($logMessage . $lineEnding, $priority);
}
/**
* @throws InvalidArgumentException
*/
public function addPriority(string $name, int $value): void
{
if ($name == '') {
throw new InvalidArgumentException('Priority name must not be empty.');
}
if (in_array($name, $this->priorities)) {
throw new InvalidArgumentException('The given priority name already exists.');
}
if (array_key_exists($value, $this->priorities)) {
throw new InvalidArgumentException('The priority value already exists.');
}
$this->priorities[$value] = $name;
}
/**
* @throws InvalidArgumentException
*/
public function removePriority(string $name): void
{
if ($name == '') {
throw new InvalidArgumentException('Priority name must not be empty.');
}
if (!in_array($name, $this->priorities)) {
throw new InvalidArgumentException('Priority name does not exist.');
}
if (in_array($name, $this->defaultPriorities)) {
throw new InvalidArgumentException('Removing default priorities is not allowed.');
}
$priorityIndex = array_search($name, $this->priorities);
unset($this->priorities[$priorityIndex]);
}
/**
* @throws InvalidArgumentException
*/
public function __call(string $method, array $arguments) {
$priorityName = cString::toUpperCase($method);
if (!in_array($priorityName, $this->priorities)) {
throw new InvalidArgumentException('The given priority ' . $priorityName . ' is not supported.');
}
$priorityIndex = array_search($priorityName, $this->priorities);
$this->log($arguments[0], $priorityIndex);
}
/**
* Shortcut Handler Date.
* Returns the current date.
*
* @return string
* The current date
*/
public function shDate(): string
{
return date('Y-m-d H:i:s');
}
/**
* Shortcut Handler Level.
* Returns the canonical name of the priority.
* The canonical name is padded to 10 characters to achieve a better
* formatting.
*
* @param array $info
* @return string
* The canonical log level
*/
public function shLevel(array $info): string
{
$logLevel = $info['priority'];
return str_pad($this->priorities[$logLevel], 10, ' ', STR_PAD_BOTH);
}
/**
* Shortcut Handler Message.
* Returns the log message.
*
* @param array $info
* @return string
* The log message
*/
public function shMessage(array $info): string
{
return $info['message'];
}
}

Datei anzeigen

@ -1,66 +0,0 @@
<?php
namespace ConLite\Log;
use ConLite\Exceptions\InvalidArgumentException;
abstract class LogWriter
{
/**
* @param array $options
*/
public function __construct(
protected array $options = []
)
{
$this->setOptions($options);
$this->setOption('default_priority', Log::INFO, false);
$this->setOption('line_ending', PHP_EOL, false);
}
/**
* @throws invalidArgumentException
*/
public static function factory($writerName, array $writerOptions): LogWriter
{
$logWriterClassName = __NAMESPACE__ . '\\LogWriter' . ucfirst($writerName);
if(!class_exists($logWriterClassName)) {
throw new InvalidArgumentException('Unknown ConLite LogWriter class: ' . $logWriterClassName);
}
$writer = new $logWriterClassName($writerOptions);
if(!($writer instanceof LogWriter)) {
throw new InvalidArgumentException('Provided class is not an instance of ConLite LogWriter');
}
return $writer;
}
public function getOptions(): array
{
return $this->options;
}
public function getOption($option) {
return $this->options[$option];
}
public function setOptions(array $options): void
{
$this->options = $options;
}
public function setOption($option, $value, $force = false) {
if (!$force && isset($this->options[$option])) {
return;
}
$this->options[$option] = $value;
}
public function removeOption($option) {
unset($this->options[$option]);
}
abstract function write($message, $priority);
}

Datei anzeigen

@ -1,135 +0,0 @@
<?php
namespace ConLite\Log;
use ConLite\Exceptions\Exception;
use ConLite\Exceptions\FileNotFoundException;
use DirectoryIterator;
class LogWriterFile extends LogWriter
{
/**
* @var resource
*/
protected $handle = NULL;
/**
* @var int
*/
protected int $maxLogFileSize = 1024;
/**
* @var int
*/
protected int $maxRotationFiles = 10;
/**
* @throws FileNotFoundException
* @throws Exception
*/
public function __construct(array $options = []) {
parent::__construct($options);
$logFileSize = (int) getEffectiveSetting('log', 'writer-file-size-' . basename($this->getOption('destination')), $this->getOption('logFileSize') ?? 0);
if($logFileSize > 0) {
$this->maxLogFileSize = $logFileSize;
}
$this->createHandle();
}
/**
* @param string $message
* @param int $priority
* @return bool
*/
public function write($message, $priority): bool
{
$this->rotateLog();
return fwrite($this->handle, $message) != false;
}
public function __destruct()
{
$this->closeHandle();
}
/**
* @throws Exception
* @throws FileNotFoundException
*/
protected function createHandle(): void
{
$destination = $this->getOption('destination');
if ($destination == '') {
throw new Exception('No destination was specified.');
}
if (($this->handle = fopen($destination, 'a')) === false) {
throw new FileNotFoundException('Destination handle could not be created.');
}
}
protected function closeHandle(): void
{
fclose($this->handle);
}
protected function rotateLog()
{
$logfile = $this->getOption('destination');
if(!file_exists($logfile)) {
cWarning(__FILE__, __LINE__, 'Logfile ' . $logfile . ' not found.');
return false;
} elseif (!is_readable($logfile)) {
cWarning(__FILE__, __LINE__, 'Logfile ' . $logfile . ' not readable.');
return false;
}
if (filesize($logfile) >= $this->maxLogFileSize * 1024) {
$pathInfo = pathinfo($logfile);
$baseDirectory = $pathInfo['dirname'];
$baseName = $pathInfo['basename'];
$numMap = [];
foreach (new DirectoryIterator($baseDirectory) as $fileInfo) {
if ($fileInfo->isDot() || !$fileInfo->isFile()) {
continue;
}
if (preg_match('/^' . $baseName . '\.?([0-9]*)$/', $fileInfo->getFilename(), $matches)) {
$num = $matches[1];
$file2move = $fileInfo->getFilename();
if ($num == '') {
$num = 0;
}
$numMap[$num] = $file2move;
}
}
krsort($numMap);
foreach ($numMap as $num => $file2move) {
$targetN = $num + 1;
if($targetN > $this->maxRotationFiles) {
unlink($baseDirectory . DIRECTORY_SEPARATOR . $file2move);
continue;
}
rename($baseDirectory . DIRECTORY_SEPARATOR . $file2move, $baseDirectory . DIRECTORY_SEPARATOR .$baseName . '.' . $targetN);
}
return true;
}
return false;
}
public function getMaxLogFileSize(): int
{
return $this->maxLogFileSize;
}
public function setMaxLogFileSize(int $maxLogFileSize): void
{
$this->maxLogFileSize = $maxLogFileSize;
}
}

Datei anzeigen

@ -1,8 +0,0 @@
<?php
namespace ConLite\Log;
class ModuleLog extends Log
{
}

Datei anzeigen

@ -22,6 +22,9 @@
// include interface... // include interface...
cInclude('interfaces', 'interface.conuser.php'); cInclude('interfaces', 'interface.conuser.php');
// include exception
cInclude('exceptions', 'exception.conuser.php');
/** /**
* This abstract class implements interface iConUser and should * This abstract class implements interface iConUser and should
* be user as base class for backend user classes. * be user as base class for backend user classes.

Datei anzeigen

@ -59,6 +59,9 @@ if (! defined ( 'CON_FRAMEWORK' )) {
die ( 'Illegal call' ); die ( 'Illegal call' );
} }
// Exception classes
cInclude ( "exceptions", "exception.conuser.php" );
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System

Datei anzeigen

@ -0,0 +1,89 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Excel handling class
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.0.2
* @author Timo A. Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-06-30, Dominik Ziegler, add security fix
*
* $Id$:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
cInclude('pear', 'Spreadsheet/Excel/Writer.php');
class ExcelWorksheet
{
var $_data = array();
var $_title;
var $_filename;
function __construct ($title, $filename)
{
$this->_title = Contenido_Security::escapeDB($title, null);
$this->_filename = Contenido_Security::escapeDB($filename, null);
}
function setRow ($row)
{
$row = Contenido_Security::escapeDB($row, null);
$args = func_num_args();
for ($arg=1;$arg<$args;$arg++)
{
$ma = func_get_arg($arg);
$this->setCell($row, $arg, $ma);
}
}
function setCell($row, $cell, $data)
{
$row = Contenido_Security::escapeDB($row, null);
$cell = Contenido_Security::escapeDB($cell, null);
$data = Contenido_Security::escapeDB($data, null);
$this->_data[$row][$cell] = $data;
}
function make ()
{
$workbook = new Spreadsheet_Excel_Writer();
$workbook->send($this->_filename);
$worksheet = & $workbook->addWorksheet($this->_title);
foreach ($this->_data as $row => $line)
{
foreach ($line as $col => $coldata)
{
$worksheet->writeString($row-1, $col-1, $coldata);
}
}
$workbook->close();
}
}
?>

Datei anzeigen

@ -219,11 +219,6 @@ class cRegistry {
return self::_fetchGlobalVariable('edit', FALSE); return self::_fetchGlobalVariable('edit', FALSE);
} }
public static function getCurrentModule()
{
return self::_fetchGlobalVariable('cCurrentModule', 0);
}
/** /**
* Fetches the global variable requested. * Fetches the global variable requested.
* If variable is not set, the default value is returned. * If variable is not set, the default value is returned.
@ -251,4 +246,5 @@ class cRegistry {
return new $apiClassName($objectId); return new $apiClassName($objectId);
} }
} }
?>

Datei anzeigen

@ -51,18 +51,17 @@ class cApiCategoryLanguage extends Item {
} }
} }
public function setField($field, $value, $bSafe = true): bool public function setField($field, $value, $bSafe = true) {
{
switch ($field) { switch ($field) {
case "name": case "name":
self::setField("urlname", $value, $bSafe); $this->setField("urlname", $value);
break; break;
case "urlname": case "urlname":
$value = clHtmlSpecialChars(capiStrCleanURLCharacters($value), ENT_QUOTES); $value = clHtmlSpecialChars(capiStrCleanURLCharacters($value), ENT_QUOTES);
break; break;
} }
return parent::setField($field, $value, $bSafe); parent::setField($field, $value);
} }
public function assignTemplate($idtpl) { public function assignTemplate($idtpl) {

Datei anzeigen

@ -6,7 +6,7 @@
* *
* Description: * Description:
* cApi class * cApi class
* *
* @package Core * @package Core
* @subpackage cApi * @subpackage cApi
* @version $Rev$ * @version $Rev$
@ -16,13 +16,9 @@
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
* @link http://www.conlite.org ConLite.org * @link http://www.conlite.org ConLite.org
* *
* $Id$ * $Id$
*/ */
use ConLite\Log\LogWriter;
use ConLite\Log\Log;
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -146,15 +142,15 @@ class cApiModule extends Item {
public function createModuleFolder() { public function createModuleFolder() {
//echo $this->_aModFileEditConf['modPath']; //echo $this->_aModFileEditConf['modPath'];
$sPathErrorLog = cRegistry::getConfigValue('path', 'logs') . 'errorlog.txt'; $sPathErrorLog = cRegistry::getConfigValue('path', 'logs').'errorlog.txt';
if (is_writable($this->_aModFileEditConf['clientPath']) && !file_exists($this->_aModFileEditConf['modPath'])) { if (is_writable($this->_aModFileEditConf['clientPath']) && !file_exists($this->_aModFileEditConf['modPath'])) {
try { try {
mkdir($this->_aModFileEditConf['modPath'], 0777, true); mkdir($this->_aModFileEditConf['modPath'], 0777, true);
} catch (Exception $ex) { } catch (Exception $ex) {
$writer = LogWriter::factory("File", ['destination' => $sPathErrorLog]); $oWriter = cLogWriter::factory("File", ['destination' => $sPathErrorLog]);
$log = new Log($writer); $oLog = new cLog($oWriter);
$log->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), Log::WARN); $oLog->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
} }
} }
@ -164,9 +160,9 @@ class cApiModule extends Item {
try { try {
mkdir($this->getModulePath(), 0777); mkdir($this->getModulePath(), 0777);
} catch (Exception $ex) { } catch (Exception $ex) {
$writer = LogWriter::factory("File", ['destination' => $sPathErrorLog]); $oWriter = cLogWriter::factory("File", ['destination' => $sPathErrorLog]);
$log = new Log($writer); $oLog = new cLog($oWriter);
$log->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), Log::WARN); $oLog->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
} }
if (is_writable($this->getModulePath())) { if (is_writable($this->getModulePath())) {
@ -175,9 +171,9 @@ class cApiModule extends Item {
umask($this->_oldumask); umask($this->_oldumask);
} }
} else { } else {
$writer = LogWriter::factory("File", ['destination' => $sPathErrorLog]); $oWriter = cLogWriter::factory("File", ['destination' => $sPathErrorLog]);
$log = new Log($writer); $oLog = new cLog($oWriter);
$log->log(__FILE__ . " (" . __LINE__ . "): " . 'Error: Cannot create mod path '.$this->getModulePath(), Log::WARN); $oLog->log(__FILE__ . " (" . __LINE__ . "): " . 'Error: Cannot create mod path '.$this->getModulePath(), cLog::WARN);
} }
return FALSE; return FALSE;
} }
@ -248,8 +244,7 @@ class cApiModule extends Item {
* *
* @return array Found strings for this module * @return array Found strings for this module
*/ */
public function parseModuleForStrings(): bool|array public function parseModuleForStrings() {
{
global $cfg; global $cfg;
if ($this->virgin == true) { if ($this->virgin == true) {
return false; return false;
@ -367,7 +362,7 @@ class cApiModule extends Item {
/** /**
* Checks if the module is a pre-4.3 module * Checks if the module is a pre-4.3 module
* @return boolean true if this module is an old one * @return boolean true if this module is an old one
* *
* @deprecated since version 2.0 * @deprecated since version 2.0
*/ */
public function isOldModule() { public function isOldModule() {
@ -629,8 +624,8 @@ class cApiModule extends Item {
/** /**
* Imports a module package from a XML file Uses xmlparser and callbacks * Imports a module package from a XML file Uses xmlparser and callbacks
* *
* @param string $sFile Filename of data file (including path) * @param string $sFile Filename of data file (including path)
* @param array $aOptions Optional. An array of arrays specifying, how the items * @param array $aOptions Optional. An array of arrays specifying, how the items
* of the xml file will be imported. If specified, has to * of the xml file will be imported. If specified, has to
* contain an array of this structure: * contain an array of this structure:
* *
@ -751,8 +746,8 @@ class cApiModule extends Item {
/** /**
* Exports the specified module and attached files to a file * Exports the specified module and attached files to a file
* *
* @param string $sPackageFileName Filename to return * @param string $sPackageFileName Filename to return
* @param bool $bReturn if false, the result is immediately sent to the browser * @param bool $bReturn if false, the result is immediately sent to the browser
*/ */
public function exportPackage($sPackageFileName, $bReturn = false) { public function exportPackage($sPackageFileName, $bReturn = false) {
global $cfgClient, $client; global $cfgClient, $client;
@ -777,7 +772,7 @@ class cApiModule extends Item {
} }
// Export basic module // Export basic module
$oNodeModule = &$oRoot->appendChild("module"); $oNodeModule = & $oRoot->appendChild("module");
$oNodeModule->appendChild("name", clHtmlSpecialChars($this->get("name"))); $oNodeModule->appendChild("name", clHtmlSpecialChars($this->get("name")));
$oNodeModule->appendChild("description", clHtmlSpecialChars($this->get("description"))); $oNodeModule->appendChild("description", clHtmlSpecialChars($this->get("description")));
$oNodeModule->appendChild("type", clHtmlSpecialChars($this->get("type"))); $oNodeModule->appendChild("type", clHtmlSpecialChars($this->get("type")));
@ -799,7 +794,7 @@ class cApiModule extends Item {
unset($sContent); unset($sContent);
// Export layouts // Export layouts
$oNodeLayouts = &$oRoot->appendChild("layouts"); $oNodeLayouts = & $oRoot->appendChild("layouts");
$cApiLayoutCollection = new cApiLayoutCollection; $cApiLayoutCollection = new cApiLayoutCollection;
$cApiLayoutCollection->setWhere("idclient", $client); $cApiLayoutCollection->setWhere("idclient", $client);
@ -827,7 +822,7 @@ class cApiModule extends Item {
$iID = $oLang->get($oLang->primaryKey); $iID = $oLang->get($oLang->primaryKey);
if (in_array($iID, $aData["translations"])) { if (in_array($iID, $aData["translations"])) {
$oNodeTrans = &$oRoot->appendChild("translations"); $oNodeTrans = & $oRoot->appendChild("translations");
// This is nice, but it doesn't help so much, // This is nice, but it doesn't help so much,
// as this data is available too late on import ... // as this data is available too late on import ...
$oNodeTrans->setNodeAttribs(["origin-language-id" => $iID, "origin-language-name" => clHtmlSpecialChars($oLang->get("name"))]); $oNodeTrans->setNodeAttribs(["origin-language-id" => $iID, "origin-language-name" => clHtmlSpecialChars($oLang->get("name"))]);
@ -840,7 +835,7 @@ class cApiModule extends Item {
$oTranslations->query(); $oTranslations->query();
while ($oTranslation = $oTranslations->next()) { while ($oTranslation = $oTranslations->next()) {
$oNodeString = &$oNodeTrans->appendChild("string"); $oNodeString = & $oNodeTrans->appendChild("string");
$oNodeString->appendChild("original", clHtmlSpecialChars($oTranslation->get("original"))); $oNodeString->appendChild("original", clHtmlSpecialChars($oTranslation->get("original")));
$oNodeString->appendChild("translation", clHtmlSpecialChars($oTranslation->get("translation"))); $oNodeString->appendChild("translation", clHtmlSpecialChars($oTranslation->get("translation")));
} }
@ -865,7 +860,7 @@ class cApiModule extends Item {
/** /**
* Overridden parent method for hooking dceModFileEdit * Overridden parent method for hooking dceModFileEdit
* *
* @return void * @return void
*/ */
protected function _onLoad() { protected function _onLoad() {
@ -877,7 +872,7 @@ class cApiModule extends Item {
/** /**
* Use a PHP-file, if present, for module output * Use a PHP-file, if present, for module output
* *
* @return boolean * @return boolean
*/ */
private function _setOutputFromPhpFile() { private function _setOutputFromPhpFile() {
@ -890,7 +885,7 @@ class cApiModule extends Item {
/** /**
* Use a PHP-file, if present, for module input * Use a PHP-file, if present, for module input
* *
* @return boolean * @return boolean
*/ */
private function _setInputFromPhpFile() { private function _setInputFromPhpFile() {
@ -921,7 +916,7 @@ class cApiModule extends Item {
/** /**
* read file and set an object field * read file and set an object field
* *
* @param string $sFile * @param string $sFile
* @param string $sField * @param string $sField
*/ */
private function _setFieldFromFile($sField, $sFile): bool { private function _setFieldFromFile($sField, $sFile): bool {
@ -1034,7 +1029,7 @@ class cApiModule extends Item {
class cApiModuleTranslationCollection extends ItemCollection { class cApiModuleTranslationCollection extends ItemCollection {
protected $_error; protected $_error;
protected $f_obj; protected $f_obj;
/** /**
@ -1145,9 +1140,9 @@ class cApiModuleTranslationCollection extends ItemCollection {
$cApiModuleTranslationCollection->select("idmod = '$idmod' AND idlang='$idlang'"); $cApiModuleTranslationCollection->select("idmod = '$idmod' AND idlang='$idlang'");
$xmlTree = new XmlTree('1.0', 'ISO-8859-1'); $xmlTree = new XmlTree('1.0', 'ISO-8859-1');
$root = &$xmlTree->addRoot('module'); $root = & $xmlTree->addRoot('module');
$translation = &$root->appendChild('translation'); $translation = & $root->appendChild('translation');
$translation->setNodeAttribs(["origin-language-id" => $idlang, "origin-language-name" => $cApiLanguage->get("name")]); $translation->setNodeAttribs(["origin-language-id" => $idlang, "origin-language-name" => $cApiLanguage->get("name")]);
while ($otranslation = $cApiModuleTranslationCollection->next()) { while ($otranslation = $cApiModuleTranslationCollection->next()) {

Datei anzeigen

@ -0,0 +1,30 @@
<?php
/**
* Simple exception extension for new ConUser class.
*
* @package Contenido Backend Classes
* @subpackage Backend User
*
* @author Holger Librenz
* @version $Revision$
* @copyright four for business AG <www.4fb.de>
*
* {@internal
* created 2008-11-16, H. Librenz
* }}
*/
/**
* Simple excpetion extension for better error handling.
*
* @package Contenido Backend Classes
* @subpackage Backend User
*
* @version 1.0.0
* @author Holger Librenz
* @copyright four for business AG
*/
class ConUserException extends Exception {
}
?>

Datei anzeigen

@ -0,0 +1,393 @@
<?php
/**
* This file contains the log class.
*
* @package Core
* @subpackage Log
* @version SVN Revision $Rev$
*
* @author Dominik Ziegler
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
/**
* This class contains the main functionalities for the logging in CONTENIDO.
*
* Examples:
*
* $writer = cLogWriter::factory("File", array('destination' => 'contenido.log'));
* $log = new cLog($writer);
*
* $log->addPriority("CONTENIDO", 10);
* $log->log("Contenido Log Message.", "CONTENIDO");
* $log->contenido("Same log entry in short notation.");
* $log->removePriority("CONTENIDO");
*
* $log->emerg("System down.");
*
* $log->log('Notice Log Message', cLog::NOTICE);
*
* $log->buffer('Buffered Log Message', cLog::WARN);
* $log->commit();
*
* @package Core
* @subpackage Log
*/
class cLog {
/**
* @var int logging level
*/
const EMERG = 0;
/**
* @var int logging level
*/
const ALERT = 1;
/**
* @var int logging level
*/
const CRIT = 2;
/**
* @var int logging level
*/
const ERR = 3;
/**
* @var int logging level
*/
const WARN = 4;
/**
* @var int logging level
*/
const NOTICE = 5;
/**
* @var int logging level
*/
const INFO = 6;
/**
* @var int logging level
*/
const DEBUG = 7;
/**
* @var cLogWriter Contains the local log writer instance.
*/
protected $_writer;
/**
* @var array Contains all shortcut handlers
*/
protected $_shortcutHandlers = array();
/**
* @var array Contains all available priorities
*/
protected $_priorities = array();
/**
* @var array Contains all default priorities
*/
protected $_defaultPriorities = array();
/**
* @var array Contains all buffered messages
*/
protected $_buffer = array();
/**
* Creates a new instance of the CONTENIDO Log mechanism.
*
* The log format interface of cLog is capable of being extended by subclasses. See the note about
* the log shortcuts below.
*
*
* About Log Shortcuts
* -------------------
* Log shortcuts are placeholders which are replaced when a log entry is created. Placeholders start with a
* percentage sign (%) and contain one or more characters. Each placeholder is handled by an own function which
* decides what to do.
*
* @param mixed $writer Writer object (any subclass of cLogWriter), or false if cLog should handle the writer creation
*/
public function __construct($writer = false) {
$cfg = cRegistry::getConfig();
$createWriter = false;
if ($writer == false) {
$createWriter = true;
} else if (!is_object($writer) || ($writer instanceof cLogWriter) == false) {
cWarning(__FILE__, __LINE__, "The passed class is not a subclass of cLogWriter. Creating new one.");
$createWriter = true;
}
if ($createWriter == true) {
$options = array(
'destination' => cRegistry::getConfigValue('path', 'contenido')
.cRegistry::getConfigValue('path', 'logs')
.'contenido.log');
$writer = cLogWriter::factory("File", $options);
}
$this->setWriter($writer);
$this->setShortcutHandler("%date", array($this, "shDate"));
$this->setShortcutHandler("%level", array($this, "shLevel"));
$this->setShortcutHandler("%message", array($this, "shMessage"));
$this->getWriter()->setOption('log_format', '[%date] [%level] %message', false);
$reflection = new ReflectionClass($this);
$this->_priorities = $this->_defaultPriorities = array_flip($reflection->getConstants());
}
/**
* Returns the local writer instance.
* @return cLogWriter
*/
public function getWriter() {
return $this->_writer;
}
/**
* Sets the local writer instance.
*
* @param cLogWriter $writer Writer instacne
*/
public function setWriter(cLogWriter $writer) {
$this->_writer = $writer;
}
/**
* Defines a custom shortcut handler.
*
* Each shortcut handler receives an array with the
* message and the priority of the entry.
*
* @param string $shortcut Shortcut name
* @param string $handler Name of the function to call
* @throws cInvalidArgumentException if the given shortcut is empty or
* already in use or if the handler is not callable
* @return bool True if setting was successful
*/
public function setShortcutHandler($shortcut, $handler) {
if ($shortcut == '') {
throw new Exception('The shortcut name must not be empty.');
}
if (substr($shortcut, 0, 1) == "%") {
$shortcut = substr($shortcut, 1);
}
if (is_callable($handler) == false) {
throw new Exception('The specified shortcut handler does not exist.');
}
if (array_key_exists($shortcut, $this->_shortcutHandlers)) {
throw new Exception('The shortcut ' . $shortcut . ' is already in use!');
}
$this->_shortcutHandlers[$shortcut] = $handler;
return true;
}
/**
* Unsets a specific shortcut handler.
*
* @param string $shortcut Name of the shortcut
* @throws cInvalidArgumentException if the given shortcut handler does not
* exist
* @return boolean
*/
public function unsetShortcutHandler($shortcut) {
if (!in_array($shortcut, $this->_shortcutHandlers)) {
throw new Exception('The specified shortcut handler does not exist.');
}
unset($this->_shortcutHandlers[$shortcut]);
return true;
}
/**
* Buffers a log message for committing them on a later moment.
*
* @param string $message Message to buffer
* @param mixed $priority Priority of the log entry (optional)
*/
public function buffer($message, $priority = NULL) {
$this->_buffer[] = array($message, $priority);
}
/**
* Commits all buffered messages and empties the message buffer if parameter is not false.
*
* @param boolean $revoke Flag, whether the buffer is cleared or not (optional, default: true)
*/
public function commit($revoke = true) {
if (count($this->_buffer) == 0) {
cWarning(__FILE__, __LINE__, "There are no buffered messages to commit.");
return false;
}
foreach ($this->_buffer as $bufferInfo) {
$this->log($bufferInfo[0], $bufferInfo[1]);
}
if ($revoke == true) {
$this->revoke();
}
}
/**
* Empties the message buffer.
*/
public function revoke() {
$this->_buffer = array();
}
/**
* Logs a message using the local writer instance
*
* @param string $message Message to log
* @param mixed $priority Priority of the log entry (optional)
*/
public function log($message, $priority = NULL) {
if ($priority && is_int($priority) == false && in_array($priority, $this->_priorities)) {
$priority = array_search($priority, $this->_priorities);
}
if ($priority === NULL || array_key_exists($priority, $this->_priorities) == false) {
$priority = $this->getWriter()->getOption('default_priority');
}
$logMessage = $this->getWriter()->getOption('log_format');
$lineEnding = $this->getWriter()->getOption('line_ending');
foreach ($this->_shortcutHandlers as $shortcut => $handler) {
if (substr($shortcut, 0, 1) != "%") {
$shortcut = "%" . $shortcut;
}
$info = array(
'message' => $message,
'priority' => $priority
);
$value = call_user_func($handler, $info);
$logMessage = str_replace($shortcut, $value, $logMessage);
}
$this->getWriter()->write($logMessage . $lineEnding, $priority);
}
/**
* Adds a new priority to the log.
*
* @param string $name Name of the log priority
* @param int $value Index value of the log priority
* @throws cInvalidArgumentException if the given name is empty, already
* exists or the value already exists
*/
public function addPriority($name, $value) {
if ($name == '') {
throw new Exception('Priority name must not be empty.');
}
if (in_array($name, $this->_priorities)) {
throw new Exception('The given priority name already exists.');
}
if (array_key_exists($value, $this->_priorities)) {
throw new Exception('The priority value already exists.');
}
$this->_priorities[$value] = $name;
}
/**
* Removes a priority from log.
* Default properties can not be removed.
*
* @param string $name Name of the log priority to remove
* @throws cInvalidArgumentException if the given name is empty, does not
* exist or is a default priority
*/
public function removePriority($name) {
if ($name == '') {
throw new Exception('Priority name must not be empty.');
}
if (in_array($name, $this->_priorities) == false) {
throw new Exception('Priority name does not exist.');
}
if (in_array($name, $this->_defaultPriorities) == true) {
throw new Exception('Removing default priorities is not allowed.');
}
$priorityIndex = array_search($name, $this->_priorities);
unset($this->_priorities[$priorityIndex]);
}
/**
* Magic call method for direct priority named calls.
*
* @param string $method Name of the method
* @param array $arguments Array with the method arguments
* @throws cInvalidArgumentException if the given priority is not supported
*/
public function __call($method, $arguments) {
$priorityName = strtoupper($method);
if (in_array($priorityName, $this->_priorities) == false) {
throw new Exception('The given priority ' . $priorityName . ' is not supported.');
}
$priorityIndex = array_search($priorityName, $this->_priorities);
return $this->log($arguments[0], $priorityIndex);
}
/**
* Shortcut Handler Date.
* Returns the current date
* @return string The current date
*/
public function shDate() {
return date("Y-m-d H:i:s");
}
/**
* Shortcut Handler Level.
* Returns the canonical name of the priority.
* The canonical name is padded to 10 characters to achieve a better formatting.
* @return string The canonical log level
*/
public function shLevel($info) {
$logLevel = $info['priority'];
return str_pad($this->_priorities[$logLevel], 10, " ", STR_PAD_BOTH);
}
/**
* Shortcut Handler Message.
* Returns the log message.
* @return string The log message
*/
public function shMessage($info) {
return $info['message'];
}
}
?>

Datei anzeigen

@ -0,0 +1,67 @@
<?php
/**
* This file contains the log file writer class.
*
* @package Core
* @subpackage Log
* @version SVN Revision $Rev$
*
* @author Dominik Ziegler
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
/**
* This class contains the file writer class for the logging mechanism.
*
* @package Core
* @subpackage Log
*/
class cLogWriterFile extends cLogWriter {
/**
* @var resource Destination handle
*/
protected $_handle = NULL;
/**
* Constructor of the writer instance.
* @param array $options Array with options for the writer instance (optional)
*/
public function __construct($options = array()) {
parent::__construct($options);
$this->_createHandle();
}
/**
* Checks destination and creates the handle for the write process.
*
* @throws cException if not destination is specified
* @throws cFileNotFoundException if the destination file could not be read
*/
protected function _createHandle() {
$destination = $this->getOption('destination');
if ($destination == '') {
throw new Exception('No destination was specified.');
}
if (($this->_handle = fopen($destination, 'a')) === false) {
throw new Exception('Destination handle could not be created.');
}
}
/**
* Writes the content to file handle.
*
* @param string $message Message to write
* @param int $priority Priority of the log entry
* @return boolean State of the write process
*/
public function write($message, $priority) {
return (fwrite($this->_handle, $message) != false);
}
}

Datei anzeigen

@ -0,0 +1,127 @@
<?php
/**
* This file contains the abstract log writer class.
*
* @package Core
* @subpackage Log
* @version SVN Revision $Rev$
*
* @author Dominik Ziegler
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
/**
* This class contains the main functionalities for the logging writer in CONTENIDO.
*
* @package Core
* @subpackage Log
*/
abstract class cLogWriter {
/**
* @var array Contains all options of the current writer instance.
*/
protected $_options = array();
/**
* Constructor of the writer instance.
* @param array $options Array with options for the writer instance (optional)
*/
public function __construct($options = array()) {
$this->setOptions($options);
// Set all default options if they were not set already
$this->setOption('default_priority', cLog::INFO, false);
$this->setOption('line_ending', PHP_EOL, false);
}
/**
* Factory method for a new writer instance.
*
* @param string $writerName Name of the writer
* @param array $writerOptions Options array for the writer instance
* @throws cInvalidArgumentException if the writer class with the given name
* does not exist or is not an instance of clogWriter
* @return cLogWriter Log writer instance
*/
public static function factory($writerName, array $writerOptions) {
$logWriterClassName = 'cLogWriter' . ucfirst($writerName);
if (!class_exists($logWriterClassName)) {
throw new Exception('Unknown writer class: ' . $writerName);
}
$writer = new $logWriterClassName($writerOptions);
if (($writer instanceof cLogWriter) == false) {
throw new Exception('Provided class is not an instance of cLogWriter');
}
return $writer;
}
/**
* Sets the whole options array.
*
* @param array $options Array with options
*/
public function setOptions(array $options) {
$this->_options = $options;
}
/**
* Returns an array with all options.
* @return array Array with all options
*/
public function getOptions() {
return $this->_options;
}
/**
* Sets a option. If option was set previously, it must be forced to overwrite the value.
*
* @param string $option Name of the option
* @param mixed $value Value of the option
* @param boolean $force Flag to force setting the option value (optional, default: false)
*/
public function setOption($option, $value, $force = false) {
if ($force == false && isset($this->_options[$option]) == true) {
return;
}
$this->_options[$option] = $value;
}
/**
* Returns the value of an option entry.
*
* @param string $option Name of the option
*
* @return mixed Value of the option entry
*/
public function getOption($option) {
return $this->_options[$option];
}
/**
* Removes an option entry.
*
* @param string $option Name of the option
*/
public function removeOption($option) {
unset($this->_options[$option]);
}
/**
* Abstract function for the write process.
* This method must be implemented in the specific writer.
*
* @param string $message Message to write
* @param int $priority Priority of the log entry
*
* @return boolean State of the write process
*/
abstract function write($message, $priority);
}

Datei anzeigen

@ -0,0 +1,90 @@
<?php
/**
* This file contains the module log class.
*
* @package Core
* @subpackage Log
* @version SVN Revision $Rev$
*
* @author Dominik Ziegler
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
/**
* This class contains the main functionalities for the module logging in
* CONTENIDO.
* The funcationality is almost the same like normal logging with the exception,
* that log entries contains an additional information about the used module.
*
* Example:
* $writer = cLogWriter::factory("File", array('destination' =>
* 'contenido.log'));
*
* $log = new cModuleLog($writer);
* $log->setModule(1);
* $log->log("Anything you want to log.");
*
* @package Core
* @subpackage Log
*/
class cModuleLog extends cLog {
/**
* @var cApiModule instance of module model
*/
private $_module;
/**
* Constructor of the module log.
*
* @param mixed $writer Writer object (any subclass of cLogWriter), or false
* if cLog should handle the writer creation
*
*/
public function __construct($writer = false) {
parent::__construct($writer);
$this->setShortcutHandler('module', array(
$this,
'shModule'
));
$this->getWriter()->setOption("log_format", "[%date] [%level] [%module] %message", true);
}
/**
* Sets the module to use.
*
* setModule automatically buffers basic module information to the log to
* assist the developer in debugging his modules.
*
* @param int $idmod The module ID to use
* @throws cException if the module with the given idmod could not be loaded
*/
public function setModule($idmod) {
$this->_module = new cApiModule($idmod);
if ($this->_module->isLoaded() == false) {
throw new Exception('Could not load module information.');
}
}
/**
* Shortcut Handler Module.
* Returns the ID and the name of the module.
*
* @return string ID and name of the module
*/
public function shModule() {
if ($this->_module->isLoaded() == false) {
return '';
}
return $this->_module->get("idmod") . ": " . $this->_module->get("name");
}
}
?>

Datei anzeigen

@ -25,26 +25,27 @@ if (!defined("CON_FRAMEWORK")) {
// Contenido startup process // Contenido startup process
include_once ('../includes/startup.php'); include_once ('../includes/startup.php');
$classPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'classes'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
$includesPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'includes'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
include_once ($classPath . 'class.user.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
include_once ($classPath . 'class.xml.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
include_once ($classPath . 'class.navigation.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
include_once ($classPath . 'template/class.template.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
include_once ($classPath . 'class.backend.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
include_once ($classPath . 'class.table.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
include_once ($classPath . 'class.notification.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
include_once ($classPath . 'class.area.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
include_once ($classPath . 'class.layout.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
include_once ($classPath . 'class.client.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
include_once ($classPath . 'class.cat.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.con.php');
include_once ($classPath . 'class.treeitem.php');
include_once ($includesPath . 'cfg_language_de.inc.php');
include_once ($includesPath . 'functions.con.php');
if(!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") { if(!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") {
$db = new DB_ConLite; $db = new DB_ConLite;
conFlagOnOffline(); conFlagOnOffline();
conMoveArticles(); conMoveArticles();
} }
?>

Datei anzeigen

@ -25,23 +25,20 @@ if (!defined("CON_FRAMEWORK")) {
// Contenido startup process // Contenido startup process
include_once ('../includes/startup.php'); include_once ('../includes/startup.php');
$classPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'classes'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
$includesPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'includes'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
include_once ($classPath . 'class.user.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
include_once ($classPath . 'class.xml.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
include_once ($classPath . 'class.navigation.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
include_once ($classPath . 'template/class.template.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
include_once ($classPath . 'class.backend.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
include_once ($classPath . 'class.table.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
include_once ($classPath . 'class.notification.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
include_once ($classPath . 'class.area.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
include_once ($classPath . 'class.layout.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
include_once ($classPath . 'class.client.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
include_once ($classPath . 'class.cat.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.stat.php');
include_once ($classPath . 'class.treeitem.php');
include_once ($includesPath . 'cfg_language_de.inc.php');
include_once ($includesPath . 'functions.stat.php');
if (!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") if (!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs")
{ {
@ -60,4 +57,5 @@ if (!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs")
statsArchive(sprintf("%04d%02d",$year,$month)); statsArchive(sprintf("%04d%02d",$year,$month));
} }
?>

Datei anzeigen

@ -25,41 +25,37 @@ if (!defined("CON_FRAMEWORK")) {
// Contenido startup process // Contenido startup process
include_once ('../includes/startup.php'); include_once ('../includes/startup.php');
$classPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'classes'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
$includesPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'includes'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
include_once ($classPath . 'class.user.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
include_once ($classPath . 'class.xml.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
include_once ($classPath . 'class.navigation.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
include_once ($classPath . 'template/class.template.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
include_once ($classPath . 'class.backend.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
include_once ($classPath . 'class.table.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
include_once ($classPath . 'class.notification.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
include_once ($classPath . 'class.area.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
include_once ($classPath . 'class.layout.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
include_once ($classPath . 'class.client.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
include_once ($classPath . 'class.cat.php'); include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.stat.php');
include_once ($classPath . 'class.treeitem.php');
include_once ($includesPath . 'cfg_language_de.inc.php');
include_once ($includesPath . 'functions.stat.php');
global $cfg; global $cfg;
if(!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") { if(!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") {
$db = new DB_ConLite; $db = new DB_ConLite;
$tables = cRegistry::getConfigValue('tab'); foreach ($cfg["tab"] as $key => $value)
foreach ($tables as $key => $value)
{ {
$sql = "OPTIMIZE TABLE ".$value; $sql = "OPTIMIZE TABLE ".$value;
$db->query($sql); $db->query($sql);
} }
if (cRegistry::getConfigValue('statistics_heap_table')) { if ($cfg["statistics_heap_table"]) {
$sHeapTable = cRegistry::getConfigValue('tab', 'stat_heap_table'); $sHeapTable = $cfg['tab']['stat_heap_table'];
buildHeapTable ($sHeapTable, $db); buildHeapTable ($sHeapTable, $db);
} }
} }
?>

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -2,15 +2,18 @@
/** /**
* *
* @package ConLite\Includes\Plugin\Config * @package Includes
* @subpackage Plugins
* @version $Rev$
* @since 2.0 * @since 2.0
* @author Ortwin Pinke <o.pinke@conlite.org> * @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2015, conlite.org * @copyright (c) 2015, conlite.org
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
* @link http://www.conlite.org ConLite.org * @link http://www.conlite.org ConLite.org
*
* $Id$:
*/ */
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
$bDebug = FALSE; $bDebug = FALSE;

Datei anzeigen

@ -0,0 +1,132 @@
<?php
/**
* Description:
* Fix functions for PHP 5.4
*
* @package Core
* @subpackage CL-Includes
* @author Ortwin Pinke <ortwin.pinke@conlite.org>
* @copyright (c) 2014, www.conlite.org
* @version $Rev$
*
* $Id$
*/
// security
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
*
* @return string
*/
function clCheckForPhp54() {
if(!defined("CL_PHP54")) {
/**
* PHP-version equal or greater PHP 5.4
* @constant CL_PHP54 phpversion >= 5.4
*/
define('CL_PHP54', version_compare(PHP_VERSION, '5.4.0', '>=') ? 1:0);
}
return CL_PHP54;
}
function clPhp54FixedFunc($funcname, $value, $flags = '', $encoding = '') {
if(clCheckForPhp54()) {
if($funcname == "get_html_translation_table") {
$value = ($value == '') ? HTML_SPECIALCHARS : $value;
}
$flags = (empty($flags))?ENT_COMPAT|ENT_HTML401:$flags;
$encoding = (empty($encoding))?'ISO-8859-1':$encoding;
} else {
$flags = (empty($flags))?ENT_COMPAT:$flags;
}
if($funcname == "get_html_translation_table") {
return $funcname($value, $flags);
} else {
return $funcname($value, $flags, $encoding);
}
}
/**
*
* @uses clPhp54FixedFunc multi fix func for PHP5.4
* @author Ortwin Pinke <ortwinpinke@conlite.org>
*
* @param string $value
* @param mixed $flags
* @param string $encoding
* @return string
*/
/*
function clHtmlSpecialChars($value, $flags = '', $encoding = '') {
return clPhp54FixedFunc("htmlspecialchars", $value, $flags, $encoding);
}
*/
/**
*
* @uses clPhp54FixedFunc multi fix func for PHP5.4
* @author Ortwin Pinke <ortwinpinke@conlite.org>
*
* @param string $value
* @param mixed $flags
* @param string $encoding
* @return string
*/
/*
function clHtmlEntityDecode($value, $flags = '', $encoding = '') {
return clPhp54FixedFunc("html_entity_decode", $value, $flags, $encoding);
}
*
*/
/**
*
* @uses clPhp54FixedFunc multi fix func for PHP5.4
* @author Ortwin Pinke <ortwinpinke@conlite.org>
*
* @param string $value
* @param mixed $flags
* @param string $encoding
* @return string
*/
/*
function clHtmlEntities($value, $flags = '', $encoding = '') {
return clPhp54FixedFunc("htmlentities", $value, $flags, $encoding);
}
*
*/
/**
*
* @uses clPhp54FixedFunc multi fix func for PHP5.4
* @author Ortwin Pinke <ortwinpinke@conlite.org>
*
* @param string $table
* @param mixed $flags
* @return string
*/
/*
function clGetHtmlTranslationTable($table = '', $flags = '') {
return clPhp54FixedFunc("get_html_translation_table", $table, $flags);
}
*
*/
// hold old functions from con 4.8 but use new ConLite functions, mark them as deprecated
/**
* Use compatible clHtmlSpecialChars instead
* @deprecated since version 2.0
*/
/**
if (function_exists('conHtmlSpecialChars') == false) {
function conHtmlSpecialChars($value, $flags = '', $encoding = '') {
return clHtmlSpecialChars($value, $flags, $encoding);
}
}
*
*/

Datei anzeigen

@ -0,0 +1,38 @@
<?php
/**
* PHP 7.3 functions for older PHP versions
*
* @package Core
* @subpackage functions
* @version $Rev$
* @since 2.0.3
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2019, conlite.org
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
* @link http://www.conlite.org ConLite.org
*
* $Id$
*/
// security check
defined('CON_FRAMEWORK') or die('Illegal call');
if (!function_exists('is_countable')) {
/**
* Verify that the contents of a variable is a countable value
* <p>Verify that the contents of a variable is an <code>array</code> or an object implementing Countable</p>
* @param mixed $var <p>The value to check</p>
* @return bool <p>Returns <b><code>TRUE</code></b> if <code>var</code> is countable, <b><code>FALSE</code></b> otherwise.</p>
* @link http://php.net/manual/en/function.is-countable.php
*
* @param Countable $var
* @return boolean
*/
function is_countable($var) {
return (is_array($var) || $var instanceof Countable);
}
}

Datei anzeigen

@ -1,15 +1,15 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
* *
* Description: * Description:
* Module translation editor * Module translation editor
* *
* Requirements: * Requirements:
* @con_php_req 5.0 * @con_php_req 5.0
* *
* *
* @package Contenido Backend includes * @package Contenido Backend includes
* @version 1.1.3 * @version 1.1.3
@ -19,15 +19,15 @@
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
* @since file available since contenido release <= 4.6 * @since file available since contenido release <= 4.6
* *
* {@internal * {@internal
* created unknown * created unknown
* modified 2008-06-27, Frederic Schneider, add security fix * modified 2008-06-27, Frederic Schneider, add security fix
* modified 2010-09-22, Murat Purc, Fixed setting of wrong initial translation id [#CON-347] * modified 2010-09-22, Murat Purc, Fixed setting of wrong initial translation id [#CON-347]
* *
* $Id$: * $Id$:
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
@ -38,11 +38,11 @@ $langobj = new cApiLanguage($lang);
$langstring = $langobj->get("name") . ' (' . $lang . ')'; $langstring = $langobj->get("name") . ' (' . $lang . ')';
$moduletranslations = new cApiModuleTranslationCollection(); $moduletranslations = new cApiModuleTranslationCollection;
$module = new cApiModule($idmod); $module = new cApiModule($idmod);
if ($action == "mod_translation_save") { if ($action == "mod_translation_save") {
$strans = new cApiModuleTranslation(); $strans = new cApiModuleTranslation;
$strans->loadByPrimaryKey($idmodtranslation); $strans->loadByPrimaryKey($idmodtranslation);
if ($strans->get("idmod") == $idmod) { if ($strans->get("idmod") == $idmod) {
@ -97,7 +97,7 @@ if ($mtrans->get("idmod") != $idmod) {
if (is_object($mtrans)) { if (is_object($mtrans)) {
$idmodtranslation = $mtrans->get("idmodtranslation"); $idmodtranslation = $mtrans->get("idmodtranslation");
} else { } else {
$mtrans = new cApiModuleTranslation(); $mtrans = new cApiModuleTranslation;
} }
} }
@ -138,9 +138,9 @@ $ilink->setCustom("idmod", $idmod);
$ilink->setCustom("idmodtranslation", $mtrans->get("idmodtranslation")); $ilink->setCustom("idmodtranslation", $mtrans->get("idmodtranslation"));
$ilink->setAnchor($mtrans->get("idmodtranslation")); $ilink->setAnchor($mtrans->get("idmodtranslation"));
$iframe = '<iframe style="border: 1px;border-color: black; border-style: solid;" width="620" src="' . $ilink->getHREF() . '"></iframe>'; $iframe = '<iframe frameborder="0" style="border: 1px;border-color: black; border-style: solid;" width="620" src="' . $ilink->getHREF() . '"></iframe>';
$table = '<table><tr><td width="50%">' . i18n("Original module string") . '</td><td width="50%">' . sprintf(i18n("Translation for %s"), $langstring) . '</td><td width="20">&nbsp;</td></tr><tr><td colspan="3">' . $iframe . '</td></tr>'; $table = '<table border="0" width="600" border="0"><tr><td width="50%">' . i18n("Original module string") . '</td><td width="50%">' . sprintf(i18n("Translation for %s"), $langstring) . '</td><td width="20">&nbsp;</td></tr><tr><td colspan="3">' . $iframe . '</td></tr>';
$original = new cHTMLTextarea("t_orig", clHtmlSpecialChars($mtrans->get("original"))); $original = new cHTMLTextarea("t_orig", clHtmlSpecialChars($mtrans->get("original")));
$original->setStyle("width: 300px;"); $original->setStyle("width: 300px;");
@ -166,7 +166,7 @@ $import->setChecked("checked");
$form2 = new UI_Table_Form("export"); $form2 = new UI_Table_Form("export");
$form2->setVar("action", "mod_importexport_translation"); $form2->setVar("action", "mod_importexport_translation");
$form2->addHeader("Import/Export"); $form2->addHeader("Import/Export");
$form2->add(i18n("Mode"), [$export, "<br>", $import]); $form2->add(i18n("Mode"), array($export, "<br>", $import));
$form2->add(i18n("File"), $upload, "vupload"); $form2->add(i18n("File"), $upload, "vupload");
$form2->setVar("area", $area); $form2->setVar("area", $area);
$form2->setVar("frame", $frame); $form2->setVar("frame", $frame);

Datei anzeigen

@ -1,15 +1,15 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
* *
* Description: * Description:
* Stringlist for module translation * Stringlist for module translation
* *
* Requirements: * Requirements:
* @con_php_req 5.0 * @con_php_req 5.0
* *
* *
* @package Contenido Backend includes * @package Contenido Backend includes
* @version 1.0.1 * @version 1.0.1
@ -19,14 +19,14 @@
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
* @since file available since contenido release <= 4.6 * @since file available since contenido release <= 4.6
* *
* {@internal * {@internal
* created unknown * created unknown
* modified 2008-06-27, Frederic Schneider, add security fix * modified 2008-06-27, Frederic Schneider, add security fix
* *
* $Id$: * $Id$:
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
@ -41,7 +41,7 @@ $page->setHtml5();
$page->setEncoding('UTF-8'); $page->setEncoding('UTF-8');
$page->setMargin(0); $page->setMargin(0);
$v = '<table>'; $v = '<table cellspacing="0" cellpadding="0" width="600">';
$link = new cHTMLLink; $link = new cHTMLLink;
$link->setCLink("mod_translate", 4, ""); $link->setCLink("mod_translate", 4, "");
@ -71,12 +71,12 @@ while ($translation = $translations->next()) {
if ($idmodtranslation == $translation->get("idmodtranslation")) { if ($idmodtranslation == $translation->get("idmodtranslation")) {
$bgcol = $cfg["color"]["table_active"]; $bgcol = $cfg["color"]["table_active"];
} }
$v .= '<tr bgcolor="' . $bgcol . '">' . "\n" $v .= '<tr bgcolor="' . $bgcol . '">'."\n"
. '<td style="padding-left: 2px; padding-top:2px; padding-bottom: 2px;" width="50%">' . "\n" . '<td style="padding-left: 2px; padding-top:2px; padding-bottom: 2px;" width="50%">'."\n"
. '<a name="' . $translation->get("idmodtranslation") . '"></a>' . "\n" . '<a name="' . $translation->get("idmodtranslation") . '"></a>'."\n"
. $mylink->render() . '</td>' . "\n" . $mylink->render() . '</td>'."\n"
. '<td style="padding-left: 2px;">' . $tstring . '</td>' . "\n" . '<td style="padding-left: 2px;">' . $tstring . '</td>'."\n"
. '</tr>' . "\n"; . '</tr>'."\n";
} }
$v .= '</table>'; $v .= '</table>';
@ -86,4 +86,5 @@ $page->setContent($v);
$clang = new cApiLanguage($lang); $clang = new cApiLanguage($lang);
$page->setEncoding($clang->get("encoding")); $page->setEncoding($clang->get("encoding"));
$page->render(); $page->render();
?>

Datei anzeigen

@ -116,10 +116,10 @@ if ($action == "upl_delete") {
if (is_dbfs($path)) { if (is_dbfs($path)) {
$dbfs->remove($path . "/."); $dbfs->remove($path . "/.");
} else { } else {
$failedFiles = [];
/* Check for files */ /* Check for files */
if (uplHasFiles($path)) { if (uplHasFiles($path)) {
$failedFiles = array();
$directory = opendir($cfgClient[$client]["upl"]["path"] . $path); $directory = opendir($cfgClient[$client]["upl"]["path"] . $path);
while (false !== ($dir_entry = readdir($directory))) { while (false !== ($dir_entry = readdir($directory))) {
if ($dir_entry != "." && $dir_entry != "..") { if ($dir_entry != "." && $dir_entry != "..") {
@ -132,11 +132,11 @@ if ($action == "upl_delete") {
} }
} }
if ($failedFiles !== []) { if (count($failedFiles) > 0) {
$notification->displayNotification("warning", i18n("Failed to delete the following files:") . "<br><br>" . implode("<br>", $failedFiles)); $notification->displayNotification("warning", i18n("Failed to delete the following files:") . "<br><br>" . implode("<br>", $failedFiles));
} else { } else {
$res = @rmdir($cfgClient[$client]['upl']['path'] . $path); $res = @ rmdir($cfgClient[$client]['upl']['path'] . $path);
if (!$res) { if ($res == false) {
$notification->displayNotification("warning", sprintf(i18n("Failed to remove directory %s"), $path)); $notification->displayNotification("warning", sprintf(i18n("Failed to remove directory %s"), $path));
} }
} }

Datei anzeigen

@ -107,9 +107,6 @@
* ************************************************************************* */ * ************************************************************************* */
use ConLite\Log\Log;
use ConLite\Log\LogWriter;
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -185,8 +182,7 @@ chdir($PC_reqDir);
if ($PC_debug) if ($PC_debug)
echo "\n</pre>"; echo "\n</pre>";
function logMessage($msg, $PC_writeDir, $PC_useLog, $PC_debug): void function logMessage($msg, $PC_writeDir, $PC_useLog, $PC_debug) {
{
$oCronLog = new cCronJob(); $oCronLog = new cCronJob();
$oCronLog->useCronLog($PC_useLog); $oCronLog->useCronLog($PC_useLog);
$oCronLog->logMessages($msg); $oCronLog->logMessages($msg);
@ -197,22 +193,20 @@ function logMessage($msg, $PC_writeDir, $PC_useLog, $PC_debug): void
} }
} }
function lTrimZeros($number) function lTrimZeros($number) {
{
/* /*
while ($number[0] == '0') { while ($number[0] == '0') {
$number = substr($number, 1); $number = substr($number, 1);
} }
* *
*/ */
$number = intval(ltrim($number, '0')); $number = intval(ltrim($number, '0'));
return (is_numeric($number)) ? $number : 0; return (is_numeric($number))?$number:0;
} }
function parseElement($element, &$targetArray, $numberOfElements) function parseElement($element, &$targetArray, $numberOfElements) {
{
$subelements = explode(",", $element); $subelements = explode(",", $element);
for ($i = 0; $i < $numberOfElements; $i++) { for ($i = 0; $i < $numberOfElements; $i++) {
@ -241,8 +235,7 @@ function parseElement($element, &$targetArray, $numberOfElements)
} }
} }
function decDate(&$dateArr, $amount, $unit, $PC_debug) function decDate(&$dateArr, $amount, $unit, $PC_debug) {
{
if ($PC_debug) if ($PC_debug)
echo sprintf("Decreasing from %02d.%02d. %02d:%02d by %d %6s ", $dateArr[mday], $dateArr[mon], $dateArr[hours], $dateArr[minutes], $amount, $unit); echo sprintf("Decreasing from %02d.%02d. %02d:%02d by %d %6s ", $dateArr[mday], $dateArr[mon], $dateArr[hours], $dateArr[minutes], $amount, $unit);
@ -256,11 +249,11 @@ function decDate(&$dateArr, $amount, $unit, $PC_debug)
$dateArr["wday"] += 7; $dateArr["wday"] += 7;
} }
if ($dateArr["mday"] < 1) { if ($dateArr["mday"] < 1) {
$dateArr["mon"]--; $dateArr["mon"] --;
switch ($dateArr["mon"]) { switch ($dateArr["mon"]) {
case 0: case 0:
$dateArr["mon"] = 12; $dateArr["mon"] = 12;
$dateArr["year"]--; $dateArr["year"] --;
// fall through // fall through
case 1: case 1:
case 3: case 3:
@ -288,29 +281,28 @@ function decDate(&$dateArr, $amount, $unit, $PC_debug)
} else { } else {
$dateArr["minutes"] = 59; $dateArr["minutes"] = 59;
$dateArr["seconds"] = 59; $dateArr["seconds"] = 59;
$dateArr["hours"]--; $dateArr["hours"] --;
} }
} elseif ($unit == "minute") { } elseif ($unit == "minute") {
if ($dateArr["minutes"] == 0) { if ($dateArr["minutes"] == 0) {
decDate($dateArr, 1, "hour", $PC_debug); decDate($dateArr, 1, "hour", $PC_debug);
} else { } else {
$dateArr["seconds"] = 59; $dateArr["seconds"] = 59;
$dateArr["minutes"]--; $dateArr["minutes"] --;
} }
} }
if ($PC_debug) if ($PC_debug)
echo sprintf("to %02d.%02d. %02d:%02d\n", $dateArr[mday], $dateArr[mon], $dateArr[hours], $dateArr[minutes]); echo sprintf("to %02d.%02d. %02d:%02d\n", $dateArr[mday], $dateArr[mon], $dateArr[hours], $dateArr[minutes]);
} }
function getLastScheduledRunTime($job, $PC_debug) function getLastScheduledRunTime($job, $PC_debug) {
{
$dateArr = getdate(); $dateArr = getdate();
$minutesBack = 0; $minutesBack = 0;
while ( while (
$minutesBack < 525600 and (!$job[PC_MINUTE][$dateArr["minutes"]] or !$job[PC_HOUR][$dateArr["hours"]] or (!$job[PC_DOM][$dateArr["mday"]] or !$job[PC_DOW][$dateArr["wday"]]) or !$job[PC_MONTH][$dateArr["mon"]]) $minutesBack < 525600 AND ( !$job[PC_MINUTE][$dateArr["minutes"]] OR ! $job[PC_HOUR][$dateArr["hours"]] OR ( !$job[PC_DOM][$dateArr["mday"]] OR ! $job[PC_DOW][$dateArr["wday"]]) OR ! $job[PC_MONTH][$dateArr["mon"]])
) { ) {
if (!$job[PC_DOM][$dateArr["mday"]] or !$job[PC_DOW][$dateArr["wday"]]) { if (!$job[PC_DOM][$dateArr["mday"]] OR ! $job[PC_DOW][$dateArr["wday"]]) {
decDate($dateArr, 1, "mday", $PC_debug); decDate($dateArr, 1, "mday", $PC_debug);
$minutesBack += 1440; $minutesBack += 1440;
continue; continue;
@ -333,15 +325,13 @@ function getLastScheduledRunTime($job, $PC_debug)
return mktime($dateArr["hours"], $dateArr["minutes"], 0, $dateArr["mon"], $dateArr["mday"], $dateArr["year"]); return mktime($dateArr["hours"], $dateArr["minutes"], 0, $dateArr["mon"], $dateArr["mday"], $dateArr["year"]);
} }
function getJobFileName($jobname, $PC_writeDir) function getJobFileName($jobname, $PC_writeDir) {
{
$jobfile = $PC_writeDir . urlencode($jobname) . ".job"; $jobfile = $PC_writeDir . urlencode($jobname) . ".job";
return $jobfile; return $jobfile;
} }
function getLastActialRunTime($jobname, $PC_writeDir) function getLastActialRunTime($jobname, $PC_writeDir) {
{
$jobfile = getJobFileName($jobname, $PC_writeDir); $jobfile = getJobFileName($jobname, $PC_writeDir);
if (file_exists($jobfile)) { if (file_exists($jobfile)) {
@ -355,8 +345,7 @@ function getLastActialRunTime($jobname, $PC_writeDir)
return 0; return 0;
} }
function markLastRun($jobname, $lastRun, $PC_writeDir) function markLastRun($jobname, $lastRun, $PC_writeDir) {
{
$jobfile = getJobFileName($jobname, $PC_writeDir); $jobfile = getJobFileName($jobname, $PC_writeDir);
@ -368,13 +357,12 @@ function markLastRun($jobname, $lastRun, $PC_writeDir)
} }
} }
function runJob($job, $PC_jobDir, $PC_writeDir, $PC_useLog, $PC_debug = false) function runJob($job, $PC_jobDir, $PC_writeDir, $PC_useLog, $PC_debug = false) {
{
global $cfg, $sess, $PC_logDir; global $cfg, $sess, $PC_logDir;
if (!is_writable($PC_writeDir)) { if (!is_writable($PC_writeDir)) {
return false; return false;
} }
$extjob = array(); $extjob = Array();
$jobfile = getJobFileName($job[PC_CMD], $PC_writeDir); $jobfile = getJobFileName($job[PC_CMD], $PC_writeDir);
parseElement($job[PC_MINUTE], $extjob[PC_MINUTE], 60); parseElement($job[PC_MINUTE], $extjob[PC_MINUTE], 60);
parseElement($job[PC_HOUR], $extjob[PC_HOUR], 24); parseElement($job[PC_HOUR], $extjob[PC_HOUR], 24);
@ -388,9 +376,9 @@ function runJob($job, $PC_jobDir, $PC_writeDir, $PC_useLog, $PC_debug = false)
//echo "LastSch: " . $lastScheduled . " ::: LastAct: " . $lastActual . "\n"; //echo "LastSch: " . $lastScheduled . " ::: LastAct: " . $lastActual . "\n";
if ($lastScheduled > $lastActual) { if ($lastScheduled > $lastActual) {
logMessage("Running " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug); logMessage("Running " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug);
logMessage("Last run: " . date("r", $lastActual), $PC_writeDir, $PC_useLog, $PC_debug); logMessage(" Last run: " . date("r", $lastActual), $PC_writeDir, $PC_useLog, $PC_debug);
logMessage("Last scheduled: " . date("r", $lastScheduled), $PC_writeDir, $PC_useLog, $PC_debug); logMessage(" Last scheduled: " . date("r", $lastScheduled), $PC_writeDir, $PC_useLog, $PC_debug);
markLastRun($job[PC_CMD], $lastScheduled, $PC_writeDir); markLastRun($job[PC_CMD], $lastScheduled, $PC_writeDir);
if ($PC_debug) { if ($PC_debug) {
@ -405,28 +393,27 @@ function runJob($job, $PC_jobDir, $PC_writeDir, $PC_useLog, $PC_debug = false)
$sess->thaw(); $sess->thaw();
} }
} }
logMessage("Completed " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug); logMessage("Completed " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug);
return true; return true;
} else { } else {
if ($PC_debug) { if ($PC_debug) {
logMessage("Skipping " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug); logMessage("Skipping " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug);
logMessage("Last run: " . date("r", $lastActual), $PC_writeDir, $PC_useLog, $PC_debug); logMessage(" Last run: " . date("r", $lastActual), $PC_writeDir, $PC_useLog, $PC_debug);
logMessage("Last scheduled: " . date("r", $lastScheduled), $PC_writeDir, $PC_useLog, $PC_debug); logMessage(" Last scheduled: " . date("r", $lastScheduled), $PC_writeDir, $PC_useLog, $PC_debug);
logMessage("Completed " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug); logMessage("Completed " . $job[PC_CRONLINE], $PC_writeDir, $PC_useLog, $PC_debug);
} }
return false; return false;
} }
} }
function parseCronFile($PC_cronTabFile, $PC_debug) function parseCronFile($PC_cronTabFile, $PC_debug) {
{
$file = @file($PC_cronTabFile); $file = @file($PC_cronTabFile);
$job = []; $job = Array();
$jobs = []; $jobs = Array();
if (!is_countable($file)) { if(!is_countable($file)) {
return $jobs; return $jobs;
} }
for ($i = 0; $i < count($file); $i++) { for ($i = 0; $i < count($file); $i++) {
if ($file[$i][0] != '#') { if ($file[$i][0] != '#') {
// old regex, without dow abbreviations: // old regex, without dow abbreviations:
@ -434,9 +421,9 @@ function parseCronFile($PC_cronTabFile, $PC_debug)
if (preg_match("~^([-0-9,/*]+)\\s+([-0-9,/*]+)\\s+([-0-9,/*]+)\\s+([-0-9,/*]+)\\s+([-0-7,/*]+|(-|/|Sun|Mon|Tue|Wed|Thu|Fri|Sat)+)\\s+([^#]*)(#.*)?$~i", $file[$i], $job)) { if (preg_match("~^([-0-9,/*]+)\\s+([-0-9,/*]+)\\s+([-0-9,/*]+)\\s+([-0-9,/*]+)\\s+([-0-7,/*]+|(-|/|Sun|Mon|Tue|Wed|Thu|Fri|Sat)+)\\s+([^#]*)(#.*)?$~i", $file[$i], $job)) {
$jobNumber = count($jobs); $jobNumber = count($jobs);
$jobs[$jobNumber] = $job; $jobs[$jobNumber] = $job;
if ($jobs[$jobNumber][PC_DOW][0] != '*' and !is_numeric($jobs[$jobNumber][PC_DOW])) { if ($jobs[$jobNumber][PC_DOW][0] != '*' AND ! is_numeric($jobs[$jobNumber][PC_DOW])) {
$jobs[$jobNumber][PC_DOW] = str_replace( $jobs[$jobNumber][PC_DOW] = str_replace(
array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"), array(0, 1, 2, 3, 4, 5, 6), $jobs[$jobNumber][PC_DOW]); Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"), Array(0, 1, 2, 3, 4, 5, 6), $jobs[$jobNumber][PC_DOW]);
} }
$jobs[$jobNumber][PC_CMD] = trim($job[PC_CMD]); $jobs[$jobNumber][PC_CMD] = trim($job[PC_CMD]);
$jobs[$jobNumber][PC_CRONLINE] = $file[$i]; $jobs[$jobNumber][PC_CRONLINE] = $file[$i];
@ -449,41 +436,32 @@ function parseCronFile($PC_cronTabFile, $PC_debug)
return $jobs; return $jobs;
} }
class cCronJob class cCronJob {
{
protected string $_sCronTabFileName = "crontab.txt"; protected $_sCronTabFileName = "crontab.txt";
protected string $_sCronTabLocalFileName = "crontab.local.txt"; protected $_sCronTabLocalFileName = "crontab.local.txt";
protected string $_sLogFileName = "pseudo-cron.log"; protected $_sLogFileName = "pseudo-cron.log";
protected string $_sJobDir; protected $_sJobDir;
protected string|array|null $_sCronDir; protected $_sCronDir;
protected string|array|null $_sLogDir; protected $_sLogDir;
private bool $_bUseLog; private $_bUseLog;
private int $_iMaxLogFileSize = 1024; private $_iMaxLogFileSize = 1024;
public function __construct() public function __construct() {
{
$this->_sJobDir = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'cronjobs'); $this->_sJobDir = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'cronjobs');
$this->_sCronDir = cRegistry::getConfigValue('path', 'conlite_cronlog'); $this->_sCronDir = cRegistry::getConfigValue('path', 'conlite_cronlog');
$this->_sLogDir = cRegistry::getConfigValue('path', 'conlite_logs'); $this->_sLogDir = cRegistry::getConfigValue('path', 'conlite_logs');
} }
public function runJob() public function runJob() {
{
} }
public function useCronLog($bUse = TRUE): void public function useCronLog($bUse = TRUE) {
{
$this->_bUseLog = boolval($bUse); $this->_bUseLog = boolval($bUse);
} }
/** public function logMessages($sMsg) {
* @throws \ConLite\Exceptions\InvalidArgumentException
*/
public function logMessages($sMsg): void
{
if (!$this->_bUseLog) { if (!$this->_bUseLog) {
return; return;
} }
@ -496,9 +474,44 @@ class cCronJob
return; return;
} }
$writer = LogWriter::factory('File', ['destination' => $logfile]); if ($sMsg[strlen($sMsg) - 1] != "\n") {
$log = new Log($writer); $sMsg .= "\r\n";
$log->addPriority('CRON', 200); }
$log->log($sMsg, 'CRON'); $this->_rotateLogFiles($logfile);
file_put_contents($logfile, $sMsg, FILE_APPEND);
} }
}
private function _rotateLogFiles($sLogFile) {
if (file_exists($sLogFile) &&
filesize($sLogFile) >= $this->_iMaxLogFileSize * 1024) {
// rotate
$path_info = pathinfo($sLogFile);
$base_directory = $path_info['dirname'];
$base_name = $path_info['basename'];
$num_map = array();
foreach (new DirectoryIterator($base_directory) as $fInfo) {
if ($fInfo->isDot() || !$fInfo->isFile()) {
continue;
}
if (preg_match('/^' . $base_name . '\.?([0-9]*)$/', $fInfo->getFilename(), $matches)) {
$num = $matches[1];
$file2move = $fInfo->getFilename();
if ($num == '') {
$num = 0;
}
$num_map[$num] = $file2move;
}
}
krsort($num_map);
foreach ($num_map as $num => $file2move) {
$targetN = $num + 1;
if($targetN > 10) {
unlink($base_directory . DIRECTORY_SEPARATOR . $file2move);
continue;
}
rename($base_directory . DIRECTORY_SEPARATOR . $file2move, $base_directory . DIRECTORY_SEPARATOR .$base_name . '.' . $targetN);
}
}
}
}
?>

Datei anzeigen

@ -75,6 +75,13 @@ define('CL_VERSION', '3.0.0 RC');
} }
// fixed functions for PHP 5.4 and later
// @todo: Check what is needed for PHP7+
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php54.php');
// simulate PHP 7.3 functions
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php73.php');
// 1. security check: Include security class and invoke basic request checks // 1. security check: Include security class and invoke basic request checks
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/classes/class.security.php'); include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/classes/class.security.php');
try { try {
@ -211,7 +218,7 @@ if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0) {
$encoding = array(); $encoding = array();
$sql = "SELECT idlang, encoding FROM " . $cfg["tab"]["lang"]; $sql = "SELECT idlang, encoding FROM " . $cfg["tab"]["lang"];
$db->query($sql); $db->query($sql);
while ($db->nextRecord()) { while ($db->next_record()) {
$encoding[$db->f('idlang')] = $db->f('encoding'); $encoding[$db->f('idlang')] = $db->f('encoding');
} }
} }
@ -220,4 +227,5 @@ if($cfg['debug']['sendnocacheheader']) {
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1. header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0. header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies. header("Expires: 0"); // Proxies.
} }
?>

Datei anzeigen

@ -1,8 +1,4 @@
<?php <?php
use ConLite\Log\LogWriter;
use ConLite\Log\Log;
if(!defined('CON_FRAMEWORK')) { if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -16,11 +12,11 @@ class pimExeption extends Exception {
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);
// create a logger class and save it for all logging purposes // create a logger class and save it for all logging purposes
$writer = LogWriter::factory("File", array( $writer = cLogWriter::factory("File", array(
'destination' => cRegistry::getConfigValue('path', 'data') 'destination' => cRegistry::getConfigValue('path', 'data')
. 'logs/exception.log' . 'logs/exception.log'
)); ));
$this->_logger = new Log($writer); $this->_logger = new cLog($writer);
// determine if exception should be logged // determine if exception should be logged
if (false === $this->_log_exception if (false === $this->_log_exception

Datei anzeigen

@ -7,9 +7,12 @@
* adapted and recoded for ConLite by Ortwin Pinke * adapted and recoded for ConLite by Ortwin Pinke
* *
* @package PluginManager * @package PluginManager
* @version $Rev: 41 $
* @author Ortwin Pinke <ortwin.pinke@conlite.org> * @author Ortwin Pinke <ortwin.pinke@conlite.org>
* @author Frederic Schneider * @author Frederic Schneider
* @copyright ConLite.org * @copyright (c) 2008-2015, ConLite.org
*
* $Id: include.right_bottom.php 41 2018-05-20 21:55:49Z oldperl $
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
@ -18,9 +21,8 @@ if (!defined('CON_FRAMEWORK')) {
/* @var $perm Contenido_Perm */ /* @var $perm Contenido_Perm */
/* @var $auth Contenido_Challenge_Crypt_Auth */ /* @var $auth Contenido_Challenge_Crypt_Auth */
$Notification = new Contenido_Notification(); $oNoti = new Contenido_Notification();
$aMessages = []; $aMessages = array();
$oPage = new cPage(); $oPage = new cPage();
$oPage->sendNoCacheHeaders(); $oPage->sendNoCacheHeaders();
$oPage->setHtml5(); $oPage->setHtml5();
@ -32,16 +34,15 @@ $oPage->addJsFile("plugins/pluginmanager/scripts/pluginmanager.js");
// give permission only to sysadmin // give permission only to sysadmin
/* @var $perm Contenido_Perm */ /* @var $perm Contenido_Perm */
if (!$perm->isSysadmin()) { if (!$perm->isSysadmin()) {
$oPage->setContent($Notification->returnNotification(Contenido_Notification::LEVEL_ERROR, i18n("Permission denied!"))); $oPage->setContent($oNoti->returnNotification(Contenido_Notification::LEVEL_ERROR, i18n("Permission denied!")));
$oPage->render(); $oPage->render();
die(); die();
} }
// check disable plugin var // check disable plugin var
if ($cfg['debug']['disable_plugins'] === true) { if ($cfg['debug']['disable_plugins'] === true) {
$oPage->setContent($Notification->returnNotification(Contenido_Notification::LEVEL_WARNING, i18n('Currently the plugin system is disabled via configuration', "pluginmanager"))); $oPage->setContent($oNoti->returnNotification(Contenido_Notification::LEVEL_WARNING, i18n('Currently the plugin system is disabled via configuration', "pluginmanager")));
$oPage->render(); $oPage->render();
die();
} }
$oPimPluginCollection = new pimPluginCollection(); $oPimPluginCollection = new pimPluginCollection();
@ -155,11 +156,14 @@ if (is_dir($cfg['path']['plugins'])) {
$aMessages[] = "error:".sprintf(i18n('Invalid Xml document for %s. Please contact the plugin author.', 'pluginmanager'),$sPiCfg); $aMessages[] = "error:".sprintf(i18n('Invalid Xml document for %s. Please contact the plugin author.', 'pluginmanager'),$sPiCfg);
continue; continue;
} }
//echo "<pre>";
//print_r($oPluginHandler->getCfgXmlObject());
$aNeededTplVar['writeable'] = ($bPiPathWritable)?i18n("Everything looks fine.", "pluginmanager"):'<span style="color:red;">' $aNeededTplVar['writeable'] = ($bPiPathWritable)?i18n("Everything looks fine.", "pluginmanager"):'<span style="color:red;">'
.i18n("Pluginfolder not writable!", "pluginmanager").'</span>'; .i18n("Pluginfolder not writable!", "pluginmanager").'</span>';
$aInfoGeneral = array_merge($aNeededTplVar, $oPluginHandler->getPiGeneralArray()); $aInfoGeneral = array_merge($aNeededTplVar, $oPluginHandler->getPiGeneralArray());
//echo "<pre>";
//print_r($aInfoGeneral);
// initalization new template class // initalization new template class
$oView2 = new pimView(); $oView2 = new pimView();
$oView2->setVariable($iPiExCount, "PLUGIN_NUMBER"); $oView2->setVariable($iPiExCount, "PLUGIN_NUMBER");
@ -200,6 +204,7 @@ $oView->setVariable($iNumInstalledPlugins, 'INSTALLED_PLUGINS');
$oView->setVariable($sPlugins, 'PLUGINS'); $oView->setVariable($sPlugins, 'PLUGINS');
$oView->setVariable($pluginsExtracted, 'PLUGINS_EXTRACTED'); $oView->setVariable($pluginsExtracted, 'PLUGINS_EXTRACTED');
//print_r($aMessages);
// show overview page // show overview page
$oView->setTemplate('pi_manager_overview.html'); $oView->setTemplate('pi_manager_overview.html');
$sMessages = ""; $sMessages = "";
@ -212,4 +217,5 @@ if(count($aMessages) > 0 ) {
} }
//$oView->getRendered(); //$oView->getRendered();
$oPage->setContent(array($oView->getRendered(1), $sMessages)); $oPage->setContent(array($oView->getRendered(1), $sMessages));
$oPage->render(); $oPage->render();
?>

Datei anzeigen

@ -1,3 +0,0 @@
# Prevent access to this folder
Order Deny,Allow
Deny from all

Datei anzeigen

@ -95,6 +95,7 @@ return array(
'cRegistry' => 'conlite/classes/con2con/class.registry.php', 'cRegistry' => 'conlite/classes/con2con/class.registry.php',
'cDirHandler' => 'conlite/classes/con2con/class.dirhandler.php', 'cDirHandler' => 'conlite/classes/con2con/class.dirhandler.php',
'cAutoload' => 'conlite/classes/class.autoload.php', 'cAutoload' => 'conlite/classes/class.autoload.php',
'ConUserException' => 'conlite/classes/exceptions/exception.conuser.php',
'VersionImport' => 'conlite/classes/class.versionImport.php', 'VersionImport' => 'conlite/classes/class.versionImport.php',
'UI_Left_Top' => 'conlite/classes/class.ui.php', 'UI_Left_Top' => 'conlite/classes/class.ui.php',
'UI_Menu' => 'conlite/classes/class.ui.php', 'UI_Menu' => 'conlite/classes/class.ui.php',
@ -327,6 +328,7 @@ return array(
'Output_Compressor' => 'conlite/classes/class.output_compressor.php', 'Output_Compressor' => 'conlite/classes/class.output_compressor.php',
'cArticleCollector' => 'conlite/classes/class.article.collector.php', 'cArticleCollector' => 'conlite/classes/class.article.collector.php',
'Cms_FileList' => 'conlite/classes/class.cms_filelist.php', 'Cms_FileList' => 'conlite/classes/class.cms_filelist.php',
'ExcelWorksheet' => 'conlite/classes/class.excel.php',
'Contenido_Category_Articles' => 'conlite/classes/Contenido_Category/Contenido_Category_Articles.class.php', 'Contenido_Category_Articles' => 'conlite/classes/Contenido_Category/Contenido_Category_Articles.class.php',
'Contenido_Category' => 'conlite/classes/Contenido_Category/Contenido_Category.class.php', 'Contenido_Category' => 'conlite/classes/Contenido_Category/Contenido_Category.class.php',
'Contenido_Categories' => 'conlite/classes/Contenido_Category/Contenido_Category.class.php', 'Contenido_Categories' => 'conlite/classes/Contenido_Category/Contenido_Category.class.php',

Datei anzeigen

@ -0,0 +1,104 @@
<?php
/*
* Module written/ported by Xavier Noguer <xnoguer@rezebra.com>
*
* PERL Spreadsheet::WriteExcel module.
*
* The author of the Spreadsheet::WriteExcel module is John McNamara
* <jmcnamara@cpan.org>
*
* I _DO_ maintain this code, and John McNamara has nothing to do with the
* porting of this code to PHP. Any questions directly related to this
* class library should be directed to me.
*
* License Information:
*
* Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets
* Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require_once('PEAR.php');
require_once('Spreadsheet/Excel/Writer/Workbook.php');
/**
* Class for writing Excel Spreadsheets. This class should change COMPLETELY.
*
* @author Xavier Noguer <xnoguer@rezebra.com>
* @category FileFormats
* @package Spreadsheet_Excel_Writer
*/
class Spreadsheet_Excel_Writer extends Spreadsheet_Excel_Writer_Workbook
{
/**
* The constructor. It just creates a Workbook
*
* @param string $filename The optional filename for the Workbook.
* @return Spreadsheet_Excel_Writer_Workbook The Workbook created
*/
function Spreadsheet_Excel_Writer($filename = '')
{
$this->_filename = $filename;
$this->Spreadsheet_Excel_Writer_Workbook($filename);
}
/**
* Send HTTP headers for the Excel file.
*
* @param string $filename The filename to use for HTTP headers
* @access public
*/
function send($filename)
{
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$filename");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");
}
/**
* Utility function for writing formulas
* Converts a cell's coordinates to the A1 format.
*
* @access public
* @static
* @param integer $row Row for the cell to convert (0-indexed).
* @param integer $col Column for the cell to convert (0-indexed).
* @return string The cell identifier in A1 format
*/
function rowcolToCell($row, $col)
{
if ($col > 255) { //maximum column value exceeded
return new PEAR_Error("Maximum column value exceeded: $col");
}
$int = (int)($col / 26);
$frac = $col % 26;
$chr1 = '';
if ($int > 0) {
$chr1 = chr(ord('A') + $int - 1);
}
$chr2 = chr(ord('A') + $frac);
$row++;
return $chr1.$chr2.$row;
}
}
?>

Datei anzeigen

@ -0,0 +1,241 @@
<?php
/*
* Module written/ported by Xavier Noguer <xnoguer@php.net>
*
* The majority of this is _NOT_ my code. I simply ported it from the
* PERL Spreadsheet::WriteExcel module.
*
* The author of the Spreadsheet::WriteExcel module is John McNamara
* <jmcnamara@cpan.org>
*
* I _DO_ maintain this code, and John McNamara has nothing to do with the
* porting of this code to PHP. Any questions directly related to this
* class library should be directed to me.
*
* License Information:
*
* Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets
* Copyright (c) 2002-2003 Xavier Noguer xnoguer@php.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require_once('PEAR.php');
/**
* Class for writing Excel BIFF records.
*
* From "MICROSOFT EXCEL BINARY FILE FORMAT" by Mark O'Brien (Microsoft Corporation):
*
* BIFF (BInary File Format) is the file format in which Excel documents are
* saved on disk. A BIFF file is a complete description of an Excel document.
* BIFF files consist of sequences of variable-length records. There are many
* different types of BIFF records. For example, one record type describes a
* formula entered into a cell; one describes the size and location of a
* window into a document; another describes a picture format.
*
* @author Xavier Noguer <xnoguer@php.net>
* @category FileFormats
* @package Spreadsheet_Excel_Writer
*/
class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
{
/**
* The BIFF/Excel version (5).
* @var integer
*/
var $_BIFF_version = 0x0500;
/**
* The byte order of this architecture. 0 => little endian, 1 => big endian
* @var integer
*/
var $_byte_order;
/**
* The string containing the data of the BIFF stream
* @var string
*/
var $_data;
/**
* The size of the data in bytes. Should be the same as strlen($this->_data)
* @var integer
*/
var $_datasize;
/**
* The maximun length for a BIFF record. See _addContinue()
* @var integer
* @see _addContinue()
*/
var $_limit;
/**
* Constructor
*
* @access public
*/
function Spreadsheet_Excel_Writer_BIFFwriter()
{
$this->_byte_order = '';
$this->_data = '';
$this->_datasize = 0;
$this->_limit = 2080;
// Set the byte order
$this->_setByteOrder();
}
/**
* Determine the byte order and store it as class data to avoid
* recalculating it for each call to new().
*
* @access private
*/
function _setByteOrder()
{
// Check if "pack" gives the required IEEE 64bit float
$teststr = pack("d", 1.2345);
$number = pack("C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F);
if ($number == $teststr) {
$byte_order = 0; // Little Endian
}
elseif ($number == strrev($teststr)){
$byte_order = 1; // Big Endian
}
else {
// Give up. I'll fix this in a later version.
return $this->raiseError("Required floating point format ".
"not supported on this platform.");
}
$this->_byte_order = $byte_order;
}
/**
* General storage function
*
* @param string $data binary data to prepend
* @access private
*/
function _prepend($data)
{
if (strlen($data) > $this->_limit) {
$data = $this->_addContinue($data);
}
$this->_data = $data.$this->_data;
$this->_datasize += strlen($data);
}
/**
* General storage function
*
* @param string $data binary data to append
* @access private
*/
function _append($data)
{
if (strlen($data) > $this->_limit) {
$data = $this->_addContinue($data);
}
$this->_data = $this->_data.$data;
$this->_datasize += strlen($data);
}
/**
* Writes Excel BOF record to indicate the beginning of a stream or
* sub-stream in the BIFF file.
*
* @param integer $type Type of BIFF file to write: 0x0005 Workbook,
* 0x0010 Worksheet.
* @access private
*/
function _storeBof($type)
{
$record = 0x0809; // Record identifier
// According to the SDK $build and $year should be set to zero.
// However, this throws a warning in Excel 5. So, use magic numbers.
if ($this->_BIFF_version == 0x0500) {
$length = 0x0008;
$unknown = '';
$build = 0x096C;
$year = 0x07C9;
}
elseif ($this->_BIFF_version == 0x0600) {
$length = 0x0010;
$unknown = pack("VV", 0x00000041, 0x00000006); //unknown last 8 bytes for BIFF8
$build = 0x0DBB;
$year = 0x07CC;
}
$version = $this->_BIFF_version;
$header = pack("vv", $record, $length);
$data = pack("vvvv", $version, $type, $build, $year);
$this->_prepend($header.$data.$unknown);
}
/**
* Writes Excel EOF record to indicate the end of a BIFF stream.
*
* @access private
*/
function _storeEof()
{
$record = 0x000A; // Record identifier
$length = 0x0000; // Number of bytes to follow
$header = pack("vv", $record, $length);
$this->_append($header);
}
/**
* Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In
* Excel 97 the limit is 8228 bytes. Records that are longer than these limits
* must be split up into CONTINUE blocks.
*
* This function takes a long BIFF record and inserts CONTINUE records as
* necessary.
*
* @param string $data The original binary data to be written
* @return string A very convenient string of continue blocks
* @access private
*/
function _addContinue($data)
{
$limit = $this->_limit;
$record = 0x003C; // Record identifier
// The first 2080/8224 bytes remain intact. However, we have to change
// the length field of the record.
$tmp = substr($data, 0, 2).pack("v", $limit-4).substr($data, 4, $limit - 4);
$header = pack("vv", $record, $limit); // Headers for continue records
// Retrieve chunks of 2080/8224 bytes +4 for the header.
for($i = $limit; $i < strlen($data) - $limit; $i += $limit)
{
$tmp .= $header;
$tmp .= substr($data, $i, $limit);
}
// Retrieve the last chunk of data
$header = pack("vv", $record, strlen($data) - $i);
$tmp .= $header;
$tmp .= substr($data,$i,strlen($data) - $i);
return $tmp;
}
}
?>

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -0,0 +1,225 @@
<?php
/*
* Module written by Herman Kuiper <herman@ozuzo.net>
*
* License Information:
*
* Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets
* Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//require_once('PEAR.php');
// Possible operator types
/*
FIXME: change prefixes
*/
define("OP_BETWEEN", 0x00);
define("OP_NOTBETWEEN", 0x01);
define("OP_EQUAL", 0x02);
define("OP_NOTEQUAL", 0x03);
define("OP_GT", 0x04);
define("OP_LT", 0x05);
define("OP_GTE", 0x06);
define("OP_LTE", 0x07);
/**
* Baseclass for generating Excel DV records (validations)
*
* @author Herman Kuiper
* @category FileFormats
* @package Spreadsheet_Excel_Writer
*/
class Spreadsheet_Excel_Writer_Validator
{
var $_type;
var $_style;
var $_fixedList;
var $_blank;
var $_incell;
var $_showprompt;
var $_showerror;
var $_title_prompt;
var $_descr_prompt;
var $_title_error;
var $_descr_error;
var $_operator;
var $_formula1;
var $_formula2;
/**
* The parser from the workbook. Used to parse validation formulas also
* @var Spreadsheet_Excel_Writer_Parser
*/
var $_parser;
function Spreadsheet_Excel_Writer_Validator(&$parser)
{
$this->_parser = $parser;
$this->_type = 0x01; // FIXME: add method for setting datatype
$this->_style = 0x00;
$this->_fixedList = false;
$this->_blank = false;
$this->_incell = false;
$this->_showprompt = false;
$this->_showerror = true;
$this->_title_prompt = "\x00";
$this->_descr_prompt = "\x00";
$this->_title_error = "\x00";
$this->_descr_error = "\x00";
$this->_operator = 0x00; // default is equal
$this->_formula1 = "";
$this->_formula2 = "";
}
function setPrompt($promptTitle = "\x00", $promptDescription = "\x00", $showPrompt = true)
{
$this->_showprompt = $showPrompt;
$this->_title_prompt = $promptTitle;
$this->_descr_prompt = $promptDescription;
}
function setError($errorTitle = "\x00", $errorDescription = "\x00", $showError = true)
{
$this->_showerror = $showError;
$this->_title_error = $errorTitle;
$this->_descr_error = $errorDescription;
}
function allowBlank()
{
$this->_blank = true;
}
function onInvalidStop()
{
$this->_style = 0x00;
}
function onInvalidWarn()
{
$this->_style = 0x01;
}
function onInvalidInfo()
{
$this->_style = 0x02;
}
function setFormula1($formula)
{
// Parse the formula using the parser in Parser.php
$error = $this->_parser->parse($formula);
if (PEAR::isError($error)) {
return $this->_formula1;
}
$this->_formula1 = $this->_parser->toReversePolish();
if (PEAR::isError($this->_formula1)) {
return $this->_formula1;
}
return true;
}
function setFormula2($formula)
{
// Parse the formula using the parser in Parser.php
$error = $this->_parser->parse($formula);
if (PEAR::isError($error)) {
return $this->_formula2;
}
$this->_formula2 = $this->_parser->toReversePolish();
if (PEAR::isError($this->_formula2)) {
return $this->_formula2;
}
return true;
}
function _getOptions()
{
$options = $this->_type;
$options |= $this->_style << 3;
if($this->_fixedList)
$options |= 0x80;
if($this->_blank)
$options |= 0x100;
if(!$this->_incell)
$options |= 0x200;
if($this->_showprompt)
$options |= 0x40000;
if($this->_showerror)
$options |= 0x80000;
$options |= $this->_operator << 20;
return $options;
}
function _getData()
{
$title_prompt_len = strlen($this->_title_prompt);
$descr_prompt_len = strlen($this->_descr_prompt);
$title_error_len = strlen($this->_title_error);
$descr_error_len = strlen($this->_descr_error);
$formula1_size = strlen($this->_formula1);
$formula2_size = strlen($this->_formula2);
$data = pack("V", $this->_getOptions());
$data .= pack("vC", $title_prompt_len, 0x00) . $this->_title_prompt;
$data .= pack("vC", $title_error_len, 0x00) . $this->_title_error;
$data .= pack("vC", $descr_prompt_len, 0x00) . $this->_descr_prompt;
$data .= pack("vC", $descr_error_len, 0x00) . $this->_descr_error;
$data .= pack("vv", $formula1_size, 0x0000) . $this->_formula1;
$data .= pack("vv", $formula2_size, 0x0000) . $this->_formula2;
return $data;
}
}
/*class Spreadsheet_Excel_Writer_Validation_List extends Spreadsheet_Excel_Writer_Validation
{
function Spreadsheet_Excel_Writer_Validation_list()
{
parent::Spreadsheet_Excel_Writer_Validation();
$this->_type = 0x03;
}
function setList($source, $incell = true)
{
$this->_incell = $incell;
$this->_fixedList = true;
$source = implode("\x00", $source);
$this->_formula1 = pack("CCC", 0x17, strlen($source), 0x0c) . $source;
}
function setRow($row, $col1, $col2, $incell = true)
{
$this->_incell = $incell;
//$this->_formula1 = ...;
}
function setCol($col, $row1, $row2, $incell = true)
{
$this->_incell = $incell;
//$this->_formula1 = ...;
}
}*/
?>

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -38,7 +38,7 @@ define('C_SETUP_STEPFILE_ACTIVE', 'images/steps/s%da.png');
define('C_SETUP_STEPWIDTH', 28); define('C_SETUP_STEPWIDTH', 28);
define('C_SETUP_STEPHEIGHT', 28); define('C_SETUP_STEPHEIGHT', 28);
define('C_SETUP_MIN_PHP_VERSION', '7.4.0'); define('C_SETUP_MIN_PHP_VERSION', '7.4.0');
define('C_SETUP_MAX_PHP_VERSION', '8.4.0'); define('C_SETUP_MAX_PHP_VERSION', '8.3.0');
define('C_SETUP_VERSION', '3.0.0'); define('C_SETUP_VERSION', '3.0.0');
$sDefLocalPath = __DIR__.DIRECTORY_SEPARATOR.'defines.local.php'; $sDefLocalPath = __DIR__.DIRECTORY_SEPARATOR.'defines.local.php';

2
vendor/autoload.php gevendort
Datei anzeigen

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitd0ae0b83b9264ecb75b1020e2c7d3da2::getLoader(); return ComposerAutoloaderInit030320213c853f2cfb8481e1bb7caf00::getLoader();

11
vendor/composer/autoload_files.php gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,11 @@
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
);

Datei anzeigen

@ -6,6 +6,9 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'Twig\\' => array($vendorDir . '/twig/twig/src'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
'ConLite\\' => array($baseDir . '/conlite/classes'), 'ConLite\\' => array($baseDir . '/conlite/classes'),
); );

Datei anzeigen

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInitd0ae0b83b9264ecb75b1020e2c7d3da2 class ComposerAutoloaderInit030320213c853f2cfb8481e1bb7caf00
{ {
private static $loader; private static $loader;
@ -24,15 +24,15 @@ class ComposerAutoloaderInitd0ae0b83b9264ecb75b1020e2c7d3da2
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitd0ae0b83b9264ecb75b1020e2c7d3da2', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit030320213c853f2cfb8481e1bb7caf00', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitd0ae0b83b9264ecb75b1020e2c7d3da2', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit030320213c853f2cfb8481e1bb7caf00', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit030320213c853f2cfb8481e1bb7caf00::getInitializer($loader));
} else { } else {
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
@ -52,6 +52,29 @@ class ComposerAutoloaderInitd0ae0b83b9264ecb75b1020e2c7d3da2
$loader->register(true); $loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit030320213c853f2cfb8481e1bb7caf00::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire030320213c853f2cfb8481e1bb7caf00($fileIdentifier, $file);
}
return $loader; return $loader;
} }
} }
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire030320213c853f2cfb8481e1bb7caf00($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}

Datei anzeigen

@ -4,9 +4,23 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2 class ComposerStaticInit030320213c853f2cfb8481e1bb7caf00
{ {
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
);
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
'T' =>
array (
'Twig\\' => 5,
),
'S' =>
array (
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Ctype\\' => 23,
),
'P' => 'P' =>
array ( array (
'PHPMailer\\PHPMailer\\' => 20, 'PHPMailer\\PHPMailer\\' => 20,
@ -18,6 +32,18 @@ class ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2
); );
public static $prefixDirsPsr4 = array ( public static $prefixDirsPsr4 = array (
'Twig\\' =>
array (
0 => __DIR__ . '/..' . '/twig/twig/src',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Symfony\\Polyfill\\Ctype\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
),
'PHPMailer\\PHPMailer\\' => 'PHPMailer\\PHPMailer\\' =>
array ( array (
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
@ -35,9 +61,9 @@ class ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit030320213c853f2cfb8481e1bb7caf00::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit030320213c853f2cfb8481e1bb7caf00::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd0ae0b83b9264ecb75b1020e2c7d3da2::$classMap; $loader->classMap = ComposerStaticInit030320213c853f2cfb8481e1bb7caf00::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

Datei anzeigen

@ -2,17 +2,17 @@
"packages": [ "packages": [
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v6.9.1", "version": "v6.8.0",
"version_normalized": "6.9.1.0", "version_normalized": "6.8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git", "url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "039de174cd9c17a8389754d3b877a2ed22743e18" "reference": "df16b615e371d81fb79e506277faea67a1be18f1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/df16b615e371d81fb79e506277faea67a1be18f1",
"reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "reference": "df16b615e371d81fb79e506277faea67a1be18f1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -22,17 +22,16 @@
"php": ">=5.5.0" "php": ">=5.5.0"
}, },
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"doctrine/annotations": "^1.2.6 || ^1.13.3", "doctrine/annotations": "^1.2.6 || ^1.13.3",
"php-parallel-lint/php-console-highlighter": "^1.0.0", "php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2", "php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9.3.5", "phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7.2", "squizlabs/php_codesniffer": "^3.7.1",
"yoast/phpunit-polyfills": "^1.0.4" "yoast/phpunit-polyfills": "^1.0.4"
}, },
"suggest": { "suggest": {
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing", "ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
@ -42,7 +41,7 @@
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
}, },
"time": "2023-11-25T22:23:28+00:00", "time": "2023-03-06T14:43:22+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -74,7 +73,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP", "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": { "support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues", "issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.0"
}, },
"funding": [ "funding": [
{ {
@ -83,6 +82,251 @@
} }
], ],
"install-path": "../phpmailer/phpmailer" "install-path": "../phpmailer/phpmailer"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.27.0",
"version_normalized": "1.27.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"time": "2022-11-03T14:55:06+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"installation-source": "dist",
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"install-path": "../symfony/polyfill-ctype"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.27.0",
"version_normalized": "1.27.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"time": "2022-11-03T14:55:06+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"installation-source": "dist",
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"install-path": "../symfony/polyfill-mbstring"
},
{
"name": "twig/twig",
"version": "v3.7.0",
"version_normalized": "3.7.0.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b",
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
},
"require-dev": {
"psr/container": "^1.0|^2.0",
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
},
"time": "2023-07-26T07:16:09+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Twig\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Twig Team",
"role": "Contributors"
},
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
"homepage": "https://twig.symfony.com",
"keywords": [
"templating"
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.7.0"
},
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
"type": "tidelift"
}
],
"install-path": "../twig/twig"
} }
], ],
"dev": false, "dev": false,

Datei anzeigen

@ -5,7 +5,7 @@
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => 'b731c8137e254e2af9579005ee7f5c228aa98f58', 'reference' => 'a397b65fcdb95da20cb02b4bd4c63abc04a0ce82',
'name' => 'org.conlite/conlite', 'name' => 'org.conlite/conlite',
'dev' => false, 'dev' => false,
), ),
@ -16,16 +16,43 @@
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => 'b731c8137e254e2af9579005ee7f5c228aa98f58', 'reference' => 'a397b65fcdb95da20cb02b4bd4c63abc04a0ce82',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phpmailer/phpmailer' => array( 'phpmailer/phpmailer' => array(
'pretty_version' => 'v6.9.1', 'pretty_version' => 'v6.8.0',
'version' => '6.9.1.0', 'version' => '6.8.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'install_path' => __DIR__ . '/../phpmailer/phpmailer',
'aliases' => array(), 'aliases' => array(),
'reference' => '039de174cd9c17a8389754d3b877a2ed22743e18', 'reference' => 'df16b615e371d81fb79e506277faea67a1be18f1',
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.27.0',
'version' => '1.27.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(),
'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a',
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.27.0',
'version' => '1.27.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
'dev_requirement' => false,
),
'twig/twig' => array(
'pretty_version' => 'v3.7.0',
'version' => '3.7.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../twig/twig',
'aliases' => array(),
'reference' => '5cf942bbab3df42afa918caeba947f1b690af64b',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
), ),

Datei anzeigen

@ -1,15 +0,0 @@
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2

Datei anzeigen

@ -47,7 +47,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json ```json
"phpmailer/phpmailer": "^6.9.1" "phpmailer/phpmailer": "^6.8.0"
``` ```
or run or run
@ -58,8 +58,7 @@ composer require phpmailer/phpmailer
Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer. Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer.
If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`.
by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services.
Alternatively, if you're not using Composer, you Alternatively, if you're not using Composer, you
can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
@ -151,7 +150,7 @@ PHPMailer defaults to English, but in the [language](https://github.com/PHPMaile
$mail->setLanguage('fr', '/optional/path/to/language/directory/'); $mail->setLanguage('fr', '/optional/path/to/language/directory/');
``` ```
We welcome corrections and new languages – if you're looking for corrections, run the [Language/TranslationCompletenessTest.php](https://github.com/PHPMailer/PHPMailer/blob/master/test/Language/TranslationCompletenessTest.php) script in the tests folder and it will show any missing translations. We welcome corrections and new languages – if you're looking for corrections, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations.
## Documentation ## Documentation
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated. Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated.

Datei anzeigen

@ -1 +1 @@
6.9.1 6.8.0

Datei anzeigen

@ -37,17 +37,16 @@
"ext-hash": "*" "ext-hash": "*"
}, },
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"doctrine/annotations": "^1.2.6 || ^1.13.3", "doctrine/annotations": "^1.2.6 || ^1.13.3",
"php-parallel-lint/php-console-highlighter": "^1.0.0", "php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2", "php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9.3.5", "phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7.2", "squizlabs/php_codesniffer": "^3.7.1",
"yoast/phpunit-polyfills": "^1.0.4" "yoast/phpunit-polyfills": "^1.0.4"
}, },
"suggest": { "suggest": {
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing", "ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",

Datei anzeigen

@ -1,35 +0,0 @@
<?php
/**
* Assamese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Manish Sarkar <manish.n.manish@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP ত্ৰুটি: প্ৰমাণীকৰণ কৰিব নোৱাৰি';
$PHPMAILER_LANG['buggy_php'] = 'আপোনাৰ PHP সংস্কৰণ এটা বাগৰ দ্বাৰা প্ৰভাৱিত হয় যাৰ ফলত নষ্ট বাৰ্তা হব পাৰে । ইয়াক সমাধান কৰিবলে, প্ৰেৰণ কৰিবলে SMTP ব্যৱহাৰ কৰক, আপোনাৰ php.ini ত mail.add_x_header বিকল্প নিষ্ক্ৰিয় কৰক, MacOS বা Linux লৈ সলনি কৰক, বা আপোনাৰ PHP সংস্কৰণ 7.0.17+ বা 7.1.3+ লৈ সলনি কৰক ।';
$PHPMAILER_LANG['connect_host'] = 'SMTP ত্ৰুটি: SMTP চাৰ্ভাৰৰ সৈতে সংযোগ কৰিবলে অক্ষম';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্ৰুটি: তথ্য গ্ৰহণ কৰা হোৱা নাই';
$PHPMAILER_LANG['empty_message'] = 'বাৰ্তাৰ মূখ্য অংশ খালী।';
$PHPMAILER_LANG['encoding'] = 'অজ্ঞাত এনকোডিং: ';
$PHPMAILER_LANG['execute'] = 'এক্সিকিউট কৰিব নোৱাৰি: ';
$PHPMAILER_LANG['extension_missing'] = 'সম্প্ৰসাৰণ নোহোৱা হৈছে: ';
$PHPMAILER_LANG['file_access'] = 'ফাইল অভিগম কৰিবলে অক্ষম: ';
$PHPMAILER_LANG['file_open'] = 'ফাইল ত্ৰুটি: ফাইল খোলিবলৈ অক্ষম: ';
$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্ৰেৰকৰ ঠিকনা(সমূহ) ব্যৰ্থ: ';
$PHPMAILER_LANG['instantiate'] = 'মেইল ফাংচনৰ এটা উদাহৰণ সৃষ্টি কৰিবলে অক্ষম';
$PHPMAILER_LANG['invalid_address'] = 'প্ৰেৰণ কৰিব নোৱাৰি: অবৈধ ইমেইল ঠিকনা: ';
$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডাৰৰ নাম বা মান';
$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোষ্টেন্ট্ৰি: ';
$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হস্ট:';
$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলাৰ সমৰ্থিত নহয়।';
$PHPMAILER_LANG['provide_address'] = 'আপুনি অন্ততঃ এটা গন্তব্য ইমেইল ঠিকনা দিব লাগিব';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্ৰুটি: নিম্নলিখিত গন্তব্যস্থানসমূহ ব্যৰ্থ: ';
$PHPMAILER_LANG['signing'] = 'স্বাক্ষৰ কৰাত ব্যৰ্থ: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP কড: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'অতিৰিক্ত SMTP তথ্য: ';
$PHPMAILER_LANG['smtp_detail'] = 'বিৱৰণ:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যৰ্থ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP চাৰ্ভাৰৰ ত্ৰুটি: ';
$PHPMAILER_LANG['variable_set'] = 'চলক নিৰ্ধাৰণ কৰিব পৰা নগল: ';
$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত সম্প্ৰসাৰণ: ';

Datei anzeigen

@ -1,35 +0,0 @@
<?php
/**
* Bengali PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Manish Sarkar <manish.n.manish@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP ত্রুটি: প্রমাণীকরণ করতে অক্ষম৷';
$PHPMAILER_LANG['buggy_php'] = 'আপনার PHP সংস্করণ একটি বাগ দ্বারা প্রভাবিত হয় যার ফলে দূষিত বার্তা হতে পারে। এটি ঠিক করতে, পাঠাতে SMTP ব্যবহার করুন, আপনার php.ini এ mail.add_x_header বিকল্পটি নিষ্ক্রিয় করুন, MacOS বা Linux-এ স্যুইচ করুন, অথবা আপনার PHP সংস্করণকে 7.0.17+ বা 7.1.3+ এ পরিবর্তন করুন।';
$PHPMAILER_LANG['connect_host'] = 'SMTP ত্রুটি: SMTP সার্ভারের সাথে সংযোগ করতে অক্ষম৷';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্রুটি: ডেটা গ্রহণ করা হয়নি৷';
$PHPMAILER_LANG['empty_message'] = 'বার্তার অংশটি খালি।';
$PHPMAILER_LANG['encoding'] = 'অজানা এনকোডিং: ';
$PHPMAILER_LANG['execute'] = 'নির্বাহ করতে অক্ষম: ';
$PHPMAILER_LANG['extension_missing'] = 'এক্সটেনশন অনুপস্থিত:';
$PHPMAILER_LANG['file_access'] = 'ফাইল অ্যাক্সেস করতে অক্ষম: ';
$PHPMAILER_LANG['file_open'] = 'ফাইল ত্রুটি: ফাইল খুলতে অক্ষম: ';
$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্রেরকের ঠিকানা(গুলি) ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['instantiate'] = 'মেল ফাংশনের একটি উদাহরণ তৈরি করতে অক্ষম৷';
$PHPMAILER_LANG['invalid_address'] = 'পাঠাতে অক্ষম: অবৈধ ইমেল ঠিকানা: ';
$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডার নাম বা মান';
$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোস্টেন্ট্রি: ';
$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হোস্ট:';
$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলার সমর্থিত নয়।';
$PHPMAILER_LANG['provide_address'] = 'আপনাকে অবশ্যই অন্তত একটি গন্তব্য ইমেল ঠিকানা প্রদান করতে হবে৷';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্রুটি: নিম্নলিখিত গন্তব্যগুলি ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['signing'] = 'স্বাক্ষর করতে ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP কোড: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'অতিরিক্ত SMTP তথ্য:';
$PHPMAILER_LANG['smtp_detail'] = 'বর্ণনা: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যর্থ হয়েছে৷';
$PHPMAILER_LANG['smtp_error'] = 'SMTP সার্ভার ত্রুটি: ';
$PHPMAILER_LANG['variable_set'] = 'পরিবর্তনশীল সেট করা যায়নি: ';
$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত এক্সটেনশন: ';

Datei anzeigen

@ -9,7 +9,6 @@
*/ */
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.'; $PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.';
$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.'; $PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.';
$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold'; $PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold';

Datei anzeigen

@ -20,6 +20,7 @@ $PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.'; $PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähk&ouml;postiosoite.'; $PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähk&ouml;postiosoite.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: '; //$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';

Datei anzeigen

@ -35,3 +35,4 @@ $PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échoué
$PHPMAILER_LANG['smtp_detail'] = 'Détails: '; $PHPMAILER_LANG['smtp_detail'] = 'Détails: ';
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossible dinitialiser ou de réinitialiser une variable: '; $PHPMAILER_LANG['variable_set'] = 'Impossible dinitialiser ou de réinitialiser une variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante: ';

Datei anzeigen

@ -5,29 +5,22 @@
* @package PHPMailer * @package PHPMailer
*/ */
$PHPMAILER_LANG['authenticate'] = 'SMTP-feil: Kunne ikke autentiseres.'; $PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
$PHPMAILER_LANG['buggy_php'] = 'Din versjon av PHP er berørt av en feil som kan føre til ødelagte meldinger. For å løse problemet kan du bytte til SMTP, deaktivere alternativet mail.add_x_header i php.ini, bytte til MacOS eller Linux eller oppgradere PHP til versjon 7.0.17+ eller 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-feil: Kunne ikke koble til SMTP-vert.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Datainnhold ikke akseptert.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-feil: data ikke akseptert.'; $PHPMAILER_LANG['empty_message'] = 'Meldingsinnhold mangler';
$PHPMAILER_LANG['empty_message'] = 'Meldingstekst mangler'; $PHPMAILER_LANG['encoding'] = 'Ukjent koding: ';
$PHPMAILER_LANG['encoding'] = 'Ukjent koding: '; $PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføres: '; $PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
$PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: '; $PHPMAILER_LANG['file_open'] = 'Fil Feil: Kunne ikke åpne filen: ';
$PHPMAILER_LANG['file_access'] = 'Kunne ikke få tilgang til filen: '; $PHPMAILER_LANG['from_failed'] = 'Følgende Frå adresse feilet: ';
$PHPMAILER_LANG['file_open'] = 'Feil i fil: Kunne ikke åpne filen: '; $PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere post funksjon.';
$PHPMAILER_LANG['from_failed'] = 'Følgende Fra-adresse mislyktes: '; $PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: ';
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke instansiere e-postfunksjonen.'; $PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';
$PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: '; $PHPMAILER_LANG['provide_address'] = 'Du må opppgi minst en mottakeradresse.';
$PHPMAILER_LANG['invalid_header'] = 'Ugyldig headernavn eller verdi'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig vertsinngang: '; $PHPMAILER_LANG['signing'] = 'Signering Feil: ';
$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vert: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() feilet.';
$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.'; $PHPMAILER_LANG['smtp_error'] = 'SMTP server feil: ';
$PHPMAILER_LANG['provide_address'] = 'Du må oppgi minst én mottaker-e-postadresse.'; $PHPMAILER_LANG['variable_set'] = 'Kan ikke skrive eller omskrive variabel: ';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: '; $PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP-kode: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Ytterligere SMTP-info: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() mislyktes.';
$PHPMAILER_LANG['smtp_detail'] = 'Detaljer: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke angi eller tilbakestille variabel: ';

Datei anzeigen

@ -6,28 +6,21 @@
*/ */
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.'; $PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.';
$PHPMAILER_LANG['buggy_php'] = 'Twoja wersja PHP zawiera błąd, który może powodować uszkodzenie wiadomości. Aby go naprawić, przełącz się na wysyłanie za pomocą SMTP, wyłącz opcję mail.add_x_header w php.ini, przełącz się na MacOS lub Linux lub zaktualizuj PHP do wersji 7.0.17+ lub 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.'; $PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.'; $PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
$PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.'; $PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.';
$PHPMAILER_LANG['encoding'] = 'Błędny sposób kodowania znaków: '; $PHPMAILER_LANG['encoding'] = 'Błędny sposób kodowania znaków: ';
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: '; $PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: '; $PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: '; $PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Następujący adres nadawcy jest nieprawidłowy lub nie istnieje: '; $PHPMAILER_LANG['from_failed'] = 'Następujący adres nadawcy jest nieprawidłowy lub nie istnieje: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.'; $PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' . 'następujący adres odbiorcy jest nieprawidłowy lub nie istnieje: '; $PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' . 'następujący adres odbiorcy jest nieprawidłowy lub nie istnieje: ';
$PHPMAILER_LANG['invalid_header'] = 'Nieprawidłowa nazwa lub wartość nagłówka';
$PHPMAILER_LANG['invalid_hostentry'] = 'Nieprawidłowy wpis hosta: ';
$PHPMAILER_LANG['invalid_host'] = 'Nieprawidłowy host: ';
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email odbiorcy.'; $PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email odbiorcy.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.'; $PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi lub nie istnieją: '; $PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi lub nie istnieją: ';
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: '; $PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
$PHPMAILER_LANG['smtp_code'] = 'Kod SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatkowe informacje SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Wywołanie funkcji SMTP Connect() zostało zakończone niepowodzeniem.'; $PHPMAILER_LANG['smtp_connect_failed'] = 'Wywołanie funkcji SMTP Connect() zostało zakończone niepowodzeniem.';
$PHPMAILER_LANG['smtp_detail'] = 'Szczegóły: ';
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: '; $PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';

Datei anzeigen

@ -1,34 +0,0 @@
<?php
/**
* Sinhalese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Ayesh Karunaratne <ayesh@aye.sh>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP දෝෂය: සත්‍යාපනය අසාර්ථක විය.';
$PHPMAILER_LANG['buggy_php'] = 'ඔබගේ PHP version එකෙහි පවතින දෝෂයක් නිසා email පණිවිඩ දෝෂ සහගත වීමේ හැකියාවක් ඇත. මෙය විසදීම සදහා SMTP භාවිතා කිරීම, mail.add_x_header INI setting එක අක්‍රීය කිරීම, MacOS හෝ Linux වලට මාරු වීම, හෝ ඔබගේ PHP version එක 7.0.17+ හෝ 7.1.3+ වලට අලුත් කිරීම කරගන්න.';
$PHPMAILER_LANG['connect_host'] = 'SMTP දෝෂය: සම්බන්ධ වීමට නොහැකි විය.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP දෝෂය: දත්ත පිළිගනු නොලැබේ.';
$PHPMAILER_LANG['empty_message'] = 'පණිවිඩ අන්තර්ගතය හිස්';
$PHPMAILER_LANG['encoding'] = 'නොදන්නා කේතනය: ';
$PHPMAILER_LANG['execute'] = 'ක්‍රියාත්මක කළ නොහැකි විය: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension එක නොමැත: ';
$PHPMAILER_LANG['file_access'] = 'File එකට ප්‍රවේශ විය නොහැකි විය: ';
$PHPMAILER_LANG['file_open'] = 'File දෝෂය: File එක විවෘත කළ නොහැක: ';
$PHPMAILER_LANG['from_failed'] = 'පහත From ලිපිනයන් අසාර්ථක විය: ';
$PHPMAILER_LANG['instantiate'] = 'mail function එක ක්‍රියාත්මක කළ නොහැක.';
$PHPMAILER_LANG['invalid_address'] = 'වලංගු නොවන ලිපිනය: ';
$PHPMAILER_LANG['invalid_header'] = 'වලංගු නොවන header නාමයක් හෝ අගයක්';
$PHPMAILER_LANG['invalid_hostentry'] = 'වලංගු නොවන hostentry එකක්: ';
$PHPMAILER_LANG['invalid_host'] = 'වලංගු නොවන host එකක්: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer සහාය නොදක්වයි.';
$PHPMAILER_LANG['provide_address'] = 'ඔබ අවම වශයෙන් එක් ලබන්නෙකුගේ ඊමේල් ලිපිනයක් සැපයිය යුතුය.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP දෝෂය: පහත ලබන්නන් අසමත් විය: ';
$PHPMAILER_LANG['signing'] = 'Sign කිරීමේ දෝෂය: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP කේතය: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'අමතර SMTP තොරතුරු: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP සම්බන්ධය අසාර්ථක විය.';
$PHPMAILER_LANG['smtp_detail'] = 'තොරතුරු: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP දෝෂය: ';
$PHPMAILER_LANG['variable_set'] = 'Variable එක සැකසීමට හෝ නැවත සැකසීමට නොහැක: ';

Datei anzeigen

@ -9,13 +9,11 @@
*/ */
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
$PHPMAILER_LANG['buggy_php'] = '您的 PHP 版本存在漏洞,可能会导致消息损坏。为修复此问题,请切换到使用 SMTP 发送,在您的 php.ini 中禁用 mail.add_x_header 选项。切换到 MacOS 或 Linux或将您的 PHP 升级到 7.0.17+ 或 7.1.3+ 版本。';
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
$PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; $PHPMAILER_LANG['empty_message'] = '邮件正文为空。';
$PHPMAILER_LANG['encoding'] = '未知编码:'; $PHPMAILER_LANG['encoding'] = '未知编码:';
$PHPMAILER_LANG['execute'] = '无法执行:'; $PHPMAILER_LANG['execute'] = '无法执行:';
$PHPMAILER_LANG['extension_missing'] = '缺少扩展名:';
$PHPMAILER_LANG['file_access'] = '无法访问文件:'; $PHPMAILER_LANG['file_access'] = '无法访问文件:';
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; $PHPMAILER_LANG['from_failed'] = '发送地址错误:';
@ -24,13 +22,8 @@ $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
$PHPMAILER_LANG['signing'] = '登录失败:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。';
$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错'; $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错';
$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:';
$PHPMAILER_LANG['invalid_header'] = '无效的标题名称或值'; $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension';
$PHPMAILER_LANG['invalid_hostentry'] = '无效的hostentry ';
$PHPMAILER_LANG['invalid_host'] = '无效的主机:';
$PHPMAILER_LANG['signing'] = '签名错误:';
$PHPMAILER_LANG['smtp_code'] = 'SMTP代码 ';
$PHPMAILER_LANG['smtp_code_ex'] = '附加SMTP信息 ';
$PHPMAILER_LANG['smtp_detail'] = '详情:';

Datei anzeigen

@ -80,7 +80,9 @@ class DSNConfigurator
$config = $this->parseUrl($dsn); $config = $this->parseUrl($dsn);
if (false === $config || !isset($config['scheme']) || !isset($config['host'])) { if (false === $config || !isset($config['scheme']) || !isset($config['host'])) {
throw new Exception('Malformed DSN'); throw new Exception(
sprintf('Malformed DSN: "%s".', $dsn)
);
} }
if (isset($config['query'])) { if (isset($config['query'])) {

Datei anzeigen

@ -357,13 +357,6 @@ class PHPMailer
*/ */
public $AuthType = ''; public $AuthType = '';
/**
* SMTP SMTPXClient command attibutes
*
* @var array
*/
protected $SMTPXClient = [];
/** /**
* An implementation of the PHPMailer OAuthTokenProvider interface. * An implementation of the PHPMailer OAuthTokenProvider interface.
* *
@ -757,7 +750,7 @@ class PHPMailer
* *
* @var string * @var string
*/ */
const VERSION = '6.9.1'; const VERSION = '6.8.0';
/** /**
* Error severity: message only, continue processing. * Error severity: message only, continue processing.
@ -802,7 +795,7 @@ class PHPMailer
* The maximum line length supported by mail(). * The maximum line length supported by mail().
* *
* Background: mail() will sometimes corrupt messages * Background: mail() will sometimes corrupt messages
* with headers longer than 65 chars, see #818. * with headers headers longer than 65 chars, see #818.
* *
* @var int * @var int
*/ */
@ -1578,10 +1571,6 @@ class PHPMailer
//Validate From, Sender, and ConfirmReadingTo addresses //Validate From, Sender, and ConfirmReadingTo addresses
foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
if ($this->{$address_kind} === null) {
$this->{$address_kind} = '';
continue;
}
$this->{$address_kind} = trim($this->{$address_kind}); $this->{$address_kind} = trim($this->{$address_kind});
if (empty($this->{$address_kind})) { if (empty($this->{$address_kind})) {
continue; continue;
@ -2008,38 +1997,6 @@ class PHPMailer
return $this->smtp; return $this->smtp;
} }
/**
* Provide SMTP XCLIENT attributes
*
* @param string $name Attribute name
* @param ?string $value Attribute value
*
* @return bool
*/
public function setSMTPXclientAttribute($name, $value)
{
if (!in_array($name, SMTP::$xclient_allowed_attributes)) {
return false;
}
if (isset($this->SMTPXClient[$name]) && $value === null) {
unset($this->SMTPXClient[$name]);
} elseif ($value !== null) {
$this->SMTPXClient[$name] = $value;
}
return true;
}
/**
* Get SMTP XCLIENT attributes
*
* @return array
*/
public function getSMTPXclientAttributes()
{
return $this->SMTPXClient;
}
/** /**
* Send mail via SMTP. * Send mail via SMTP.
* Returns false if there is a bad MAIL FROM, RCPT, or DATA input. * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
@ -2068,9 +2025,6 @@ class PHPMailer
} else { } else {
$smtp_from = $this->Sender; $smtp_from = $this->Sender;
} }
if (count($this->SMTPXClient)) {
$this->smtp->xclient($this->SMTPXClient);
}
if (!$this->smtp->mail($smtp_from)) { if (!$this->smtp->mail($smtp_from)) {
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL);
@ -2233,17 +2187,10 @@ class PHPMailer
$this->smtp->hello($hello); $this->smtp->hello($hello);
//Automatically enable TLS encryption if: //Automatically enable TLS encryption if:
//* it's not disabled //* it's not disabled
//* we are not connecting to localhost
//* we have openssl extension //* we have openssl extension
//* we are not already using SSL //* we are not already using SSL
//* the server offers STARTTLS //* the server offers STARTTLS
if ( if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
$this->SMTPAutoTLS &&
$this->Host !== 'localhost' &&
$sslext &&
$secure !== 'ssl' &&
$this->smtp->getServerExt('STARTTLS')
) {
$tls = true; $tls = true;
} }
if ($tls) { if ($tls) {
@ -4100,79 +4047,6 @@ class PHPMailer
$this->CustomHeader = []; $this->CustomHeader = [];
} }
/**
* Clear a specific custom header by name or name and value.
* $name value can be overloaded to contain
* both header name and value (name:value).
*
* @param string $name Custom header name
* @param string|null $value Header value
*
* @return bool True if a header was replaced successfully
*/
public function clearCustomHeader($name, $value = null)
{
if (null === $value && strpos($name, ':') !== false) {
//Value passed in as name:value
list($name, $value) = explode(':', $name, 2);
}
$name = trim($name);
$value = (null === $value) ? null : trim($value);
foreach ($this->CustomHeader as $k => $pair) {
if ($pair[0] == $name) {
// We remove the header if the value is not provided or it matches.
if (null === $value || $pair[1] == $value) {
unset($this->CustomHeader[$k]);
}
}
}
return true;
}
/**
* Replace a custom header.
* $name value can be overloaded to contain
* both header name and value (name:value).
*
* @param string $name Custom header name
* @param string|null $value Header value
*
* @return bool True if a header was replaced successfully
* @throws Exception
*/
public function replaceCustomHeader($name, $value = null)
{
if (null === $value && strpos($name, ':') !== false) {
//Value passed in as name:value
list($name, $value) = explode(':', $name, 2);
}
$name = trim($name);
$value = (null === $value) ? '' : trim($value);
$replaced = false;
foreach ($this->CustomHeader as $k => $pair) {
if ($pair[0] == $name) {
if ($replaced) {
unset($this->CustomHeader[$k]);
continue;
}
if (strpbrk($name . $value, "\r\n") !== false) {
if ($this->exceptions) {
throw new Exception($this->lang('invalid_header'));
}
return false;
}
$this->CustomHeader[$k] = [$name, $value];
$replaced = true;
}
}
return true;
}
/** /**
* Add an error message to the error container. * Add an error message to the error container.
* *

Datei anzeigen

@ -46,7 +46,7 @@ class POP3
* *
* @var string * @var string
*/ */
const VERSION = '6.9.1'; const VERSION = '6.8.0';
/** /**
* Default POP3 port number. * Default POP3 port number.

Datei anzeigen

@ -35,7 +35,7 @@ class SMTP
* *
* @var string * @var string
*/ */
const VERSION = '6.9.1'; const VERSION = '6.8.0';
/** /**
* SMTP line break constant. * SMTP line break constant.
@ -198,18 +198,6 @@ class SMTP
'Mailjet' => '/[\d]{3} OK queued as (.*)/', 'Mailjet' => '/[\d]{3} OK queued as (.*)/',
]; ];
/**
* Allowed SMTP XCLIENT attributes.
* Must be allowed by the SMTP server. EHLO response is not checked.
*
* @see https://www.postfix.org/XCLIENT_README.html
*
* @var array
*/
public static $xclient_allowed_attributes = [
'NAME', 'ADDR', 'PORT', 'PROTO', 'HELO', 'LOGIN', 'DESTADDR', 'DESTPORT'
];
/** /**
* The last transaction ID issued in response to a DATA command, * The last transaction ID issued in response to a DATA command,
* if one was detected. * if one was detected.
@ -716,7 +704,7 @@ class SMTP
* Send an SMTP DATA command. * Send an SMTP DATA command.
* Issues a data command and sends the msg_data to the server, * Issues a data command and sends the msg_data to the server,
* finalizing the mail transaction. $msg_data is the message * finalizing the mail transaction. $msg_data is the message
* that is to be sent with the headers. Each header needs to be * that is to be send with the headers. Each header needs to be
* on a single line followed by a <CRLF> with the message headers * on a single line followed by a <CRLF> with the message headers
* and the message body being separated by an additional <CRLF>. * and the message body being separated by an additional <CRLF>.
* Implements RFC 821: DATA <CRLF>. * Implements RFC 821: DATA <CRLF>.
@ -744,7 +732,7 @@ class SMTP
$lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data));
/* To distinguish between a complete RFC822 message and a plain message body, we check if the first field /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field
* of the first line (':' separated) does not contain a space then it _should_ be a header, and we will * of the first line (':' separated) does not contain a space then it _should_ be a header and we will
* process all lines before a blank line as headers. * process all lines before a blank line as headers.
*/ */
@ -983,25 +971,6 @@ class SMTP
); );
} }
/**
* Send SMTP XCLIENT command to server and check its return code.
*
* @return bool True on success
*/
public function xclient(array $vars)
{
$xclient_options = "";
foreach ($vars as $key => $value) {
if (in_array($key, SMTP::$xclient_allowed_attributes)) {
$xclient_options .= " {$key}={$value}";
}
}
if (!$xclient_options) {
return true;
}
return $this->sendCommand('XCLIENT', 'XCLIENT' . $xclient_options, 250);
}
/** /**
* Send an SMTP RSET command. * Send an SMTP RSET command.
* Abort any transaction that is currently in progress. * Abort any transaction that is currently in progress.

232
vendor/symfony/polyfill-ctype/Ctype.php gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,232 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Ctype;
/**
* Ctype implementation through regex.
*
* @internal
*
* @author Gert de Pagter <BackEndTea@gmail.com>
*/
final class Ctype
{
/**
* Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
*
* @see https://php.net/ctype-alnum
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_alnum($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
}
/**
* Returns TRUE if every character in text is a letter, FALSE otherwise.
*
* @see https://php.net/ctype-alpha
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_alpha($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
}
/**
* Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
*
* @see https://php.net/ctype-cntrl
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_cntrl($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
}
/**
* Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
*
* @see https://php.net/ctype-digit
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_digit($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
}
/**
* Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
*
* @see https://php.net/ctype-graph
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_graph($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
}
/**
* Returns TRUE if every character in text is a lowercase letter.
*
* @see https://php.net/ctype-lower
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_lower($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
}
/**
* Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
*
* @see https://php.net/ctype-print
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_print($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
}
/**
* Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
*
* @see https://php.net/ctype-punct
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_punct($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
}
/**
* Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
*
* @see https://php.net/ctype-space
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_space($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
}
/**
* Returns TRUE if every character in text is an uppercase letter.
*
* @see https://php.net/ctype-upper
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_upper($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
}
/**
* Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
*
* @see https://php.net/ctype-xdigit
*
* @param mixed $text
*
* @return bool
*/
public static function ctype_xdigit($text)
{
$text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
}
/**
* Converts integers to their char versions according to normal ctype behaviour, if needed.
*
* If an integer between -128 and 255 inclusive is provided,
* it is interpreted as the ASCII value of a single character
* (negative values have 256 added in order to allow characters in the Extended ASCII range).
* Any other integer is interpreted as a string containing the decimal digits of the integer.
*
* @param mixed $int
* @param string $function
*
* @return mixed
*/
private static function convert_int_to_char_for_ctype($int, $function)
{
if (!\is_int($int)) {
return $int;
}
if ($int < -128 || $int > 255) {
return (string) $int;
}
if (\PHP_VERSION_ID >= 80100) {
@trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
}
if ($int < 0) {
$int += 256;
}
return \chr($int);
}
}

19
vendor/symfony/polyfill-ctype/LICENSE gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,19 @@
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

12
vendor/symfony/polyfill-ctype/README.md gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,12 @@
Symfony Polyfill / Ctype
========================
This component provides `ctype_*` functions to users who run php versions without the ctype extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
This library is released under the [MIT license](LICENSE).

50
vendor/symfony/polyfill-ctype/bootstrap.php gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,50 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Ctype as p;
if (\PHP_VERSION_ID >= 80000) {
return require __DIR__.'/bootstrap80.php';
}
if (!function_exists('ctype_alnum')) {
function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
}
if (!function_exists('ctype_alpha')) {
function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
}
if (!function_exists('ctype_cntrl')) {
function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
}
if (!function_exists('ctype_digit')) {
function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
}
if (!function_exists('ctype_graph')) {
function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
}
if (!function_exists('ctype_lower')) {
function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
}
if (!function_exists('ctype_print')) {
function ctype_print($text) { return p\Ctype::ctype_print($text); }
}
if (!function_exists('ctype_punct')) {
function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
}
if (!function_exists('ctype_space')) {
function ctype_space($text) { return p\Ctype::ctype_space($text); }
}
if (!function_exists('ctype_upper')) {
function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
}
if (!function_exists('ctype_xdigit')) {
function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
}

Datei anzeigen

@ -0,0 +1,46 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Ctype as p;
if (!function_exists('ctype_alnum')) {
function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); }
}
if (!function_exists('ctype_alpha')) {
function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); }
}
if (!function_exists('ctype_cntrl')) {
function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); }
}
if (!function_exists('ctype_digit')) {
function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); }
}
if (!function_exists('ctype_graph')) {
function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); }
}
if (!function_exists('ctype_lower')) {
function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); }
}
if (!function_exists('ctype_print')) {
function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); }
}
if (!function_exists('ctype_punct')) {
function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); }
}
if (!function_exists('ctype_space')) {
function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); }
}
if (!function_exists('ctype_upper')) {
function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); }
}
if (!function_exists('ctype_xdigit')) {
function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); }
}

41
vendor/symfony/polyfill-ctype/composer.json gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,41 @@
{
"name": "symfony/polyfill-ctype",
"type": "library",
"description": "Symfony polyfill for ctype functions",
"keywords": ["polyfill", "compatibility", "portable", "ctype"],
"homepage": "https://symfony.com",
"license": "MIT",
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
"files": [ "bootstrap.php" ]
},
"suggest": {
"ext-ctype": "For best performance"
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
}

19
vendor/symfony/polyfill-mbstring/LICENSE gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,19 @@
Copyright (c) 2015-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

874
vendor/symfony/polyfill-mbstring/Mbstring.php gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,874 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Mbstring;
/**
* Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
*
* Implemented:
* - mb_chr - Returns a specific character from its Unicode code point
* - mb_convert_encoding - Convert character encoding
* - mb_convert_variables - Convert character code in variable(s)
* - mb_decode_mimeheader - Decode string in MIME header field
* - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
* - mb_decode_numericentity - Decode HTML numeric string reference to character
* - mb_encode_numericentity - Encode character to HTML numeric string reference
* - mb_convert_case - Perform case folding on a string
* - mb_detect_encoding - Detect character encoding
* - mb_get_info - Get internal settings of mbstring
* - mb_http_input - Detect HTTP input character encoding
* - mb_http_output - Set/Get HTTP output character encoding
* - mb_internal_encoding - Set/Get internal character encoding
* - mb_list_encodings - Returns an array of all supported encodings
* - mb_ord - Returns the Unicode code point of a character
* - mb_output_handler - Callback function converts character encoding in output buffer
* - mb_scrub - Replaces ill-formed byte sequences with substitute characters
* - mb_strlen - Get string length
* - mb_strpos - Find position of first occurrence of string in a string
* - mb_strrpos - Find position of last occurrence of a string in a string
* - mb_str_split - Convert a string to an array
* - mb_strtolower - Make a string lowercase
* - mb_strtoupper - Make a string uppercase
* - mb_substitute_character - Set/Get substitution character
* - mb_substr - Get part of string
* - mb_stripos - Finds position of first occurrence of a string within another, case insensitive
* - mb_stristr - Finds first occurrence of a string within another, case insensitive
* - mb_strrchr - Finds the last occurrence of a character in a string within another
* - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
* - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
* - mb_strstr - Finds first occurrence of a string within another
* - mb_strwidth - Return width of string
* - mb_substr_count - Count the number of substring occurrences
*
* Not implemented:
* - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
* - mb_ereg_* - Regular expression with multibyte support
* - mb_parse_str - Parse GET/POST/COOKIE data and set global variable
* - mb_preferred_mime_name - Get MIME charset string
* - mb_regex_encoding - Returns current encoding for multibyte regex as string
* - mb_regex_set_options - Set/Get the default options for mbregex functions
* - mb_send_mail - Send encoded mail
* - mb_split - Split multibyte string using regular expression
* - mb_strcut - Get part of string
* - mb_strimwidth - Get truncated string with specified width
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
final class Mbstring
{
public const MB_CASE_FOLD = \PHP_INT_MAX;
private const CASE_FOLD = [
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
];
private static $encodingList = ['ASCII', 'UTF-8'];
private static $language = 'neutral';
private static $internalEncoding = 'UTF-8';
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
{
if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) {
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
} else {
$fromEncoding = self::getEncoding($fromEncoding);
}
$toEncoding = self::getEncoding($toEncoding);
if ('BASE64' === $fromEncoding) {
$s = base64_decode($s);
$fromEncoding = $toEncoding;
}
if ('BASE64' === $toEncoding) {
return base64_encode($s);
}
if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
$fromEncoding = 'Windows-1252';
}
if ('UTF-8' !== $fromEncoding) {
$s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
}
return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
}
if ('HTML-ENTITIES' === $fromEncoding) {
$s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8');
$fromEncoding = 'UTF-8';
}
return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
}
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
{
$ok = true;
array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
$ok = false;
}
});
return $ok ? $fromEncoding : false;
}
public static function mb_decode_mimeheader($s)
{
return iconv_mime_decode($s, 2, self::$internalEncoding);
}
public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
{
trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING);
}
public static function mb_decode_numericentity($s, $convmap, $encoding = null)
{
if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);
return null;
}
if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
return false;
}
if (null !== $encoding && !\is_scalar($encoding)) {
trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);
return ''; // Instead of null (cf. mb_encode_numericentity).
}
$s = (string) $s;
if ('' === $s) {
return '';
}
$encoding = self::getEncoding($encoding);
if ('UTF-8' === $encoding) {
$encoding = null;
if (!preg_match('//u', $s)) {
$s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
$cnt = floor(\count($convmap) / 4) * 4;
for ($i = 0; $i < $cnt; $i += 4) {
// collector_decode_htmlnumericentity ignores $convmap[$i + 3]
$convmap[$i] += $convmap[$i + 2];
$convmap[$i + 1] += $convmap[$i + 2];
}
$s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) {
$c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1];
for ($i = 0; $i < $cnt; $i += 4) {
if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) {
return self::mb_chr($c - $convmap[$i + 2]);
}
}
return $m[0];
}, $s);
if (null === $encoding) {
return $s;
}
return iconv('UTF-8', $encoding.'//IGNORE', $s);
}
public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
{
if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);
return null;
}
if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
return false;
}
if (null !== $encoding && !\is_scalar($encoding)) {
trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);
return null; // Instead of '' (cf. mb_decode_numericentity).
}
if (null !== $is_hex && !\is_scalar($is_hex)) {
trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING);
return null;
}
$s = (string) $s;
if ('' === $s) {
return '';
}
$encoding = self::getEncoding($encoding);
if ('UTF-8' === $encoding) {
$encoding = null;
if (!preg_match('//u', $s)) {
$s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
$cnt = floor(\count($convmap) / 4) * 4;
$i = 0;
$len = \strlen($s);
$result = '';
while ($i < $len) {
$ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
$uchr = substr($s, $i, $ulen);
$i += $ulen;
$c = self::mb_ord($uchr);
for ($j = 0; $j < $cnt; $j += 4) {
if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) {
$cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3];
$result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';';
continue 2;
}
}
$result .= $uchr;
}
if (null === $encoding) {
return $result;
}
return iconv('UTF-8', $encoding.'//IGNORE', $result);
}
public static function mb_convert_case($s, $mode, $encoding = null)
{
$s = (string) $s;
if ('' === $s) {
return '';
}
$encoding = self::getEncoding($encoding);
if ('UTF-8' === $encoding) {
$encoding = null;
if (!preg_match('//u', $s)) {
$s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
if (\MB_CASE_TITLE == $mode) {
static $titleRegexp = null;
if (null === $titleRegexp) {
$titleRegexp = self::getData('titleCaseRegexp');
}
$s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s);
} else {
if (\MB_CASE_UPPER == $mode) {
static $upper = null;
if (null === $upper) {
$upper = self::getData('upperCase');
}
$map = $upper;
} else {
if (self::MB_CASE_FOLD === $mode) {
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
}
static $lower = null;
if (null === $lower) {
$lower = self::getData('lowerCase');
}
$map = $lower;
}
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
$i = 0;
$len = \strlen($s);
while ($i < $len) {
$ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
$uchr = substr($s, $i, $ulen);
$i += $ulen;
if (isset($map[$uchr])) {
$uchr = $map[$uchr];
$nlen = \strlen($uchr);
if ($nlen == $ulen) {
$nlen = $i;
do {
$s[--$nlen] = $uchr[--$ulen];
} while ($ulen);
} else {
$s = substr_replace($s, $uchr, $i - $ulen, $ulen);
$len += $nlen - $ulen;
$i += $nlen - $ulen;
}
}
}
}
if (null === $encoding) {
return $s;
}
return iconv('UTF-8', $encoding.'//IGNORE', $s);
}
public static function mb_internal_encoding($encoding = null)
{
if (null === $encoding) {
return self::$internalEncoding;
}
$normalizedEncoding = self::getEncoding($encoding);
if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
self::$internalEncoding = $normalizedEncoding;
return true;
}
if (80000 > \PHP_VERSION_ID) {
return false;
}
throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding));
}
public static function mb_language($lang = null)
{
if (null === $lang) {
return self::$language;
}
switch ($normalizedLang = strtolower($lang)) {
case 'uni':
case 'neutral':
self::$language = $normalizedLang;
return true;
}
if (80000 > \PHP_VERSION_ID) {
return false;
}
throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang));
}
public static function mb_list_encodings()
{
return ['UTF-8'];
}
public static function mb_encoding_aliases($encoding)
{
switch (strtoupper($encoding)) {
case 'UTF8':
case 'UTF-8':
return ['utf8'];
}
return false;
}
public static function mb_check_encoding($var = null, $encoding = null)
{
if (null === $encoding) {
if (null === $var) {
return false;
}
$encoding = self::$internalEncoding;
}
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
}
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
{
if (null === $encodingList) {
$encodingList = self::$encodingList;
} else {
if (!\is_array($encodingList)) {
$encodingList = array_map('trim', explode(',', $encodingList));
}
$encodingList = array_map('strtoupper', $encodingList);
}
foreach ($encodingList as $enc) {
switch ($enc) {
case 'ASCII':
if (!preg_match('/[\x80-\xFF]/', $str)) {
return $enc;
}
break;
case 'UTF8':
case 'UTF-8':
if (preg_match('//u', $str)) {
return 'UTF-8';
}
break;
default:
if (0 === strncmp($enc, 'ISO-8859-', 9)) {
return $enc;
}
}
}
return false;
}
public static function mb_detect_order($encodingList = null)
{
if (null === $encodingList) {
return self::$encodingList;
}
if (!\is_array($encodingList)) {
$encodingList = array_map('trim', explode(',', $encodingList));
}
$encodingList = array_map('strtoupper', $encodingList);
foreach ($encodingList as $enc) {
switch ($enc) {
default:
if (strncmp($enc, 'ISO-8859-', 9)) {
return false;
}
// no break
case 'ASCII':
case 'UTF8':
case 'UTF-8':
}
}
self::$encodingList = $encodingList;
return true;
}
public static function mb_strlen($s, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return \strlen($s);
}
return @iconv_strlen($s, $encoding);
}
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return strpos($haystack, $needle, $offset);
}
$needle = (string) $needle;
if ('' === $needle) {
if (80000 > \PHP_VERSION_ID) {
trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING);
return false;
}
return 0;
}
return iconv_strpos($haystack, $needle, $offset, $encoding);
}
public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return strrpos($haystack, $needle, $offset);
}
if ($offset != (int) $offset) {
$offset = 0;
} elseif ($offset = (int) $offset) {
if ($offset < 0) {
if (0 > $offset += self::mb_strlen($needle)) {
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
}
$offset = 0;
} else {
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
}
}
$pos = '' !== $needle || 80000 > \PHP_VERSION_ID
? iconv_strrpos($haystack, $needle, $encoding)
: self::mb_strlen($haystack, $encoding);
return false !== $pos ? $offset + $pos : false;
}
public static function mb_str_split($string, $split_length = 1, $encoding = null)
{
if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) {
trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING);
return null;
}
if (1 > $split_length = (int) $split_length) {
if (80000 > \PHP_VERSION_ID) {
trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING);
return false;
}
throw new \ValueError('Argument #2 ($length) must be greater than 0');
}
if (null === $encoding) {
$encoding = mb_internal_encoding();
}
if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
$rx = '/(';
while (65535 < $split_length) {
$rx .= '.{65535}';
$split_length -= 65535;
}
$rx .= '.{'.$split_length.'})/us';
return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
}
$result = [];
$length = mb_strlen($string, $encoding);
for ($i = 0; $i < $length; $i += $split_length) {
$result[] = mb_substr($string, $i, $split_length, $encoding);
}
return $result;
}
public static function mb_strtolower($s, $encoding = null)
{
return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding);
}
public static function mb_strtoupper($s, $encoding = null)
{
return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding);
}
public static function mb_substitute_character($c = null)
{
if (null === $c) {
return 'none';
}
if (0 === strcasecmp($c, 'none')) {
return true;
}
if (80000 > \PHP_VERSION_ID) {
return false;
}
if (\is_int($c) || 'long' === $c || 'entity' === $c) {
return false;
}
throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
}
public static function mb_substr($s, $start, $length = null, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return (string) substr($s, $start, null === $length ? 2147483647 : $length);
}
if ($start < 0) {
$start = iconv_strlen($s, $encoding) + $start;
if ($start < 0) {
$start = 0;
}
}
if (null === $length) {
$length = 2147483647;
} elseif ($length < 0) {
$length = iconv_strlen($s, $encoding) + $length - $start;
if ($length < 0) {
return '';
}
}
return (string) iconv_substr($s, $start, $length, $encoding);
}
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
{
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
return self::mb_strpos($haystack, $needle, $offset, $encoding);
}
public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
{
$pos = self::mb_stripos($haystack, $needle, 0, $encoding);
return self::getSubpart($pos, $part, $haystack, $encoding);
}
public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
$pos = strrpos($haystack, $needle);
} else {
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = iconv_strrpos($haystack, $needle, $encoding);
}
return self::getSubpart($pos, $part, $haystack, $encoding);
}
public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
{
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = self::mb_strripos($haystack, $needle, $encoding);
return self::getSubpart($pos, $part, $haystack, $encoding);
}
public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
{
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
}
public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
{
$pos = strpos($haystack, $needle);
if (false === $pos) {
return false;
}
if ($part) {
return substr($haystack, 0, $pos);
}
return substr($haystack, $pos);
}
public static function mb_get_info($type = 'all')
{
$info = [
'internal_encoding' => self::$internalEncoding,
'http_output' => 'pass',
'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)',
'func_overload' => 0,
'func_overload_list' => 'no overload',
'mail_charset' => 'UTF-8',
'mail_header_encoding' => 'BASE64',
'mail_body_encoding' => 'BASE64',
'illegal_chars' => 0,
'encoding_translation' => 'Off',
'language' => self::$language,
'detect_order' => self::$encodingList,
'substitute_character' => 'none',
'strict_detection' => 'Off',
];
if ('all' === $type) {
return $info;
}
if (isset($info[$type])) {
return $info[$type];
}
return false;
}
public static function mb_http_input($type = '')
{
return false;
}
public static function mb_http_output($encoding = null)
{
return null !== $encoding ? 'pass' === $encoding : 'pass';
}
public static function mb_strwidth($s, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('UTF-8' !== $encoding) {
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
$s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
return ($wide << 1) + iconv_strlen($s, 'UTF-8');
}
public static function mb_substr_count($haystack, $needle, $encoding = null)
{
return substr_count($haystack, $needle);
}
public static function mb_output_handler($contents, $status)
{
return $contents;
}
public static function mb_chr($code, $encoding = null)
{
if (0x80 > $code %= 0x200000) {
$s = \chr($code);
} elseif (0x800 > $code) {
$s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
} elseif (0x10000 > $code) {
$s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
} else {
$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
}
if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
$s = mb_convert_encoding($s, $encoding, 'UTF-8');
}
return $s;
}
public static function mb_ord($s, $encoding = null)
{
if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
$s = mb_convert_encoding($s, 'UTF-8', $encoding);
}
if (1 === \strlen($s)) {
return \ord($s);
}
$code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
if (0xF0 <= $code) {
return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
}
if (0xE0 <= $code) {
return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
}
if (0xC0 <= $code) {
return (($code - 0xC0) << 6) + $s[2] - 0x80;
}
return $code;
}
private static function getSubpart($pos, $part, $haystack, $encoding)
{
if (false === $pos) {
return false;
}
if ($part) {
return self::mb_substr($haystack, 0, $pos, $encoding);
}
return self::mb_substr($haystack, $pos, null, $encoding);
}
private static function html_encoding_callback(array $m)
{
$i = 1;
$entities = '';
$m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8'));
while (isset($m[$i])) {
if (0x80 > $m[$i]) {
$entities .= \chr($m[$i++]);
continue;
}
if (0xF0 <= $m[$i]) {
$c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
} elseif (0xE0 <= $m[$i]) {
$c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
} else {
$c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
}
$entities .= '&#'.$c.';';
}
return $entities;
}
private static function title_case(array $s)
{
return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8');
}
private static function getData($file)
{
if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
return require $file;
}
return false;
}
private static function getEncoding($encoding)
{
if (null === $encoding) {
return self::$internalEncoding;
}
if ('UTF-8' === $encoding) {
return 'UTF-8';
}
$encoding = strtoupper($encoding);
if ('8BIT' === $encoding || 'BINARY' === $encoding) {
return 'CP850';
}
if ('UTF8' === $encoding) {
return 'UTF-8';
}
return $encoding;
}
}

13
vendor/symfony/polyfill-mbstring/README.md gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,13 @@
Symfony Polyfill / Mbstring
===========================
This component provides a partial, native PHP implementation for the
[Mbstring](https://php.net/mbstring) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
This library is released under the [MIT license](LICENSE).

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -0,0 +1,147 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Mbstring as p;
if (\PHP_VERSION_ID >= 80000) {
return require __DIR__.'/bootstrap80.php';
}
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
}
if (!function_exists('mb_encode_mimeheader')) {
function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
}
if (!function_exists('mb_encode_numericentity')) {
function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
}
if (!function_exists('mb_convert_case')) {
function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
function mb_language($language = null) { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
}
if (!function_exists('mb_encoding_aliases')) {
function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
}
if (!function_exists('mb_check_encoding')) {
function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
}
if (!function_exists('mb_detect_order')) {
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; }
}
if (!function_exists('mb_strlen')) {
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
}
if (!function_exists('mb_strpos')) {
function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
}
if (!function_exists('mb_strtoupper')) {
function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
}
if (!function_exists('mb_http_output')) {
function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
}
if (!function_exists('mb_substr_count')) {
function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
}
if (!function_exists('mb_output_handler')) {
function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
}
if (!function_exists('mb_http_input')) {
function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); }
}
if (!function_exists('mb_convert_variables')) {
function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); }
}
if (!function_exists('mb_ord')) {
function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
}
if (!function_exists('mb_chr')) {
function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
}
if (!function_exists('mb_str_split')) {
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
}
if (extension_loaded('mbstring')) {
return;
}
if (!defined('MB_CASE_UPPER')) {
define('MB_CASE_UPPER', 0);
}
if (!defined('MB_CASE_LOWER')) {
define('MB_CASE_LOWER', 1);
}
if (!defined('MB_CASE_TITLE')) {
define('MB_CASE_TITLE', 2);
}

Datei anzeigen

@ -0,0 +1,143 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Mbstring as p;
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); }
}
if (!function_exists('mb_encode_mimeheader')) {
function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); }
}
if (!function_exists('mb_encode_numericentity')) {
function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); }
}
if (!function_exists('mb_convert_case')) {
function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
}
if (!function_exists('mb_encoding_aliases')) {
function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); }
}
if (!function_exists('mb_check_encoding')) {
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
}
if (!function_exists('mb_detect_order')) {
function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; }
}
if (!function_exists('mb_strlen')) {
function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
}
if (!function_exists('mb_strpos')) {
function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); }
}
if (!function_exists('mb_strtoupper')) {
function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
}
if (!function_exists('mb_http_output')) {
function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); }
}
if (!function_exists('mb_substr_count')) {
function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); }
}
if (!function_exists('mb_output_handler')) {
function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); }
}
if (!function_exists('mb_http_input')) {
function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
}
if (!function_exists('mb_convert_variables')) {
function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
}
if (!function_exists('mb_ord')) {
function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); }
}
if (!function_exists('mb_chr')) {
function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); }
}
if (!function_exists('mb_str_split')) {
function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
}
if (extension_loaded('mbstring')) {
return;
}
if (!defined('MB_CASE_UPPER')) {
define('MB_CASE_UPPER', 0);
}
if (!defined('MB_CASE_LOWER')) {
define('MB_CASE_LOWER', 1);
}
if (!defined('MB_CASE_TITLE')) {
define('MB_CASE_TITLE', 2);
}

Datei anzeigen

@ -0,0 +1,41 @@
{
"name": "symfony/polyfill-mbstring",
"type": "library",
"description": "Symfony polyfill for the Mbstring extension",
"keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
"homepage": "https://symfony.com",
"license": "MIT",
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
"files": [ "bootstrap.php" ]
},
"suggest": {
"ext-mbstring": "For best performance"
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
}

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen