[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_admin/sql/updates/mysql/ -> 4.0.0-2020-03-25.sql (source)

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


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer