Commits vergleichen
2 Commits
Autor | SHA1 | Datum |
---|---|---|
Ortwin Pinke | eacbe1ea8e | |
o.pinke | 5175025b58 |
|
@ -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
|
||||||
|
|
|
@ -4,8 +4,21 @@
|
||||||
<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" />
|
||||||
|
@ -15,8 +28,6 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/conlite/plugins/de.ortwinpinke.soccer_betting_game/vendor/composer" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/conlite/plugins/de.ortwinpinke.soccer_betting_game/vendor/rinvex/countries" />
|
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|
|
@ -18,9 +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>
|
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -19,12 +19,6 @@
|
||||||
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||||
<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" />
|
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.0">
|
<component name="PhpProjectSharedConfiguration" php_language_level="8.0">
|
||||||
|
|
|
@ -17,9 +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>
|
|
||||||
</suites>
|
</suites>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -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>
|
|
@ -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">{
|
||||||
|
"keyToString": {
|
||||||
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"WebServerToolWindowFactoryState": "false",
|
||||||
|
"last_opened_file_path": "/var/www/html/clphp8/cms/data/modules/cl_contactform/php",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}</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>
|
76
README.md
76
README.md
|
@ -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
|
||||||
|
|
|
@ -88,16 +88,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.28.0",
|
"version": "v1.27.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
|
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||||
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
|
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.28-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -166,20 +166,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-01-26T09:26:14+00:00"
|
"time": "2022-11-03T14:55:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.28.0",
|
"version": "v1.27.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "42292d99c55abe617799667f454222c54c60e229"
|
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||||
"reference": "42292d99c55abe617799667f454222c54c60e229",
|
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.28-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
|
@ -233,7 +233,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -249,20 +249,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-07-28T09:04:16+00:00"
|
"time": "2022-11-03T14:55:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.7.1",
|
"version": "v3.7.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554"
|
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b",
|
||||||
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
|
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/container": "^1.0|^2.0",
|
"psr/container": "^1.0|^2.0",
|
||||||
"symfony/phpunit-bridge": "^5.4.9|^6.3"
|
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/twigphp/Twig/issues",
|
"issues": "https://github.com/twigphp/Twig/issues",
|
||||||
"source": "https://github.com/twigphp/Twig/tree/v3.7.1"
|
"source": "https://github.com/twigphp/Twig/tree/v3.7.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -320,7 +320,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-28T11:09:02+00:00"
|
"time": "2023-07-26T07:16:09+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
@ -385,16 +385,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.17.1",
|
"version": "v4.15.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
|
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||||
"reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
|
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -435,9 +435,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
|
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
|
||||||
},
|
},
|
||||||
"time": "2023-08-13T19:53:39+00:00"
|
"time": "2023-03-05T19:49:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phar-io/manifest",
|
"name": "phar-io/manifest",
|
||||||
|
@ -552,16 +552,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan",
|
"name": "phpstan/phpstan",
|
||||||
"version": "1.10.39",
|
"version": "1.10.14",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpstan.git",
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
"reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4"
|
"reference": "d232901b09e67538e5c86a724be841bea5768a7c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4",
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d232901b09e67538e5c86a724be841bea5768a7c",
|
||||||
"reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4",
|
"reference": "d232901b09e67538e5c86a724be841bea5768a7c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -610,20 +610,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-10-17T15:46:26+00:00"
|
"time": "2023-04-19T13:47:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "10.1.7",
|
"version": "10.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "355324ca4980b8916c18b9db29f3ef484078f26e"
|
"reference": "884a0da7f9f46f28b2cb69134217fd810b793974"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974",
|
||||||
"reference": "355324ca4980b8916c18b9db29f3ef484078f26e",
|
"reference": "884a0da7f9f46f28b2cb69134217fd810b793974",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -680,7 +680,7 @@
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
|
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
|
||||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7"
|
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -688,20 +688,20 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-10-04T15:34:17+00:00"
|
"time": "2023-04-17T12:15:40+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
"version": "4.1.0",
|
"version": "4.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||||
"reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c"
|
"reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd",
|
||||||
"reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c",
|
"reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -740,8 +740,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
|
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
|
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1"
|
||||||
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -749,7 +748,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-31T06:24:48+00:00"
|
"time": "2023-02-10T16:53:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-invoker",
|
"name": "phpunit/php-invoker",
|
||||||
|
@ -816,16 +815,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-text-template",
|
"name": "phpunit/php-text-template",
|
||||||
"version": "3.0.1",
|
"version": "3.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||||
"reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748"
|
"reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d",
|
||||||
"reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748",
|
"reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -863,8 +862,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
|
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/php-text-template/security/policy",
|
"source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0"
|
||||||
"source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -872,7 +870,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-31T14:07:24+00:00"
|
"time": "2023-02-03T06:56:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-timer",
|
"name": "phpunit/php-timer",
|
||||||
|
@ -935,16 +933,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "10.4.1",
|
"version": "10.1.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "62bd7af13d282deeb95650077d28ba3600ca321c"
|
"reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/62bd7af13d282deeb95650077d28ba3600ca321c",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6f0cd95be71add539f8fd2be25b2a4a29789000b",
|
||||||
"reference": "62bd7af13d282deeb95650077d28ba3600ca321c",
|
"reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -958,7 +956,7 @@
|
||||||
"phar-io/manifest": "^2.0.3",
|
"phar-io/manifest": "^2.0.3",
|
||||||
"phar-io/version": "^3.0.2",
|
"phar-io/version": "^3.0.2",
|
||||||
"php": ">=8.1",
|
"php": ">=8.1",
|
||||||
"phpunit/php-code-coverage": "^10.1.5",
|
"phpunit/php-code-coverage": "^10.1.1",
|
||||||
"phpunit/php-file-iterator": "^4.0",
|
"phpunit/php-file-iterator": "^4.0",
|
||||||
"phpunit/php-invoker": "^4.0",
|
"phpunit/php-invoker": "^4.0",
|
||||||
"phpunit/php-text-template": "^3.0",
|
"phpunit/php-text-template": "^3.0",
|
||||||
|
@ -968,8 +966,8 @@
|
||||||
"sebastian/comparator": "^5.0",
|
"sebastian/comparator": "^5.0",
|
||||||
"sebastian/diff": "^5.0",
|
"sebastian/diff": "^5.0",
|
||||||
"sebastian/environment": "^6.0",
|
"sebastian/environment": "^6.0",
|
||||||
"sebastian/exporter": "^5.1",
|
"sebastian/exporter": "^5.0",
|
||||||
"sebastian/global-state": "^6.0.1",
|
"sebastian/global-state": "^6.0",
|
||||||
"sebastian/object-enumerator": "^5.0",
|
"sebastian/object-enumerator": "^5.0",
|
||||||
"sebastian/recursion-context": "^5.0",
|
"sebastian/recursion-context": "^5.0",
|
||||||
"sebastian/type": "^4.0",
|
"sebastian/type": "^4.0",
|
||||||
|
@ -984,7 +982,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "10.4-dev"
|
"dev-main": "10.1-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -1016,7 +1014,7 @@
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.1"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1032,7 +1030,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-10-08T05:01:11+00:00"
|
"time": "2023-04-22T07:38:19+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rector/rector",
|
"name": "rector/rector",
|
||||||
|
@ -1264,16 +1262,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/comparator",
|
"name": "sebastian/comparator",
|
||||||
"version": "5.0.1",
|
"version": "5.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||||
"reference": "2db5010a484d53ebf536087a70b4a5423c102372"
|
"reference": "72f01e6586e0caf6af81297897bd112eb7e9627c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372",
|
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c",
|
||||||
"reference": "2db5010a484d53ebf536087a70b4a5423c102372",
|
"reference": "72f01e6586e0caf6af81297897bd112eb7e9627c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1284,7 +1282,7 @@
|
||||||
"sebastian/exporter": "^5.0"
|
"sebastian/exporter": "^5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^10.3"
|
"phpunit/phpunit": "^10.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -1328,8 +1326,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
|
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0"
|
||||||
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1337,20 +1334,20 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-14T13:18:12+00:00"
|
"time": "2023-02-03T07:07:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/complexity",
|
"name": "sebastian/complexity",
|
||||||
"version": "3.1.0",
|
"version": "3.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/complexity.git",
|
"url": "https://github.com/sebastianbergmann/complexity.git",
|
||||||
"reference": "68cfb347a44871f01e33ab0ef8215966432f6957"
|
"reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957",
|
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6",
|
||||||
"reference": "68cfb347a44871f01e33ab0ef8215966432f6957",
|
"reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1363,7 +1360,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "3.1-dev"
|
"dev-main": "3.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -1386,8 +1383,7 @@
|
||||||
"homepage": "https://github.com/sebastianbergmann/complexity",
|
"homepage": "https://github.com/sebastianbergmann/complexity",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/complexity/issues",
|
"issues": "https://github.com/sebastianbergmann/complexity/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/complexity/security/policy",
|
"source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0"
|
||||||
"source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1395,7 +1391,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-09-28T11:50:59+00:00"
|
"time": "2023-02-03T06:59:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/diff",
|
"name": "sebastian/diff",
|
||||||
|
@ -1530,16 +1526,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
"version": "5.1.1",
|
"version": "5.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||||
"reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc"
|
"reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc",
|
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0",
|
||||||
"reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc",
|
"reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1553,7 +1549,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "5.1-dev"
|
"dev-main": "5.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -1595,8 +1591,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/exporter/security/policy",
|
"source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0"
|
||||||
"source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1604,20 +1599,20 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-09-24T13:22:09+00:00"
|
"time": "2023-02-03T07:06:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/global-state",
|
"name": "sebastian/global-state",
|
||||||
"version": "6.0.1",
|
"version": "6.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||||
"reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4"
|
"reference": "aab257c712de87b90194febd52e4d184551c2d44"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4",
|
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44",
|
||||||
"reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4",
|
"reference": "aab257c712de87b90194febd52e4d184551c2d44",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1657,8 +1652,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/global-state/issues",
|
"issues": "https://github.com/sebastianbergmann/global-state/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/global-state/security/policy",
|
"source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0"
|
||||||
"source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1666,20 +1660,20 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-07-19T07:19:23+00:00"
|
"time": "2023-02-03T07:07:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/lines-of-code",
|
"name": "sebastian/lines-of-code",
|
||||||
"version": "2.0.1",
|
"version": "2.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
|
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
|
||||||
"reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d"
|
"reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d",
|
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130",
|
||||||
"reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d",
|
"reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1715,8 +1709,7 @@
|
||||||
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
|
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
|
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
|
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0"
|
||||||
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1"
|
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1724,7 +1717,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-31T09:25:50+00:00"
|
"time": "2023-02-03T07:08:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/object-enumerator",
|
"name": "sebastian/object-enumerator",
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace ConLite\Exceptions;
|
|
||||||
|
|
||||||
class Exception extends \Exception
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace ConLite\Exceptions;
|
|
||||||
|
|
||||||
class FileNotFoundException extends RuntimeException
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace ConLite\Exceptions;
|
|
||||||
|
|
||||||
class InvalidArgumentException extends LogicException
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace ConLite\Exceptions;
|
|
||||||
|
|
||||||
class LogicException extends Exception
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace ConLite\Exceptions;
|
|
||||||
|
|
||||||
class RuntimeException extends Exception
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -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'];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace ConLite\Log;
|
|
||||||
|
|
||||||
class ModuleLog extends Log
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
?>
|
|
@ -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) {
|
||||||
|
|
|
@ -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()) {
|
||||||
|
|
|
@ -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'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
|
@ -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));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
|
@ -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
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*
|
||||||
|
*/
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
|
@ -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.
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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();
|
||||||
|
?>
|
|
@ -21,14 +21,12 @@ use Composer\Semver\VersionParser;
|
||||||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||||
*
|
*
|
||||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||||
*
|
|
||||||
* @final
|
|
||||||
*/
|
*/
|
||||||
class InstalledVersions
|
class InstalledVersions
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var mixed[]|null
|
* @var mixed[]|null
|
||||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
||||||
*/
|
*/
|
||||||
private static $installed;
|
private static $installed;
|
||||||
|
|
||||||
|
@ -39,7 +37,7 @@ class InstalledVersions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||||
*/
|
*/
|
||||||
private static $installedByVendor = array();
|
private static $installedByVendor = array();
|
||||||
|
|
||||||
|
@ -243,7 +241,7 @@ class InstalledVersions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
||||||
*/
|
*/
|
||||||
public static function getRootPackage()
|
public static function getRootPackage()
|
||||||
{
|
{
|
||||||
|
@ -257,7 +255,7 @@ class InstalledVersions
|
||||||
*
|
*
|
||||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
||||||
*/
|
*/
|
||||||
public static function getRawData()
|
public static function getRawData()
|
||||||
{
|
{
|
||||||
|
@ -280,7 +278,7 @@ class InstalledVersions
|
||||||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||||
*
|
*
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||||
*/
|
*/
|
||||||
public static function getAllRawData()
|
public static function getAllRawData()
|
||||||
{
|
{
|
||||||
|
@ -303,7 +301,7 @@ class InstalledVersions
|
||||||
* @param array[] $data A vendor/composer/installed.php data set
|
* @param array[] $data A vendor/composer/installed.php data set
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
||||||
*/
|
*/
|
||||||
public static function reload($data)
|
public static function reload($data)
|
||||||
{
|
{
|
||||||
|
@ -313,7 +311,7 @@ class InstalledVersions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||||
*/
|
*/
|
||||||
private static function getInstalled()
|
private static function getInstalled()
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,17 +85,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.28.0",
|
"version": "v1.27.0",
|
||||||
"version_normalized": "1.28.0.0",
|
"version_normalized": "1.27.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
|
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||||
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
|
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -107,11 +107,11 @@
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-ctype": "For best performance"
|
"ext-ctype": "For best performance"
|
||||||
},
|
},
|
||||||
"time": "2023-01-26T09:26:14+00:00",
|
"time": "2022-11-03T14:55:06+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.28-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -170,17 +170,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.28.0",
|
"version": "v1.27.0",
|
||||||
"version_normalized": "1.28.0.0",
|
"version_normalized": "1.27.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "42292d99c55abe617799667f454222c54c60e229"
|
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||||
"reference": "42292d99c55abe617799667f454222c54c60e229",
|
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -192,11 +192,11 @@
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "For best performance"
|
"ext-mbstring": "For best performance"
|
||||||
},
|
},
|
||||||
"time": "2023-07-28T09:04:16+00:00",
|
"time": "2022-11-03T14:55:06+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.28-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
|
@ -236,7 +236,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -256,17 +256,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.7.1",
|
"version": "v3.7.0",
|
||||||
"version_normalized": "3.7.1.0",
|
"version_normalized": "3.7.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554"
|
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b",
|
||||||
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
|
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -276,9 +276,9 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/container": "^1.0|^2.0",
|
"psr/container": "^1.0|^2.0",
|
||||||
"symfony/phpunit-bridge": "^5.4.9|^6.3"
|
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
|
||||||
},
|
},
|
||||||
"time": "2023-08-28T11:09:02+00:00",
|
"time": "2023-07-26T07:16:09+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -314,7 +314,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/twigphp/Twig/issues",
|
"issues": "https://github.com/twigphp/Twig/issues",
|
||||||
"source": "https://github.com/twigphp/Twig/tree/v3.7.1"
|
"source": "https://github.com/twigphp/Twig/tree/v3.7.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,58 +1,58 @@
|
||||||
<?php return array(
|
<?php return array(
|
||||||
'root' => array(
|
'root' => array(
|
||||||
'name' => 'org.conlite/conlite',
|
|
||||||
'pretty_version' => 'dev-develop',
|
'pretty_version' => 'dev-develop',
|
||||||
'version' => 'dev-develop',
|
'version' => 'dev-develop',
|
||||||
'reference' => '6b98e3a4f50a25f8634f9afeae71631503f70fe7',
|
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
'reference' => 'a397b65fcdb95da20cb02b4bd4c63abc04a0ce82',
|
||||||
|
'name' => 'org.conlite/conlite',
|
||||||
'dev' => false,
|
'dev' => false,
|
||||||
),
|
),
|
||||||
'versions' => array(
|
'versions' => array(
|
||||||
'org.conlite/conlite' => array(
|
'org.conlite/conlite' => array(
|
||||||
'pretty_version' => 'dev-develop',
|
'pretty_version' => 'dev-develop',
|
||||||
'version' => 'dev-develop',
|
'version' => 'dev-develop',
|
||||||
'reference' => '6b98e3a4f50a25f8634f9afeae71631503f70fe7',
|
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
'reference' => 'a397b65fcdb95da20cb02b4bd4c63abc04a0ce82',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'phpmailer/phpmailer' => array(
|
'phpmailer/phpmailer' => array(
|
||||||
'pretty_version' => 'v6.8.0',
|
'pretty_version' => 'v6.8.0',
|
||||||
'version' => '6.8.0.0',
|
'version' => '6.8.0.0',
|
||||||
'reference' => 'df16b615e371d81fb79e506277faea67a1be18f1',
|
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
'reference' => 'df16b615e371d81fb79e506277faea67a1be18f1',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'symfony/polyfill-ctype' => array(
|
'symfony/polyfill-ctype' => array(
|
||||||
'pretty_version' => 'v1.28.0',
|
'pretty_version' => 'v1.27.0',
|
||||||
'version' => '1.28.0.0',
|
'version' => '1.27.0.0',
|
||||||
'reference' => 'ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb',
|
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
|
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'symfony/polyfill-mbstring' => array(
|
'symfony/polyfill-mbstring' => array(
|
||||||
'pretty_version' => 'v1.28.0',
|
'pretty_version' => 'v1.27.0',
|
||||||
'version' => '1.28.0.0',
|
'version' => '1.27.0.0',
|
||||||
'reference' => '42292d99c55abe617799667f454222c54c60e229',
|
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'twig/twig' => array(
|
'twig/twig' => array(
|
||||||
'pretty_version' => 'v3.7.1',
|
'pretty_version' => 'v3.7.0',
|
||||||
'version' => '3.7.1.0',
|
'version' => '3.7.0.0',
|
||||||
'reference' => 'a0ce373a0ca3bf6c64b9e3e2124aca502ba39554',
|
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../twig/twig',
|
'install_path' => __DIR__ . '/../twig/twig',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
'reference' => '5cf942bbab3df42afa918caeba947f1b690af64b',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2018-present Fabien Potencier
|
Copyright (c) 2018-2019 Fabien Potencier
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.28-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2015-present Fabien Potencier
|
Copyright (c) 2015-2019 Fabien Potencier
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -69,7 +69,7 @@ final class Mbstring
|
||||||
{
|
{
|
||||||
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
||||||
|
|
||||||
private const SIMPLE_CASE_FOLD = [
|
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"],
|
['µ', 'ſ', "\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", 'ι'],
|
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
||||||
];
|
];
|
||||||
|
@ -301,11 +301,7 @@ final class Mbstring
|
||||||
$map = $upper;
|
$map = $upper;
|
||||||
} else {
|
} else {
|
||||||
if (self::MB_CASE_FOLD === $mode) {
|
if (self::MB_CASE_FOLD === $mode) {
|
||||||
static $caseFolding = null;
|
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
||||||
if (null === $caseFolding) {
|
|
||||||
$caseFolding = self::getData('caseFolding');
|
|
||||||
}
|
|
||||||
$s = strtr($s, $caseFolding);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static $lower = null;
|
static $lower = null;
|
||||||
|
@ -410,12 +406,6 @@ final class Mbstring
|
||||||
|
|
||||||
public static function mb_check_encoding($var = null, $encoding = null)
|
public static function mb_check_encoding($var = null, $encoding = null)
|
||||||
{
|
{
|
||||||
if (PHP_VERSION_ID < 70200 && \is_array($var)) {
|
|
||||||
trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $encoding) {
|
if (null === $encoding) {
|
||||||
if (null === $var) {
|
if (null === $var) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -423,21 +413,7 @@ final class Mbstring
|
||||||
$encoding = self::$internalEncoding;
|
$encoding = self::$internalEncoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\is_array($var)) {
|
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
|
||||||
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($var as $key => $value) {
|
|
||||||
if (!self::mb_check_encoding($key, $encoding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!self::mb_check_encoding($value, $encoding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
||||||
|
@ -662,10 +638,8 @@ final class Mbstring
|
||||||
|
|
||||||
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
||||||
{
|
{
|
||||||
[$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [
|
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
||||||
self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding),
|
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
||||||
self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return self::mb_strpos($haystack, $needle, $offset, $encoding);
|
return self::mb_strpos($haystack, $needle, $offset, $encoding);
|
||||||
}
|
}
|
||||||
|
@ -700,11 +674,8 @@ final class Mbstring
|
||||||
|
|
||||||
public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
|
public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
|
||||||
{
|
{
|
||||||
$haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding);
|
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
||||||
$needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding);
|
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
||||||
|
|
||||||
$haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack);
|
|
||||||
$needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle);
|
|
||||||
|
|
||||||
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
|
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
|
||||||
}
|
}
|
||||||
|
@ -827,50 +798,6 @@ final class Mbstring
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string
|
|
||||||
{
|
|
||||||
if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) {
|
|
||||||
throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $encoding) {
|
|
||||||
$encoding = self::mb_internal_encoding();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$validEncoding = @self::mb_check_encoding('', $encoding);
|
|
||||||
} catch (\ValueError $e) {
|
|
||||||
throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
|
||||||
}
|
|
||||||
|
|
||||||
// BC for PHP 7.3 and lower
|
|
||||||
if (!$validEncoding) {
|
|
||||||
throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self::mb_strlen($pad_string, $encoding) <= 0) {
|
|
||||||
throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string');
|
|
||||||
}
|
|
||||||
|
|
||||||
$paddingRequired = $length - self::mb_strlen($string, $encoding);
|
|
||||||
|
|
||||||
if ($paddingRequired < 1) {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($pad_type) {
|
|
||||||
case \STR_PAD_LEFT:
|
|
||||||
return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string;
|
|
||||||
case \STR_PAD_RIGHT:
|
|
||||||
return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding);
|
|
||||||
default:
|
|
||||||
$leftPaddingLength = floor($paddingRequired / 2);
|
|
||||||
$rightPaddingLength = $paddingRequired - $leftPaddingLength;
|
|
||||||
|
|
||||||
return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function getSubpart($pos, $part, $haystack, $encoding)
|
private static function getSubpart($pos, $part, $haystack, $encoding)
|
||||||
{
|
{
|
||||||
if (false === $pos) {
|
if (false === $pos) {
|
||||||
|
|
|
@ -1,119 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'İ' => 'i̇',
|
|
||||||
'µ' => 'μ',
|
|
||||||
'ſ' => 's',
|
|
||||||
'ͅ' => 'ι',
|
|
||||||
'ς' => 'σ',
|
|
||||||
'ϐ' => 'β',
|
|
||||||
'ϑ' => 'θ',
|
|
||||||
'ϕ' => 'φ',
|
|
||||||
'ϖ' => 'π',
|
|
||||||
'ϰ' => 'κ',
|
|
||||||
'ϱ' => 'ρ',
|
|
||||||
'ϵ' => 'ε',
|
|
||||||
'ẛ' => 'ṡ',
|
|
||||||
'ι' => 'ι',
|
|
||||||
'ß' => 'ss',
|
|
||||||
'ʼn' => 'ʼn',
|
|
||||||
'ǰ' => 'ǰ',
|
|
||||||
'ΐ' => 'ΐ',
|
|
||||||
'ΰ' => 'ΰ',
|
|
||||||
'և' => 'եւ',
|
|
||||||
'ẖ' => 'ẖ',
|
|
||||||
'ẗ' => 'ẗ',
|
|
||||||
'ẘ' => 'ẘ',
|
|
||||||
'ẙ' => 'ẙ',
|
|
||||||
'ẚ' => 'aʾ',
|
|
||||||
'ẞ' => 'ss',
|
|
||||||
'ὐ' => 'ὐ',
|
|
||||||
'ὒ' => 'ὒ',
|
|
||||||
'ὔ' => 'ὔ',
|
|
||||||
'ὖ' => 'ὖ',
|
|
||||||
'ᾀ' => 'ἀι',
|
|
||||||
'ᾁ' => 'ἁι',
|
|
||||||
'ᾂ' => 'ἂι',
|
|
||||||
'ᾃ' => 'ἃι',
|
|
||||||
'ᾄ' => 'ἄι',
|
|
||||||
'ᾅ' => 'ἅι',
|
|
||||||
'ᾆ' => 'ἆι',
|
|
||||||
'ᾇ' => 'ἇι',
|
|
||||||
'ᾈ' => 'ἀι',
|
|
||||||
'ᾉ' => 'ἁι',
|
|
||||||
'ᾊ' => 'ἂι',
|
|
||||||
'ᾋ' => 'ἃι',
|
|
||||||
'ᾌ' => 'ἄι',
|
|
||||||
'ᾍ' => 'ἅι',
|
|
||||||
'ᾎ' => 'ἆι',
|
|
||||||
'ᾏ' => 'ἇι',
|
|
||||||
'ᾐ' => 'ἠι',
|
|
||||||
'ᾑ' => 'ἡι',
|
|
||||||
'ᾒ' => 'ἢι',
|
|
||||||
'ᾓ' => 'ἣι',
|
|
||||||
'ᾔ' => 'ἤι',
|
|
||||||
'ᾕ' => 'ἥι',
|
|
||||||
'ᾖ' => 'ἦι',
|
|
||||||
'ᾗ' => 'ἧι',
|
|
||||||
'ᾘ' => 'ἠι',
|
|
||||||
'ᾙ' => 'ἡι',
|
|
||||||
'ᾚ' => 'ἢι',
|
|
||||||
'ᾛ' => 'ἣι',
|
|
||||||
'ᾜ' => 'ἤι',
|
|
||||||
'ᾝ' => 'ἥι',
|
|
||||||
'ᾞ' => 'ἦι',
|
|
||||||
'ᾟ' => 'ἧι',
|
|
||||||
'ᾠ' => 'ὠι',
|
|
||||||
'ᾡ' => 'ὡι',
|
|
||||||
'ᾢ' => 'ὢι',
|
|
||||||
'ᾣ' => 'ὣι',
|
|
||||||
'ᾤ' => 'ὤι',
|
|
||||||
'ᾥ' => 'ὥι',
|
|
||||||
'ᾦ' => 'ὦι',
|
|
||||||
'ᾧ' => 'ὧι',
|
|
||||||
'ᾨ' => 'ὠι',
|
|
||||||
'ᾩ' => 'ὡι',
|
|
||||||
'ᾪ' => 'ὢι',
|
|
||||||
'ᾫ' => 'ὣι',
|
|
||||||
'ᾬ' => 'ὤι',
|
|
||||||
'ᾭ' => 'ὥι',
|
|
||||||
'ᾮ' => 'ὦι',
|
|
||||||
'ᾯ' => 'ὧι',
|
|
||||||
'ᾲ' => 'ὰι',
|
|
||||||
'ᾳ' => 'αι',
|
|
||||||
'ᾴ' => 'άι',
|
|
||||||
'ᾶ' => 'ᾶ',
|
|
||||||
'ᾷ' => 'ᾶι',
|
|
||||||
'ᾼ' => 'αι',
|
|
||||||
'ῂ' => 'ὴι',
|
|
||||||
'ῃ' => 'ηι',
|
|
||||||
'ῄ' => 'ήι',
|
|
||||||
'ῆ' => 'ῆ',
|
|
||||||
'ῇ' => 'ῆι',
|
|
||||||
'ῌ' => 'ηι',
|
|
||||||
'ῒ' => 'ῒ',
|
|
||||||
'ῖ' => 'ῖ',
|
|
||||||
'ῗ' => 'ῗ',
|
|
||||||
'ῢ' => 'ῢ',
|
|
||||||
'ῤ' => 'ῤ',
|
|
||||||
'ῦ' => 'ῦ',
|
|
||||||
'ῧ' => 'ῧ',
|
|
||||||
'ῲ' => 'ὼι',
|
|
||||||
'ῳ' => 'ωι',
|
|
||||||
'ῴ' => 'ώι',
|
|
||||||
'ῶ' => 'ῶ',
|
|
||||||
'ῷ' => 'ῶι',
|
|
||||||
'ῼ' => 'ωι',
|
|
||||||
'ff' => 'ff',
|
|
||||||
'fi' => 'fi',
|
|
||||||
'fl' => 'fl',
|
|
||||||
'ffi' => 'ffi',
|
|
||||||
'ffl' => 'ffl',
|
|
||||||
'ſt' => 'st',
|
|
||||||
'st' => 'st',
|
|
||||||
'ﬓ' => 'մն',
|
|
||||||
'ﬔ' => 'մե',
|
|
||||||
'ﬕ' => 'մի',
|
|
||||||
'ﬖ' => 'վն',
|
|
||||||
'ﬗ' => 'մխ',
|
|
||||||
];
|
|
|
@ -132,10 +132,6 @@ if (!function_exists('mb_str_split')) {
|
||||||
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
|
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('mb_str_pad')) {
|
|
||||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension_loaded('mbstring')) {
|
if (extension_loaded('mbstring')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,10 +128,6 @@ 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); }
|
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 (!function_exists('mb_str_pad')) {
|
|
||||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension_loaded('mbstring')) {
|
if (extension_loaded('mbstring')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.28-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# 3.7.1 (2023-08-28)
|
|
||||||
|
|
||||||
* Fix some phpdocs
|
|
||||||
|
|
||||||
# 3.7.0 (2023-07-26)
|
# 3.7.0 (2023-07-26)
|
||||||
|
|
||||||
* Add support for the ...spread operator on arrays and hashes
|
* Add support for the ...spread operator on arrays and hashes
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"symfony/polyfill-ctype": "^1.8"
|
"symfony/polyfill-ctype": "^1.8"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/phpunit-bridge": "^5.4.9|^6.3",
|
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0",
|
||||||
"psr/container": "^1.0|^2.0"
|
"psr/container": "^1.0|^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
|
@ -40,11 +40,11 @@ use Twig\TokenParser\TokenParserInterface;
|
||||||
*/
|
*/
|
||||||
class Environment
|
class Environment
|
||||||
{
|
{
|
||||||
public const VERSION = '3.7.1';
|
public const VERSION = '3.7.0';
|
||||||
public const VERSION_ID = 30701;
|
public const VERSION_ID = 30700;
|
||||||
public const MAJOR_VERSION = 3;
|
public const MAJOR_VERSION = 3;
|
||||||
public const MINOR_VERSION = 7;
|
public const MINOR_VERSION = 7;
|
||||||
public const RELEASE_VERSION = 1;
|
public const RELEASE_VERSION = 0;
|
||||||
public const EXTRA_VERSION = '';
|
public const EXTRA_VERSION = '';
|
||||||
|
|
||||||
private $charset;
|
private $charset;
|
||||||
|
|
|
@ -29,7 +29,7 @@ final class TwigFilter
|
||||||
private $arguments = [];
|
private $arguments = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param callable|array{class-string, string}|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.
|
* @param callable|array<class-string, string>|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.
|
||||||
*/
|
*/
|
||||||
public function __construct(string $name, $callable = null, array $options = [])
|
public function __construct(string $name, $callable = null, array $options = [])
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ final class TwigFilter
|
||||||
/**
|
/**
|
||||||
* Returns the callable to execute for this filter.
|
* Returns the callable to execute for this filter.
|
||||||
*
|
*
|
||||||
* @return callable|array{class-string, string}|null
|
* @return callable|array<class-string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getCallable()
|
public function getCallable()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ final class TwigFunction
|
||||||
private $arguments = [];
|
private $arguments = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param callable|array{class-string, string}|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
|
* @param callable|array<class-string, string>|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
|
||||||
*/
|
*/
|
||||||
public function __construct(string $name, $callable = null, array $options = [])
|
public function __construct(string $name, $callable = null, array $options = [])
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ final class TwigFunction
|
||||||
/**
|
/**
|
||||||
* Returns the callable to execute for this function.
|
* Returns the callable to execute for this function.
|
||||||
*
|
*
|
||||||
* @return callable|array{class-string, string}|null
|
* @return callable|array<class-string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getCallable()
|
public function getCallable()
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ final class TwigTest
|
||||||
private $arguments = [];
|
private $arguments = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param callable|array{class-string, string}|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.
|
* @param callable|array<class-string, string>|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.
|
||||||
*/
|
*/
|
||||||
public function __construct(string $name, $callable = null, array $options = [])
|
public function __construct(string $name, $callable = null, array $options = [])
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ final class TwigTest
|
||||||
/**
|
/**
|
||||||
* Returns the callable to execute for this test.
|
* Returns the callable to execute for this test.
|
||||||
*
|
*
|
||||||
* @return callable|array{class-string, string}|null
|
* @return callable|array<class-string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getCallable()
|
public function getCallable()
|
||||||
{
|
{
|
||||||
|
|
Laden…
In neuem Issue referenzieren