From 5323f970bead6df74caeed51120e037b2f7eb5fd Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Wed, 19 Jun 2024 09:57:05 +0000 Subject: [PATCH] Lint php --- actions/AdminBackupsAction.php | 13 +- actions/AdminReactionsAction.php | 11 +- actions/CommentsAction.php | 2 +- actions/CommentsTableAction.php | 9 +- actions/EditActionsAclsAction.php | 27 +- actions/EditConfigAction.php | 84 +- actions/EditGroupsAction.php | 27 +- actions/EditHandlersAclsAction.php | 27 +- actions/EraseSpamedCommentsAction.php | 66 +- actions/FooterAction.php | 28 +- actions/HeaderAction.php | 32 +- actions/MyFavoritesAction.php | 32 +- actions/ReactionsAction.php | 13 +- actions/UserCommentsAction.php | 15 +- actions/UserReactionsAction.php | 7 +- actions/UsersTableAction.php | 56 +- actions/backlinks.php | 6 +- actions/bazarrecordsindex.php | 12 +- actions/changestyle.php | 21 +- actions/include.php | 18 +- actions/interwikilist.php | 4 +- actions/linkstyle__.php | 4 +- actions/listpages.php | 54 +- actions/listusers.php | 14 +- actions/mychanges.php | 40 +- actions/mypages.php | 22 +- actions/newtextsearch.php | 72 +- actions/orphanedpages.php | 6 +- actions/pageindex.php | 12 +- actions/pageonlyindex.php | 12 +- actions/recentchanges.php | 24 +- actions/recentcomments.php | 16 +- actions/recentlycommented.php | 20 +- actions/redirect.php | 10 +- actions/testtriples.php | 23 +- actions/textsearch.php | 12 +- actions/trail.php | 27 +- actions/wantedpages.php | 2 +- docs/actions/lang/actionsbuilder_en.inc.php | 218 +-- docs/actions/lang/actionsbuilder_fr.inc.php | 708 ++++---- docs/actions/lang/actionsbuilder_it.inc.php | 792 ++++----- docs/actions/lang/actionsbuilder_pt.inc.php | 252 +-- docs/actions/lang/actionsbuilder_ru.inc.php | 808 ++++----- docs/actions/lang/actionsbuilder_ta.inc.php | 725 ++++---- formatters/action.php | 17 +- formatters/code.php | 2 +- formatters/coloration_delphi.php | 78 +- formatters/highlighter.class.php | 139 +- formatters/raw.php | 4 +- formatters/wakka.php | 185 ++- handlers/EditIframeHandler.php | 9 +- handlers/IframeHandler.php | 45 +- handlers/RevisionsHandler.php | 10 +- handlers/page/acls.php | 66 +- handlers/page/addcomment.php | 4 +- handlers/page/backlinks.php | 2 +- handlers/page/claim.php | 4 +- handlers/page/css.php | 14 +- handlers/page/dbutf8.php | 175 +- handlers/page/deletepage.php | 40 +- handlers/page/edit.php | 20 +- handlers/page/raw.php | 10 +- handlers/page/referrers.php | 61 +- handlers/page/referrers_sites.php | 63 +- handlers/page/render.php | 10 +- handlers/page/resetstyle.php | 8 +- handlers/page/show.php | 42 +- handlers/page/slide_show.php | 36 +- handlers/page/svg.php | 10 +- includes/ApiResponse.php | 2 +- includes/ComposerScriptsHelper.php | 28 +- includes/Encoding.php | 151 +- includes/YesWiki.php | 335 ++-- includes/YesWikiController.php | 4 +- includes/YesWikiControllerResolver.php | 2 +- includes/YesWikiEventCompilerPass.php | 2 +- includes/YesWikiInit.php | 67 +- includes/YesWikiLoader.php | 14 +- includes/YesWikiMigration.php | 4 +- includes/YesWikiPerformable.php | 44 +- includes/YesWikiPlugins.php | 24 +- includes/autoload.inc.php | 4 +- includes/commands/ArchiveCommand.php | 6 +- includes/commands/DbCommand.php | 71 +- .../commands/TestConsoleServiceCommand.php | 12 +- includes/constants.php | 24 +- includes/controllers/ApiController.php | 111 +- includes/controllers/ArchiveController.php | 30 +- includes/controllers/AuthController.php | 93 +- includes/controllers/CsrfTokenController.php | 15 +- .../controllers/DocumentationController.php | 13 +- includes/controllers/PageController.php | 8 +- includes/controllers/ReactionsController.php | 50 +- includes/controllers/UserController.php | 105 +- includes/email.inc.php | 9 +- includes/entities/ConfigurationFile.php | 24 +- includes/entities/Event.php | 2 +- includes/entities/User.php | 9 +- includes/i18n.inc.php | 63 +- ...20240425000000_CercopitequePostInstall.php | 1 - ...240425000000_CheckSQLTablesThenFixThem.php | 9 +- .../20240425000000_DropColumnsFromNature.php | 32 +- .../20240425000000_FixDefaultCommentsAcls.php | 2 +- .../migrations/20240425153022_CleanBase64.php | 5 +- .../20240425172243_CleanOldCartoGoogle.php | 12 +- includes/objects/MD5PasswordHasher.php | 1 - includes/objects/YesWikiAction.php | 14 +- includes/objects/YesWikiHandler.php | 10 +- includes/services/AclService.php | 105 +- includes/services/ApiService.php | 29 +- includes/services/ArchiveService.php | 419 +++-- includes/services/AssetsManager.php | 33 +- includes/services/CommentService.php | 97 +- includes/services/ConfigurationService.php | 36 +- includes/services/ConsoleService.php | 80 +- includes/services/DateService.php | 3 +- includes/services/DbService.php | 60 +- includes/services/DiffService.php | 24 +- includes/services/EventDispatcher.php | 6 +- includes/services/FavoritesManager.php | 20 +- includes/services/HtmlPurifierService.php | 13 +- includes/services/ImportService.php | 47 +- includes/services/LinkTracker.php | 42 +- includes/services/Mailer.php | 22 +- includes/services/PageManager.php | 87 +- includes/services/PasswordHasherFactory.php | 21 +- includes/services/Performer.php | 51 +- includes/services/ReactionManager.php | 45 +- includes/services/StringUtilService.php | 5 +- includes/services/TemplateEngine.php | 26 +- includes/services/ThemeManager.php | 261 +-- includes/services/TripleStore.php | 161 +- includes/services/UserManager.php | 80 +- includes/squelettephp.class.php | 17 +- includes/urlutils.inc.php | 35 +- index.php | 7 +- lang/languages_list.php | 1460 ++++++++--------- lang/yeswiki_en.php | 4 +- lang/yeswiki_fr.php | 4 +- lang/yeswikijs_en.php | 148 +- lang/yeswikijs_fr.php | 182 +- lang/yeswikijs_nb_NO.php | 152 +- setup/default.php | 30 +- setup/footer.php | 2 +- setup/header.php | 2 +- setup/install.helpers.php | 35 +- setup/install.php | 65 +- setup/writeconfig.php | 34 +- tests/YesWikiTestCase.php | 1 + tests/includes/YesWikiTest.php | 2 +- .../controllers/UserControllerTest.php | 112 +- tests/includes/services/AclServiceTest.php | 13 +- .../includes/services/ArchiveServiceTest.php | 113 +- .../includes/services/ConsoleServiceTest.php | 40 +- .../services/HtmlPurifierServiceTest.php | 39 +- tests/includes/services/PerformerTest.php | 11 +- tests/includes/services/UserManagerTest.php | 140 +- .../login/actions/UserSettingsActionTest.php | 147 +- tools/aceditor/actions/AceditorAction.php | 6 +- tools/aceditor/index.php | 4 +- tools/aceditor/lang/aceditor_en.inc.php | 89 +- tools/aceditor/lang/aceditor_fr.inc.php | 82 +- tools/aceditor/lang/aceditorjs_ca.inc.php | 37 +- tools/aceditor/lang/aceditorjs_en.inc.php | 18 +- tools/aceditor/lang/aceditorjs_es.inc.php | 37 +- tools/aceditor/lang/aceditorjs_fr.inc.php | 18 +- tools/aceditor/lang/aceditorjs_nl.inc.php | 31 +- tools/aceditor/lang/aceditorjs_pt.inc.php | 37 +- tools/aceditor/lang/aceditorjs_ta.inc.php | 1 + .../services/ActionsBuilderService.php | 20 +- tools/attach/actions/PdfAction.php | 84 +- tools/attach/actions/VideoAction.php | 73 +- tools/attach/actions/__include.php | 4 +- tools/attach/actions/attach.php | 6 +- tools/attach/actions/backgroundimage.php | 15 +- tools/attach/actions/endbackgroundimage.php | 2 +- tools/attach/actions/filemanager.php | 12 +- tools/attach/actions/include__.php | 4 +- tools/attach/actions/linkstyle__.php | 4 +- tools/attach/actions/player.php | 74 +- tools/attach/actions/pointimage.php | 75 +- tools/attach/controllers/ApiController.php | 63 +- tools/attach/handlers/AjaxUploadHandler.php | 9 +- tools/attach/handlers/page/download.php | 10 +- tools/attach/handlers/page/filemanager.php | 14 +- tools/attach/handlers/page/upload.php | 12 +- tools/attach/index.php | 4 +- tools/attach/lang/attach_ca.inc.php | 3 +- tools/attach/lang/attach_en.inc.php | 4 +- tools/attach/lang/attach_es.inc.php | 1 - tools/attach/lang/attach_fr.inc.php | 5 +- tools/attach/lang/attach_nl.inc.php | 2 - tools/attach/lang/attach_pt.inc.php | 3 - tools/attach/lang/attach_ta.inc.php | 5 +- tools/attach/lang/attachjs_ta.inc.php | 1 + tools/attach/libs/attach.lib.php | 382 +++-- tools/attach/libs/qq.lib.php | 58 +- tools/autoupdate/actions/UpdateAction.php | 16 +- .../commands/GenerateMigrationCommand.php | 4 +- tools/autoupdate/commands/MigrateCommand.php | 4 +- tools/autoupdate/entities/Collection.php | 3 +- tools/autoupdate/entities/Files.php | 14 +- tools/autoupdate/entities/Messages.php | 8 +- tools/autoupdate/entities/Package.php | 28 +- .../autoupdate/entities/PackageCollection.php | 1 + tools/autoupdate/entities/PackageCore.php | 17 +- tools/autoupdate/entities/PackageExt.php | 18 +- tools/autoupdate/entities/Release.php | 7 +- tools/autoupdate/entities/Repository.php | 2 +- tools/autoupdate/index.php | 4 +- tools/autoupdate/lang/autoupdate_fr.inc.php | 60 +- tools/autoupdate/lang/autoupdate_pt.inc.php | 52 +- tools/autoupdate/lang/autoupdate_ta.inc.php | 67 +- .../autoupdate/services/AutoUpdateService.php | 11 + .../autoupdate/services/MigrationService.php | 3 +- .../services/UpdateAdminPagesService.php | 9 +- tools/bazar/actions/BazarAction.php | 25 +- tools/bazar/actions/BazarCartoAction.php | 18 +- tools/bazar/actions/BazarExportAction.php | 22 +- tools/bazar/actions/BazarImportAction.php | 38 +- tools/bazar/actions/BazarListeAction.php | 101 +- tools/bazar/actions/BazarTableAction.php | 2 +- tools/bazar/actions/CalendrierAction.php | 10 +- tools/bazar/actions/bazarlistecategorie.php | 48 +- tools/bazar/actions/include__.php | 6 +- tools/bazar/actions/linkrss__.php | 14 +- tools/bazar/actions/linkstyle__.php | 4 +- tools/bazar/actions/valeur.php | 20 +- tools/bazar/annotations/Field.php | 4 +- tools/bazar/controllers/ApiController.php | 66 +- tools/bazar/controllers/EntryController.php | 169 +- tools/bazar/controllers/FormController.php | 22 +- tools/bazar/controllers/GeoJSONFormatter.php | 26 +- tools/bazar/controllers/IcalFormatter.php | 150 +- tools/bazar/controllers/ListController.php | 18 +- tools/bazar/fields/AclField.php | 47 +- tools/bazar/fields/BazarField.php | 26 +- tools/bazar/fields/BookmarkletField.php | 12 +- tools/bazar/fields/CalcField.php | 40 +- tools/bazar/fields/CheckboxEntryField.php | 27 +- tools/bazar/fields/CheckboxField.php | 88 +- tools/bazar/fields/CheckboxListField.php | 19 +- .../bazar/fields/ConditionsCheckingField.php | 2 +- tools/bazar/fields/DateField.php | 24 +- tools/bazar/fields/EmailField.php | 12 +- tools/bazar/fields/EnumField.php | 48 +- .../fields/ExternalCheckboxEntryField.php | 21 +- .../fields/ExternalCheckboxListField.php | 7 +- tools/bazar/fields/ExternalFileField.php | 8 +- tools/bazar/fields/ExternalImageField.php | 10 +- .../bazar/fields/ExternalRadioEntryField.php | 7 +- tools/bazar/fields/ExternalRadioListField.php | 7 +- .../bazar/fields/ExternalSelectEntryField.php | 7 +- .../bazar/fields/ExternalSelectListField.php | 7 +- tools/bazar/fields/ExternalTagsField.php | 13 +- tools/bazar/fields/FileField.php | 57 +- tools/bazar/fields/HiddenField.php | 4 +- tools/bazar/fields/ImageField.php | 56 +- tools/bazar/fields/LabelField.php | 6 +- tools/bazar/fields/LinkField.php | 5 +- tools/bazar/fields/LinkedEntryField.php | 21 +- tools/bazar/fields/MapField.php | 63 +- tools/bazar/fields/MetadataField.php | 7 +- tools/bazar/fields/OldField.php | 9 +- tools/bazar/fields/PasswordField.php | 12 +- tools/bazar/fields/RadioEntryField.php | 15 +- tools/bazar/fields/RadioField.php | 25 +- tools/bazar/fields/RadioListField.php | 7 +- tools/bazar/fields/ReactionsField.php | 13 +- tools/bazar/fields/SelectEntryField.php | 17 +- tools/bazar/fields/SelectListField.php | 7 +- tools/bazar/fields/SubscribeField.php | 19 +- tools/bazar/fields/TabChangeField.php | 18 +- tools/bazar/fields/TabsField.php | 19 +- tools/bazar/fields/TagsField.php | 17 +- tools/bazar/fields/TextField.php | 16 +- tools/bazar/fields/TextareaField.php | 45 +- tools/bazar/fields/TitleField.php | 14 +- tools/bazar/fields/UserField.php | 40 +- tools/bazar/handlers/BazarIframeHandler.php | 13 +- tools/bazar/handlers/RssHandler.php | 15 +- tools/bazar/handlers/__EditHandler.php | 2 +- tools/bazar/handlers/__WidgetHandler.php | 14 +- tools/bazar/handlers/page/__html.php | 6 +- tools/bazar/handlers/page/__show.php | 8 +- tools/bazar/handlers/page/api_delete.php | 4 +- tools/bazar/handlers/page/api_patch.php | 4 +- tools/bazar/handlers/page/api_put.php | 4 +- tools/bazar/handlers/page/json.php | 55 +- tools/bazar/handlers/page/raw.php | 10 +- tools/bazar/handlers/page/show__.php | 8 +- tools/bazar/index.php | 5 +- tools/bazar/lang/bazar_ca.inc.php | 5 +- tools/bazar/lang/bazar_es.inc.php | 1 - tools/bazar/lang/bazar_fr.inc.php | 1 - tools/bazar/lang/bazar_pt.inc.php | 1 - tools/bazar/lang/bazar_ta.inc.php | 13 +- tools/bazar/lang/bazarjs_en.inc.php | 24 +- tools/bazar/lang/bazarjs_fr.inc.php | 28 +- tools/bazar/lang/bazarjs_ta.inc.php | 29 +- tools/bazar/libs/bazar.fonct.misc.php | 29 +- tools/bazar/libs/bazar.fonct.php | 59 +- .../libs/bazar.fonct.retrocompatibility.php | 26 +- tools/bazar/services/BazarListService.php | 50 +- tools/bazar/services/CSVManager.php | 215 ++- tools/bazar/services/DateService.php | 107 +- tools/bazar/services/EntryManager.php | 159 +- tools/bazar/services/ExternalBazarService.php | 181 +- tools/bazar/services/FieldFactory.php | 8 +- tools/bazar/services/FormManager.php | 68 +- tools/bazar/services/Guard.php | 32 +- tools/bazar/services/ListManager.php | 8 +- tools/bazar/services/SearchManager.php | 37 +- tools/bazar/services/SemanticTransformer.php | 4 +- tools/bazar/wiki.php | 6 +- tools/contact/actions/MailPeriodAction.php | 11 +- tools/contact/actions/abonnement.php | 13 +- tools/contact/actions/contact.php | 6 +- tools/contact/actions/desabonnement.php | 13 +- tools/contact/actions/listsubscription.php | 20 +- tools/contact/actions/mailinglist.php | 45 +- .../contact/actions/userlistsubscription.php | 20 +- tools/contact/handlers/page/mail.php | 50 +- tools/contact/handlers/page/sendmail.php | 4 +- tools/contact/index.php | 2 +- tools/contact/lang/contact_ca.inc.php | 18 +- tools/contact/lang/contact_es.inc.php | 21 +- tools/contact/lang/contact_fr.inc.php | 34 +- tools/contact/lang/contact_nl.inc.php | 18 +- tools/contact/lang/contact_pt.inc.php | 18 +- tools/contact/lang/contact_ta.inc.php | 31 +- tools/contact/lang/contactjs_ta.inc.php | 1 + tools/contact/libs/contact.functions.php | 39 +- tools/helloworld/actions/GreetingAction.php | 5 +- tools/helloworld/actions/GreetingAction__.php | 4 +- tools/helloworld/actions/__GreetingAction.php | 6 +- tools/helloworld/commands/HelloCommand.php | 5 +- .../helloworld/controllers/ApiController.php | 9 +- tools/helloworld/fields/AlertField.php | 6 +- tools/helloworld/handlers/HelloHandler.php | 1 + tools/helloworld/lang/helloworld_fr.inc.php | 2 - tools/helloworld/lang/helloworld_ta.inc.php | 1 + tools/helloworld/services/GreetingService.php | 3 +- .../tests/commands/HelloCommandTest.php | 18 +- tools/lang/actions/__include.php | 15 +- tools/lang/actions/lang.php | 5 +- tools/lang/actions/translation.php | 12 +- tools/lang/handlers/page/__show.php | 13 +- tools/lang/index.php | 4 +- tools/lang/lang/lang_en.inc.php | 19 +- tools/lang/lang/lang_es.inc.php | 21 +- tools/lang/lang/lang_fr.inc.php | 21 +- tools/lang/lang/lang_pt.inc.php | 21 +- tools/login/actions/LoginAction.php | 79 +- tools/login/actions/LostPasswordAction.php | 64 +- tools/login/actions/UserSettingsAction.php | 119 +- tools/login/actions/listusers.php | 32 +- tools/login/controllers/ApiController.php | 15 +- tools/login/handlers/page/auth.php | 38 +- tools/login/index.php | 4 +- tools/login/lang/login_es.inc.php | 5 +- tools/login/lang/login_fr.inc.php | 7 +- tools/login/lang/login_ta.inc.php | 5 +- tools/progressBar/formatters/wakka__.php | 10 +- tools/progressBar/index.php | 4 +- tools/progressBar/libs/progressBar.php | 3 +- tools/rss/actions/RecentChangesRssAction.php | 39 +- tools/rss/actions/recentchangesrssplus.php | 36 +- tools/rss/actions/recentcommentsrss.php | 33 +- tools/rss/handlers/page/xml.php | 8 +- tools/rss/index.php | 4 +- tools/rss/lang/rss_ta.inc.php | 1 + tools/rss/libs/rssdiff.function.php | 37 +- tools/security/actions/despam.php | 170 +- tools/security/controllers/ApiController.php | 6 +- .../controllers/CaptchaController.php | 164 +- .../controllers/SecurityController.php | 64 +- tools/security/handlers/page/__addcomment.php | 28 +- tools/security/handlers/page/__edit.php | 10 +- tools/security/handlers/page/edit__.php | 7 +- tools/security/handlers/page/show__.php | 38 +- tools/security/index.php | 4 +- tools/security/lang/security_ca.inc.php | 1 - tools/security/lang/security_en.inc.php | 1 + tools/security/lang/security_es.inc.php | 3 +- tools/security/lang/security_fr.inc.php | 1 - tools/security/lang/security_nl.inc.php | 1 - tools/security/lang/security_pt.inc.php | 1 - tools/security/lang/security_ta.inc.php | 1 + tools/security/services/HashCashService.php | 4 +- tools/security/wp-hashcash-getkey.php | 48 +- tools/security/wp-hashcash-js.php | 10 +- tools/syndication/actions/syndication.php | 41 +- tools/syndication/index.php | 4 +- tools/syndication/lang/syndication_ca.inc.php | 3 +- tools/syndication/lang/syndication_en.inc.php | 1 + tools/syndication/lang/syndication_es.inc.php | 3 +- tools/syndication/lang/syndication_fr.inc.php | 1 - tools/syndication/lang/syndication_nl.inc.php | 3 +- tools/syndication/lang/syndication_pt.inc.php | 3 +- tools/syndication/lang/syndication_ta.inc.php | 1 + tools/syndication/libs/syndication.lib.php | 35 +- tools/tableau/formatters/WakkaFormatter__.php | 19 +- tools/tableau/index.php | 4 +- tools/tags/actions/admintag.php | 10 +- tools/tags/actions/filtertags.php | 35 +- tools/tags/actions/includepages.php | 17 +- tools/tags/actions/linkstyle__.php | 4 +- tools/tags/actions/listpagestag.php | 16 +- tools/tags/actions/nuagetag.php | 38 +- tools/tags/actions/rss.php | 7 +- tools/tags/handlers/ShowHandler__.php | 2 +- tools/tags/handlers/__EditHandler.php | 15 +- tools/tags/handlers/page/__deletepage.php | 6 +- tools/tags/handlers/page/__show.php | 4 +- tools/tags/handlers/page/ajaxaddcomment.php | 24 +- tools/tags/handlers/page/ajaxdeletepage.php | 8 +- tools/tags/handlers/page/ajaxedit.php | 37 +- tools/tags/handlers/page/edit__.php | 12 +- tools/tags/handlers/page/epub.php | 43 +- tools/tags/handlers/page/jsonalltags.php | 8 +- tools/tags/handlers/page/listpages.php | 40 +- tools/tags/handlers/page/tagrss.php | 35 +- tools/tags/index.php | 6 +- tools/tags/lang/tags_ca.inc.php | 2 - tools/tags/lang/tags_en.inc.php | 2 - tools/tags/lang/tags_es.inc.php | 2 - tools/tags/lang/tags_fr.inc.php | 2 - tools/tags/lang/tags_nl.inc.php | 1 - tools/tags/lang/tags_pt.inc.php | 1 - tools/tags/lang/tags_ta.inc.php | 3 +- tools/tags/lang/tagsjs_en.inc.php | 2 +- tools/tags/lang/tagsjs_fr.inc.php | 2 +- tools/tags/lang/tagsjs_ta.inc.php | 3 +- tools/tags/libs/tags.functions.php | 44 +- tools/tags/services/TagsManager.php | 23 +- tools/templates/actions/FaviconAction.php | 1 - tools/templates/actions/GererDroitsAction.php | 44 +- tools/templates/actions/GererThemesAction.php | 44 +- .../actions/SetWikiDefaultThemeAction.php | 27 +- tools/templates/actions/TabsAction.php | 23 +- tools/templates/actions/__include.php | 12 +- tools/templates/actions/accordion.php | 23 +- tools/templates/actions/adminpages.php | 16 +- tools/templates/actions/ariane.php | 52 +- tools/templates/actions/barreredaction.php | 42 +- tools/templates/actions/button.php | 8 +- tools/templates/actions/buttondropdown.php | 4 +- tools/templates/actions/col.php | 13 +- tools/templates/actions/configuration.php | 6 +- tools/templates/actions/currentpage.php | 14 +- tools/templates/actions/diaporama.php | 14 +- tools/templates/actions/doubleclic.php | 8 +- tools/templates/actions/end.php | 23 +- tools/templates/actions/grid.php | 25 +- tools/templates/actions/include__.php | 28 +- tools/templates/actions/label.php | 9 +- tools/templates/actions/liensjavascripts.php | 4 +- tools/templates/actions/liensstyle.php | 7 +- tools/templates/actions/linkjavascript.php | 23 +- tools/templates/actions/linkrss.php | 4 +- tools/templates/actions/linkstyle.php | 24 +- tools/templates/actions/metarobots.php | 30 +- tools/templates/actions/moteurrecherche.php | 14 +- tools/templates/actions/nav.php | 22 +- tools/templates/actions/panel.php | 40 +- tools/templates/actions/parambody.php | 8 +- tools/templates/actions/progressbar.php | 23 +- tools/templates/actions/section.php | 22 +- tools/templates/actions/template.php | 6 +- tools/templates/actions/themeselector.php | 6 +- tools/templates/actions/titrepage.php | 4 +- tools/templates/actions/yeswikiversion.php | 6 +- tools/templates/controllers/ApiController.php | 20 +- .../templates/controllers/TabsController.php | 46 +- .../templates/controllers/ThemeController.php | 43 +- tools/templates/formatters/wakka__.php | 4 +- tools/templates/handlers/page/__edit.php | 8 +- tools/templates/handlers/page/diaporama.php | 14 +- tools/templates/handlers/page/edit__.php | 71 +- tools/templates/handlers/page/html.php | 11 +- .../templates/handlers/page/loadmetadatas.php | 13 +- .../templates/handlers/page/savemetadatas.php | 16 +- tools/templates/handlers/page/share.php | 32 +- tools/templates/handlers/page/show__.php | 35 +- tools/templates/handlers/page/widget.php | 17 +- tools/templates/index.php | 4 +- tools/templates/lang/templates_ca.inc.php | 11 +- tools/templates/lang/templates_es.inc.php | 11 +- tools/templates/lang/templates_fr.inc.php | 30 +- tools/templates/lang/templates_nl.inc.php | 10 +- tools/templates/lang/templates_pt.inc.php | 12 +- tools/templates/lang/templates_ta.inc.php | 9 +- tools/templates/services/TabsService.php | 29 +- tools/templates/services/Utils.php | 156 +- tools/templates/wiki.php | 2 +- tools/toc/actions/toc.php | 85 +- tools/toc/actions/tocjs.php | 64 +- tools/toc/formatters/__wakka.php | 70 +- tools/toc/index.php | 4 +- tools/toc/lang/toc_ta.inc.php | 1 + 501 files changed, 10054 insertions(+), 9685 deletions(-) diff --git a/actions/AdminBackupsAction.php b/actions/AdminBackupsAction.php index 7c5b03ba2..c420bf0fc 100644 --- a/actions/AdminBackupsAction.php +++ b/actions/AdminBackupsAction.php @@ -1,9 +1,9 @@ wiki->UserIsAdmin()) { return $this->render('@templates/alert-message.twig', [ 'type' => 'danger', - 'message' => get_class($this)." : " . _t('BAZ_NEED_ADMIN_RIGHTS') - ]) ; + 'message' => get_class($this) . ' : ' . _t('BAZ_NEED_ADMIN_RIGHTS'), + ]); } $status = $this->getService(ArchiveService::class)->getArchivingStatus(); if (!$status['canArchive']) { @@ -32,12 +32,13 @@ public function run() } elseif ($status['dB'] == false) { $message = _t('ADMIN_BACKUPS_MESSAGE_DB_NOT_ARCHIVABLE'); } + return $this->render('@templates/alert-message.twig', [ 'type' => 'warning', - 'message' => _t('ADMIN_BACKUPS_MESSAGE_ARCHIVE_CANNOT_BE_DONE').' '.$message.'
'._t('ADMIN_BACKUPS_MESSAGE_SEE_DOC').'.' + 'message' => _t('ADMIN_BACKUPS_MESSAGE_ARCHIVE_CANNOT_BE_DONE') . ' ' . $message . '
' . _t('ADMIN_BACKUPS_MESSAGE_SEE_DOC') . '.', ]); - } + return $this->render('@core/actions/admin-backups.twig', [ ]); } diff --git a/actions/AdminReactionsAction.php b/actions/AdminReactionsAction.php index 151bb2719..9d2ee26f2 100644 --- a/actions/AdminReactionsAction.php +++ b/actions/AdminReactionsAction.php @@ -1,9 +1,9 @@ wiki->UserIsAdmin()) { $allReactions = $this->wiki->services->get(ReactionManager::class)->getReactions(); foreach ($allReactions as $k => $reactions) { - usort($reactions["reactions"], function ($a, $b) { // sort by user + usort($reactions['reactions'], function ($a, $b) { // sort by user return strnatcasecmp($a['user'], $b['user']); }); } + return $this->render('@core/admin-reactions-table.twig', [ - 'reactions' => $allReactions + 'reactions' => $allReactions, ]); } else { return $this->render('@templates/alert-message.twig', [ 'type' => 'info', - 'message' => _t('REACTION_CONNECT_AS_ADMIN') + 'message' => _t('REACTION_CONNECT_AS_ADMIN'), ]); } } diff --git a/actions/CommentsAction.php b/actions/CommentsAction.php index a59558287..5f3669045 100644 --- a/actions/CommentsAction.php +++ b/actions/CommentsAction.php @@ -1,7 +1,7 @@ commentsService = $this->getService(CommentService::class); - $coms = $this->commentsService->loadComments(''); # get all comments + $this->commentsService = $this->getService(CommentService::class); + $coms = $this->commentsService->loadComments(''); // get all comments + return $this->render('@core/comment-table.twig', [ 'comments' => $coms, - ]) ; + ]); } } diff --git a/actions/EditActionsAclsAction.php b/actions/EditActionsAclsAction.php index c71033605..9db3d33ec 100755 --- a/actions/EditActionsAclsAction.php +++ b/actions/EditActionsAclsAction.php @@ -1,7 +1,7 @@ wiki->UserIsAdmin()) { return $this->render('@templates/alert-message.twig', [ 'type' => 'danger', - 'message' => "EditActionsAclsAction : " . _t('BAZ_NEED_ADMIN_RIGHTS') - ]) ; + 'message' => 'EditActionsAclsAction : ' . _t('BAZ_NEED_ADMIN_RIGHTS'), + ]); } $wiki = &$this->wiki; $list = $wiki->services->get(Performer::class)->list('action'); sort($list); $res = $wiki->FormOpen('', '', 'get'); - $res .= _t('ACTION_RIGHTS').' '; foreach ($list as $action) { $res .= ''; } - $res .= ' ' . $wiki->FormClose(); + $res .= ' ' . $wiki->FormClose(); if ($_POST && !empty($_POST['actionname'])) { // save ACL's $result = $wiki->SetModuleACL($name = $_POST['actionname'], 'action', @$_POST['acl']); if ($result) { - return $res . _t('ERROR_WHILE_SAVING_ACL') .' ' . ucfirst($name) . ' ('._t('ERROR_CODE').' ' . $result . ')
'; + return $res . _t('ERROR_WHILE_SAVING_ACL') . ' ' . ucfirst($name) . ' (' . _t('ERROR_CODE') . ' ' . $result . ')
'; } else { - $wiki->LogAdministrativeAction($wiki->GetUserName(), _t('NEW_ACL_FOR_ACTION')." " . ucfirst($name) . ' : ' . @$_POST['acl'] . "\n"); - return $res . _t('NEW_ACL_SUCCESSFULLY_SAVED_FOR_ACTION').' ' . ucfirst($name) . '.
'; + $wiki->LogAdministrativeAction($wiki->GetUserName(), _t('NEW_ACL_FOR_ACTION') . ' ' . ucfirst($name) . ' : ' . @$_POST['acl'] . "\n"); + + return $res . _t('NEW_ACL_SUCCESSFULLY_SAVED_FOR_ACTION') . ' ' . ucfirst($name) . '.
'; } } elseif (!empty($_GET['actionname']) && in_array($name = $_GET['actionname'], $list)) { $res .= $wiki->FormOpen(); - $res .= '
'._t('EDIT_RIGHTS_FOR_ACTION').' ' . ucfirst($name) . ':'; - $res .= ''; + $res .= '
' . _t('EDIT_RIGHTS_FOR_ACTION') . ' ' . ucfirst($name) . ':'; + $res .= ''; $res .= '
'; - $res .= ''; + $res .= ''; + return $res . $wiki->FormClose(); } + return $res; } } diff --git a/actions/EditConfigAction.php b/actions/EditConfigAction.php index d347ac603..05528b636 100644 --- a/actions/EditConfigAction.php +++ b/actions/EditConfigAction.php @@ -1,7 +1,7 @@ wiki->UserIsAdmin()) { return $this->render('@templates/alert-message.twig', [ 'type' => 'danger', - 'message' => get_class($this) . " : " . _t('BAZ_NEED_ADMIN_RIGHTS') + 'message' => get_class($this) . ' : ' . _t('BAZ_NEED_ADMIN_RIGHTS'), ]); } if (!is_writable('wakka.config.php')) { return $this->render('@templates/alert-message.twig', [ 'type' => 'danger', - 'message' => _t('ERROR_NO_ACCESS') . ' ' . _t('FILE_WRITE_PROTECTED') + 'message' => _t('ERROR_NO_ACCESS') . ' ' . _t('FILE_WRITE_PROTECTED'), ]); } @@ -73,11 +73,11 @@ public function run() $output = ''; if ($this->arguments['saving']) { $this->save(); - $this->wiki->Redirect($this->wiki->Href('', '', [self::SAVED_NAME => "1"], false)); + $this->wiki->Redirect($this->wiki->Href('', '', [self::SAVED_NAME => '1'], false)); } elseif ($this->arguments['saved']) { $output .= $this->render('@templates/alert-message.twig', [ 'type' => 'info', - 'message' => _t('EDIT_CONFIG_SAVE') + 'message' => _t('EDIT_CONFIG_SAVE'), ]); } @@ -91,6 +91,7 @@ public function run() $keysList[''] = array_merge($keysList[''] ?? [], [$key => $value]); } } + return $output . $this->render('@core/edit-config.twig', [ 'SAVE_NAME' => self::SAVE_NAME, 'keysList' => $keysList, @@ -101,7 +102,7 @@ public function run() /** * get AUTHORIZED_KEYS - * return array [$keys,$associatedExtensions] + * return array [$keys,$associatedExtensions]. */ private function getAuthorizedKeys(): array { @@ -152,30 +153,32 @@ private function getAuthorizedKeys(): array $this->keys = $scannedKeys; $this->associatedExtensions = $associatedExtensions; } + return [$this->keys, $this->associatedExtensions]; } /** * prepare array of $keyNames from $keys - * recursive + * recursive. * * @param array|string $keys - * @param bool $firstLevel + * * @return array [$keyName1,$keyName2] */ private function prepareKeyNames($keys, bool $firstLevel = false): array { if (is_string($keys)) { - return ($firstLevel ? [$keys] : ["[{$keys}]"]); + return $firstLevel ? [$keys] : ["[{$keys}]"]; } elseif (is_array($keys)) { $result = []; $isList = $this->arrayIsList($keys); foreach ($keys as $key => $value) { $subLevelKeyNames = $this->prepareKeyNames($value, $firstLevel && $isList); foreach ($subLevelKeyNames as $subLevelKeyName) { - $result[] = ($isList ? "" : ($firstLevel ? $key : "[{$key}]")) . $subLevelKeyName; + $result[] = ($isList ? '' : ($firstLevel ? $key : "[{$key}]")) . $subLevelKeyName; } } + return $result; } else { return []; @@ -183,7 +186,7 @@ private function prepareKeyNames($keys, bool $firstLevel = false): array } /** - * could be replace by array_is_list since php 8.1 + * could be replace by array_is_list since php 8.1. */ private function arrayIsList(array $array): bool { @@ -193,12 +196,14 @@ private function arrayIsList(array $array): bool return false; } } + return true; } /** - * save data to wakka.config.php - * @return boolean true if successfull + * save data to wakka.config.php. + * + * @return bool true if successfull */ private function save(): bool { @@ -278,16 +283,16 @@ private function save(): bool $config->$firstLevelKey, [ $keyAsArray[1] => [ - $keyAsArray[2] => $this->strtoarray($new_value) - ] + $keyAsArray[2] => $this->strtoarray($new_value), + ], ] ); } } else { $config->$firstLevelKey = [ $keyAsArray[1] => [ - $keyAsArray[2] => $this->strtoarray($new_value) - ] + $keyAsArray[2] => $this->strtoarray($new_value), + ], ]; } } @@ -303,7 +308,8 @@ private function save(): bool } /** - * get data from config file + * get data from config file. + * * @return array [$data,$placeholders,$associatedExtensions] format ['name' => string $value,'name2'=> "['ee'=>'yy',...]"] */ private function getDataFromConfigFile(): array @@ -318,13 +324,13 @@ private function getDataFromConfigFile(): array if (!empty($keyAsArray)) { $length = count($keyAsArray); $firstLevelKey = $keyAsArray[0]; - $keyName = $firstLevelKey . ($length > 1 ? "[" . implode("][", array_slice($keyAsArray, 1)) . "]" : ""); + $keyName = $firstLevelKey . ($length > 1 ? '[' . implode('][', array_slice($keyAsArray, 1)) . ']' : ''); switch ($length) { case 1: if (isset($config->$firstLevelKey)) { $data[$keyName] = $this->array2Str($config->$firstLevelKey); } else { - $data[$keyName] = ""; + $data[$keyName] = ''; } if ($this->params->has($firstLevelKey)) { $placeholders[$keyName] = $this->array2Str($this->params->get($firstLevelKey)); @@ -337,7 +343,7 @@ private function getDataFromConfigFile(): array ) { $data[$keyName] = $this->array2Str($config->$firstLevelKey[$keyAsArray[1]]); } else { - $data[$keyName] = ""; + $data[$keyName] = ''; } if ( $this->params->has($firstLevelKey) @@ -354,7 +360,7 @@ private function getDataFromConfigFile(): array ) { $data[$keyName] = $this->array2Str($config->$firstLevelKey[$keyAsArray[1]][$keyAsArray[2]]); } else { - $data[$keyName] = ""; + $data[$keyName] = ''; } if ( $this->params->has($firstLevelKey) @@ -366,17 +372,18 @@ private function getDataFromConfigFile(): array break; default: - $data[$keyName] = ""; + $data[$keyName] = ''; break; } } } + return [$data, $placeholders, $associatedExtensions]; } /** - * convert $keys to array of arrays - * @param array $keys + * convert $keys to array of arrays. + * * @return array $conertedKeys */ private function convertKeysAsArray(array $keys): array @@ -399,19 +406,21 @@ private function convertKeysAsArray(array $keys): array } } } + return $convertedKeys; } /** - * extract associated values from config second level + * extract associated values from config second level. + * * @param Configuration $config - * @param string $firstLevelKey + * @param string $firstLevelKey */ /** - * array to string + * array to string. + * * @param mixed $value - * @return string */ private function array2Str($value): string { @@ -421,7 +430,7 @@ private function array2Str($value): string . implode( ',', array_map(function ($k, $v) { - return (($v === false) ? "false" : (($v === true) ? "true" : "'" . $v . "'")); + return ($v === false) ? 'false' : (($v === true) ? 'true' : "'" . $v . "'"); }, array_keys($value), array_values($value)) ) . ']'; @@ -430,24 +439,25 @@ private function array2Str($value): string . implode( ',', array_map(function ($k, $v) { - return "'" . $k . "' => " . (($v === false) ? "false" : (($v === true) ? "true" : "'" . $v . "'")); + return "'" . $k . "' => " . (($v === false) ? 'false' : (($v === true) ? 'true' : "'" . $v . "'")); }, array_keys($value), array_values($value)) ) . ']'; } } elseif (!is_string($value)) { try { - $value = (($value === false) ? "false" : (($value === true) ? "true" : strval($value))); + $value = (($value === false) ? 'false' : (($value === true) ? 'true' : strval($value))); } catch (\Throwable $th) { $value = ''; } } + return $value; } /** - * string to array if needed - * @param string $value + * string to array if needed. + * * @return mixed */ private function strtoarray(string $value) @@ -487,12 +497,12 @@ private function strtoarray(string $value) } else { $value = ($value == 'true') ? true : (($value == 'false') ? false : $value); } + return $value; } /** - * get help from translation - * @return array + * get help from translation. */ private function getHelp(): array { @@ -500,7 +510,7 @@ private function getHelp(): array foreach ($this->convertKeysAsArray($this->getAuthorizedKeys()[0]) as $keyAsArray) { $length = count($keyAsArray); $firstLevelKey = $keyAsArray[0]; - $keyName = $firstLevelKey . ($length > 1 ? "[" . implode("][", array_slice($keyAsArray, 1)) . "]" : ""); + $keyName = $firstLevelKey . ($length > 1 ? '[' . implode('][', array_slice($keyAsArray, 1)) . ']' : ''); if (isset($GLOBALS['translations']['EDIT_CONFIG_HINT_' . $keyName])) { $help[$keyName] = _t('EDIT_CONFIG_HINT_' . $keyName); } elseif (isset($GLOBALS['translations']['EDIT_CONFIG_HINT_' . strtoupper($keyName)])) { diff --git a/actions/EditGroupsAction.php b/actions/EditGroupsAction.php index 7740da7d5..9e5adf837 100755 --- a/actions/EditGroupsAction.php +++ b/actions/EditGroupsAction.php @@ -1,6 +1,5 @@ wiki->UserIsAdmin()) { return $this->render('@templates/alert-message.twig', [ 'type' => 'danger', - 'message' => "EditGroupsAction : " . _t('BAZ_NEED_ADMIN_RIGHTS') - ]) ; + 'message' => 'EditGroupsAction : ' . _t('BAZ_NEED_ADMIN_RIGHTS'), + ]); } $message = ''; @@ -44,7 +43,7 @@ public function run() list('message' => $message, 'type' => $type) = $this->deleteGroup($selectedGroupName); } } catch (TokenNotFoundException $th) { - $message = _t('ERROR_WHILE_SAVING_GROUP') .':
'. $th->getMessage(); + $message = _t('ERROR_WHILE_SAVING_GROUP') . ':
' . $th->getMessage(); } } } @@ -59,7 +58,7 @@ public function run() return $this->render( '@core/actions/edit-group-action.twig', - compact(['list','message','type','currentGroupAcl','selectedGroupName','action']) + compact(['list', 'message', 'type', 'currentGroupAcl', 'selectedGroupName', 'action']) ); } @@ -81,23 +80,21 @@ protected function saveAcl(string $selectedGroupName): array if ($result) { if ($result == 1000) { - $message = _t('ERROR_RECURSIVE_GROUP').' !'; + $message = _t('ERROR_RECURSIVE_GROUP') . ' !'; } else { - $message = _t('ERROR_WHILE_SAVING_GROUP') . ' ' . ucfirst($selectedGroupName) . ' ('._t('ERROR_CODE').' ' . $result . ')'; + $message = _t('ERROR_WHILE_SAVING_GROUP') . ' ' . ucfirst($selectedGroupName) . ' (' . _t('ERROR_CODE') . ' ' . $result . ')'; } } else { - // - $this->wiki->LogAdministrativeAction($this->wiki->GetUserName(), _t('NEW_ACL_FOR_GROUP')." " . ucfirst($selectedGroupName) . ' : ' . $newacl . "\n"); - $message = _t('NEW_ACL_SUCCESSFULLY_SAVED_FOR_THE_GROUP').' ' . ucfirst($selectedGroupName); + $this->wiki->LogAdministrativeAction($this->wiki->GetUserName(), _t('NEW_ACL_FOR_GROUP') . ' ' . ucfirst($selectedGroupName) . ' : ' . $newacl . "\n"); + $message = _t('NEW_ACL_SUCCESSFULLY_SAVED_FOR_THE_GROUP') . ' ' . ucfirst($selectedGroupName); $type = 'success'; } } } - return compact(['message','type']); + return compact(['message', 'type']); } - protected function deleteGroup(string &$selectedGroupName): array { $message = ''; @@ -116,7 +113,7 @@ protected function deleteGroup(string &$selectedGroupName): array $ownedPages = $dbService->loadAll($sql); // if group owns no pages, then empty if (!empty($ownedPages)) { // Array is not empty because the query returns at least one page - $message = _t('ONLY_NO_PAGES_GROUP_FOR_DELETION').'
'; + $message = _t('ONLY_NO_PAGES_GROUP_FOR_DELETION') . '
'; $message .= implode('
', array_map(function ($acl) { return "wiki->Href('', $acl['page_tag'])}\">{$acl['page_tag']}"; }, $ownedPages)); @@ -131,7 +128,7 @@ protected function deleteGroup(string &$selectedGroupName): array $dbService->query($sql); $tripleStore = $this->getService(TripleStore::class); - $previous = $tripleStore->getMatching(GROUP_PREFIX.$selectedGroupName, WIKINI_VOC_PREFIX.WIKINI_VOC_ACLS, '', '='); + $previous = $tripleStore->getMatching(GROUP_PREFIX . $selectedGroupName, WIKINI_VOC_PREFIX . WIKINI_VOC_ACLS, '', '='); $deletionOk = false; if (!empty($previous)) { $deletionOk = true; @@ -153,7 +150,7 @@ protected function deleteGroup(string &$selectedGroupName): array } } - return compact(['message','type']); + return compact(['message', 'type']); } protected function confirmToken() diff --git a/actions/EditHandlersAclsAction.php b/actions/EditHandlersAclsAction.php index 146720d3a..7ee29e026 100755 --- a/actions/EditHandlersAclsAction.php +++ b/actions/EditHandlersAclsAction.php @@ -1,7 +1,7 @@ wiki->UserIsAdmin()) { return $this->render('@templates/alert-message.twig', [ 'type' => 'danger', - 'message' => "EditHandlersAclsAction : " . _t('BAZ_NEED_ADMIN_RIGHTS') - ]) ; + 'message' => 'EditHandlersAclsAction : ' . _t('BAZ_NEED_ADMIN_RIGHTS'), + ]); } $wiki = &$this->wiki; $list = $wiki->services->get(Performer::class)->list('handler'); sort($list); $res = $wiki->FormOpen('', '', 'get'); - $res .= _t('HANDLER_RIGHTS').' '; foreach ($list as $handler) { $res .= ''; } - $res .= ' ' . $wiki->FormClose(); + $res .= ' ' . $wiki->FormClose(); if ($_POST && !empty($_POST['handlername'])) { // save ACL's $result = $wiki->SetModuleACL($name = $_POST['handlername'], 'handler', @$_POST['acl']); if ($result) { - return $res . _t('ERROR_WHILE_SAVING_HANDLER_ACL').' ' . ucfirst($name) . ' ('._t('ERROR_CODE').' ' . $result . ')
'; + return $res . _t('ERROR_WHILE_SAVING_HANDLER_ACL') . ' ' . ucfirst($name) . ' (' . _t('ERROR_CODE') . ' ' . $result . ')
'; } else { - $wiki->LogAdministrativeAction($wiki->GetUserName(), _t('NEW_ACL_FOR_HANDLER')." " . ucfirst($name) . ' : ' . @$_POST['acl'] . "\n"); - return $res . _t('NEW_ACL_SUCCESSFULLY_SAVED_FOR_HANDLER').' ' . ucfirst($name) . '.
'; + $wiki->LogAdministrativeAction($wiki->GetUserName(), _t('NEW_ACL_FOR_HANDLER') . ' ' . ucfirst($name) . ' : ' . @$_POST['acl'] . "\n"); + + return $res . _t('NEW_ACL_SUCCESSFULLY_SAVED_FOR_HANDLER') . ' ' . ucfirst($name) . '.
'; } } elseif (!empty($_GET['handlername']) && in_array($name = $_GET['handlername'], $list)) { $res .= $wiki->FormOpen(); - $res .= '
'._t('EDIT_RIGHTS_FOR_HANDLER').' ' . ucfirst($name) . ':
'; - $res .= ''; + $res .= '
' . _t('EDIT_RIGHTS_FOR_HANDLER') . ' ' . ucfirst($name) . ':
'; + $res .= ''; $res .= '
'; - $res .= ''; + $res .= ''; + return $res . $wiki->FormClose(); } + return $res; } } diff --git a/actions/EraseSpamedCommentsAction.php b/actions/EraseSpamedCommentsAction.php index 674f68444..ff2807d6e 100755 --- a/actions/EraseSpamedCommentsAction.php +++ b/actions/EraseSpamedCommentsAction.php @@ -1,7 +1,7 @@ wiki; ob_start(); - echo "\n\n"; + echo "\n\n"; // -- 2. Affichage du formulaire --- if (!isset($_POST['clean'])) { - $limit = isset($this->arguments['max']) && $this->arguments["max"] > 0 ? (int) $this->arguments["max"] : 0; + $limit = isset($this->arguments['max']) && $this->arguments['max'] > 0 ? (int)$this->arguments['max'] : 0; if ($comments = $wiki->LoadRecentComments($limit)) { // Formulaire listant les commentaires - echo "
Href() . "\" name=\"selection\">\n"; + echo '\n"; $curday = ''; foreach ($comments as $comment) { // day header - list($day, $time) = explode(" ", $comment["time"]); + list($day, $time) = explode(' ', $comment['time']); if ($day != $curday) { if ($curday) { - echo "\n" ; + echo "\n"; } $erase_id = 'erasecommday_' . str_replace('-', '', $day); - echo "$day: ".htmlspecialchars(strtolower(_t('INVERT')))."
\n" ; - echo "