Plugin Directory

Changeset 696403


Ignore:
Timestamp:
04/12/2013 05:38:26 AM (13 years ago)
Author:
ti2m
Message:

add error message on failed zip extraction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • edge-suite/trunk/includes/edge-suite-comp-builder.inc

    r665554 r696403  
    328328    $result = unzip($file, $destination);
    329329    if (is_wp_error($result)) {
    330       throw new Exception('Extraction of ' . $file . ' failed.');
     330      throw new Exception('Extraction of ' . $file . ' failed: ' . $result->get_error_message());
    331331    }
    332332    // Add ignored files
     
    677677    global $wp_filesystem;
    678678    // TODO: Test.
    679     $allowed_extensions = 'js,png,jpg,gif,svg,css';
     679    $allowed_extensions = 'js,png,jpg,gif,svg,css,html';
    680680    // Strip spaces.
    681681    $allowed_extensions = str_replace(' ', '', $allowed_extensions);
     
    684684    // Check if list is valid.
    685685    if (!preg_match('/^([a-zA-Z0-9]{2,6}\|)*([a-zA-Z0-9]{2,6})$/', $allowed_extensions)) {
    686       $allowed_extensions = 'js|png|jpg|gif|svg|css';
     686      $allowed_extensions = 'js|png|jpg|gif|svg|css|html';
    687687    }
    688688
Note: See TracChangeset for help on using the changeset viewer.