Changeset 3862:1ff5b84e865a
- Timestamp:
- 09/04/18 15:29:15 (7 years ago)
- Branch:
- 2.14
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/dbschema/upgrade.php
r3850 r3862 311 311 } 312 312 313 if (version_compare($version, '2.4.0', '<=')) {314 # setup media_exclusion315 $strReq = 'UPDATE ' . $core->prefix . 'setting ' .316 "SET setting_value = '/\\.php\$/i' " .317 "WHERE setting_id = 'media_exclusion' " .318 "AND setting_value = '' ";319 $core->con->execute($strReq);320 }321 322 313 if (version_compare($version, '2.5', '<=')) { 323 314 # Try to disable daInstaller plugin if it has been installed outside the default plugins directory … … 454 445 " AND setting_value = '1.11.1' "; 455 446 $core->con->execute($strReq); 456 # setup media_exclusion (cope with php, php5, php7, … rather than only .php)457 $strReq = 'UPDATE ' . $core->prefix . 'setting ' .458 " SET setting_value = '/\\.php[0-9]*\$/i' " .459 " WHERE setting_id = 'media_exclusion' " .460 " AND setting_ns = 'system' " .461 " AND setting_value = '/\\.php\$/i' ";462 $core->con->execute($strReq);463 447 # Some new settings should be initialized, prepare db queries 464 448 $strReq = 'INSERT INTO ' . $core->prefix . 'setting' . … … 466 450 ' VALUES(\'%s\',\'system\',\'%s\',\'boolean\',\'%s\')'; 467 451 $core->con->execute(sprintf($strReq, 'no_search', '0', 'Disable internal search system')); 468 }469 470 if (version_compare($version, '2.8.2', '<=')) {471 # Update flie exclusion upload regex472 $strReq = 'UPDATE ' . $core->prefix . 'setting ' .473 " SET setting_value = '/\\.(phps?|pht(ml)?|phl)[0-9]*\$/i' " .474 " WHERE setting_id = 'media_exclusion' " .475 " AND setting_ns = 'system' " .476 " AND (setting_value = '/\\.php[0-9]*\$/i' " .477 " OR setting_value = '/\\.php\$/i') ";478 $core->con->execute($strReq);479 452 } 480 453 … … 504 477 self::prefs2array('dashboard', 'favorites'); 505 478 self::prefs2array('interface', 'media_last_dirs'); 506 507 # Update flie exclusion upload regex508 $strReq = 'UPDATE ' . $core->prefix . 'setting ' .509 " SET setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js)[0-9]*\$/i' " .510 " WHERE setting_id = 'media_exclusion' " .511 " AND setting_ns = 'system' " .512 " AND (setting_value = '/\\.php[0-9]*\$/i' " .513 " OR setting_value = '/\\.php\$/i') " .514 " OR setting_value = '/\\.(phps?|pht(ml)?|phl)[0-9]*\$/i' ";515 $core->con->execute($strReq);516 479 } 517 480 … … 526 489 @file_put_contents($f, 'Require all denied' . "\n" . 'Deny from all' . "\n"); 527 490 } 528 529 # Update flie exclusion upload regex530 $strReq = 'UPDATE ' . $core->prefix . 'setting ' .531 " SET setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js|htaccess)[0-9]*\$/i' " .532 " WHERE setting_id = 'media_exclusion' " .533 " AND setting_ns = 'system' " .534 " AND (setting_value = '/\\.php[0-9]*\$/i' " .535 " OR setting_value = '/\\.php\$/i') " .536 " OR setting_value = '/\\.(phps?|pht(ml)?|phl)[0-9]*\$/i' " .537 " OR setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js)[0-9]*\$/i'";538 $core->con->execute($strReq);539 491 540 492 # Some new settings should be initialized, prepare db queries … … 688 640 } 689 641 690 if (version_compare($version, '2.14. 2', '<')) {642 if (version_compare($version, '2.14.3', '<')) { 691 643 # Update flie exclusion upload regex 692 644 $strReq = 'UPDATE ' . $core->prefix . 'setting ' . 693 " SET setting_value = '/\\.(phps?|pht(ml)?|phl|.?html?|js|htaccess)[0-9]* \$/i' " .645 " SET setting_value = '/\\.(phps?|pht(ml)?|phl|.?html?|js|htaccess)[0-9]*$/i' " . 694 646 " WHERE setting_id = 'media_exclusion' " . 695 647 " AND setting_ns = 'system' " . 696 " AND (setting_value = '/\\.php[0-9]* \$/i' " .697 " OR setting_value = '/\\.php \$/i') " .698 " OR setting_value = '/\\.(phps?|pht(ml)?|phl)[0-9]* \$/i' " .699 " OR setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js)[0-9]* \$/i'" .700 " OR setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js|htaccess)[0-9]* \$/i'";648 " AND (setting_value = '/\\.php[0-9]*$/i' " . 649 " OR setting_value = '/\\.php$/i') " . 650 " OR setting_value = '/\\.(phps?|pht(ml)?|phl)[0-9]*$/i' " . 651 " OR setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js)[0-9]*$/i'" . 652 " OR setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js|htaccess)[0-9]*$/i'"; 701 653 $core->con->execute($strReq); 702 654 }
Note: See TracChangeset
for help on using the changeset viewer.