[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 -- Add locked field to extensions table. 2 -- The following statement was modified for 4.1.1 by adding the "/** CAN FAIL **/" installer hint. 3 -- See https://github.com/joomla/joomla-cms/pull/37156 4 ALTER TABLE "#__extensions" ADD COLUMN "locked" smallint DEFAULT 0 NOT NULL /** CAN FAIL **/; 5 6 COMMENT ON COLUMN "#__extensions"."protected" IS 'Flag to indicate if the extension is protected. Protected extensions cannot be disabled.'; 7 COMMENT ON COLUMN "#__extensions"."locked" IS 'Flag to indicate if the extension is locked. Locked extensions cannot be uninstalled.'; 8 9 -- Set all core extensions as locked extensions and unprotected them. 10 UPDATE "#__extensions" 11 SET "locked" = 1, "protected" = 0 12 WHERE ("type" = 'component' AND "element" IN ( 13 'com_wrapper', 14 'com_admin', 15 'com_banners', 16 'com_cache', 17 'com_categories', 18 'com_checkin', 19 'com_contact', 20 'com_cpanel', 21 'com_installer', 22 'com_languages', 23 'com_login', 24 'com_media', 25 'com_menus', 26 'com_messages', 27 'com_modules', 28 'com_newsfeeds', 29 'com_plugins', 30 'com_templates', 31 'com_content', 32 'com_config', 33 'com_redirect', 34 'com_users', 35 'com_finder', 36 'com_joomlaupdate', 37 'com_tags', 38 'com_contenthistory', 39 'com_ajax', 40 'com_postinstall', 41 'com_fields', 42 'com_associations', 43 'com_privacy', 44 'com_actionlogs', 45 'com_workflow', 46 'com_mails' 47 )) 48 OR ("type" = 'module' AND "client_id" = 0 AND "element" IN ( 49 'mod_articles_archive', 50 'mod_articles_latest', 51 'mod_articles_popular', 52 'mod_banners', 53 'mod_breadcrumbs', 54 'mod_custom', 55 'mod_feed', 56 'mod_footer', 57 'mod_login', 58 'mod_menu', 59 'mod_articles_news', 60 'mod_random_image', 61 'mod_related_items', 62 'mod_stats', 63 'mod_syndicate', 64 'mod_users_latest', 65 'mod_whosonline', 66 'mod_wrapper', 67 'mod_articles_category', 68 'mod_articles_categories', 69 'mod_languages', 70 'mod_finder', 71 'mod_tags_popular', 72 'mod_tags_similar' 73 )) 74 OR ("type" = 'module' AND "client_id" = 1 AND "element" IN ( 75 'mod_custom', 76 'mod_feed', 77 'mod_latest', 78 'mod_logged', 79 'mod_login', 80 'mod_loginsupport', 81 'mod_menu', 82 'mod_popular', 83 'mod_quickicon', 84 'mod_frontend', 85 'mod_messages', 86 'mod_post_installation_messages', 87 'mod_user', 88 'mod_title', 89 'mod_toolbar', 90 'mod_multilangstatus', 91 'mod_version', 92 'mod_stats_admin', 93 'mod_sampledata', 94 'mod_latestactions', 95 'mod_privacy_dashboard', 96 'mod_submenu', 97 'mod_privacy_status' 98 )) 99 OR ("type" = 'plugin' AND 100 ( 101 ("folder" = 'actionlog' AND "element" IN ('joomla')) 102 OR ("folder" = 'api-authentication' AND "element" IN ('basic', 'token')) 103 OR ("folder" = 'authentication' AND "element" IN ('cookie', 'joomla', 'ldap')) 104 OR ("folder" = 'behaviour' AND "element" IN ('taggable', 'versionable')) 105 OR ("folder" = 'captcha' AND "element" IN ('recaptcha', 'recaptcha_invisible')) 106 OR ("folder" = 'content' AND "element" IN ('confirmconsent', 'contact', 'emailcloak', 'fields', 'finder', 'joomla', 'loadmodule', 'pagebreak', 'pagenavigation', 'vote')) 107 OR ("folder" = 'editors' AND "element" IN ('codemirror', 'none', 'tinymce')) 108 OR ("folder" = 'editors-xtd' AND "element" IN ('article', 'contact', 'fields', 'image', 'menu', 'module', 'pagebreak', 'readmore')) 109 OR ("folder" = 'extension' AND "element" IN ('finder', 'joomla', 'namespacemap')) 110 OR ("folder" = 'fields' AND "element" IN ('calendar', 'checkboxes', 'color', 'editor', 'imagelist', 'integer', 'list', 'media', 'radio', 'sql', 'subform', 'text', 'textarea', 'url', 'user', 'usergrouplist')) 111 OR ("folder" = 'filesystem' AND "element" IN ('local')) 112 OR ("folder" = 'finder' AND "element" IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags')) 113 OR ("folder" = 'installer' AND "element" IN ('folderinstaller', 'override', 'packageinstaller', 'urlinstaller', 'webinstaller')) 114 OR ("folder" = 'media-action' AND "element" IN ('crop', 'resize', 'rotate')) 115 OR ("folder" = 'privacy' AND "element" IN ('actionlogs', 'consents', 'contact', 'content', 'message', 'user')) 116 OR ("folder" = 'quickicon' AND "element" IN ('downloadkey', 'extensionupdate', 'joomlaupdate', 'overridecheck', 'phpversioncheck', 'privacycheck')) 117 OR ("folder" = 'sampledata' AND "element" IN ('blog', 'multilang', 'testing')) 118 OR ("folder" = 'system' AND "element" IN ('accessibility', 'actionlogs', 'cache', 'debug', 'fields', 'highlight', 'httpheaders', 'languagecode', 'languagefilter', 'log', 'logout', 'logrotation', 'privacyconsent', 'redirect', 'remember', 'sef', 'sessiongc', 'skipto', 'stats', 'updatenotification', 'webauthn')) 119 OR ("folder" = 'twofactorauth' AND "element" IN ('totp', 'yubikey')) 120 OR ("folder" = 'user' AND "element" IN ('contactcreator', 'joomla', 'profile', 'terms', 'token')) 121 OR ("folder" = 'webservices' AND "element" IN ('banners', 'config', 'contact', 'content', 'languages', 'menus', 'messages', 'modules', 'newsfeeds', 'plugins', 'privacy', 'redirect', 'tags', 'templates', 'users')) 122 ) 123 ) 124 OR ("type" = 'library' AND "element" IN ('joomla', 'phpass')) 125 OR ("type" = 'template' AND "element" IN ('cassiopeia', 'atum')) 126 OR ("type" = 'language' AND "element" IN ('en-GB')) 127 OR ("type" = 'file' AND "element" IN ('joomla')) 128 OR ("type" = 'package' AND "element" IN ('pkg_en-GB')); 129 130 -- Now protect from disabling essential core extensions. 131 UPDATE "#__extensions" 132 SET "protected" = 1, "enabled" = 1 133 WHERE ("type" = 'component' AND "element" IN ( 134 'com_admin', 135 'com_ajax', 136 'com_cache', 137 'com_categories', 138 'com_checkin', 139 'com_config', 140 'com_content', 141 'com_cpanel', 142 'com_installer', 143 'com_joomlaupdate', 144 'com_languages', 145 'com_login', 146 'com_mails', 147 'com_media', 148 'com_menus', 149 'com_messages', 150 'com_modules', 151 'com_plugins', 152 'com_postinstall', 153 'com_templates', 154 'com_users', 155 'com_workflow' 156 )) 157 OR ("type" = 'plugin' AND 158 ( 159 ("folder" = 'authentication' AND "element" IN ('joomla')) 160 OR ("folder" = 'editors' AND "element" IN ('none')) 161 OR ("folder" = 'extension' AND "element" IN ('namespacemap')) 162 ) 163 ) 164 OR ("type" = 'library' AND "element" IN ('joomla', 'phpass')) 165 OR ("type" = 'language' AND "element" IN ('en-GB')) 166 OR ("type" = 'file' AND "element" IN ('joomla')) 167 OR ("type" = 'package' AND "element" IN ('pkg_en-GB')); 168 169 -- Set core extensions (from J3) as unlocked extensions and unprotect them. 170 UPDATE "#__extensions" 171 SET "protected" = 0, "locked" = 0 172 WHERE ("type" = 'library' AND "element" IN ( 173 'fof' 174 ));
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |