Plugin Directory

Changeset 622682


Ignore:
Timestamp:
11/08/2012 08:23:05 PM (13 years ago)
Author:
ti2m
Message:

added filesystem and safemode check

Location:
edge-suite/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • edge-suite/trunk/admin/manage.php

    r608321 r622682  
    6767      }
    6868    }
    69     if(!dir_is_writable(EDGE_SUITE_PUBLIC_DIR . '/tmp')){
     69    if(!dir_is_writable(EDGE_SUITE_PUBLIC_DIR . '/tmp/')){
    7070      throw new Exception("Edge suite tmp is not writable.<br />");
    7171    }
  • edge-suite/trunk/edge-suite.php

    r613980 r622682  
    150150  edge_suite_init_constants();
    151151
    152   //Check if dir is writable and create directory structure.
    153   if (!mkdir_recursive(EDGE_SUITE_COMP_PROJECT_DIR)) {
    154     print sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?'), EDGE_SUITE_COMP_PROJECT_DIR_REL);
    155   }
    156 
    157152}
    158153
  • edge-suite/trunk/includes/edge-suite-general.php

    r613609 r622682  
    3434function check_filesystem(){
    3535  $msg = array();
     36
     37  //Check if dir is writable and create directory structure.
     38  if (!mkdir_recursive(EDGE_SUITE_COMP_PROJECT_DIR)) {
     39    $msg['create_folder'] = 'Edge Suite: Unable to create directory project directory (' . EDGE_SUITE_COMP_PROJECT_DIR . '). Is its parent directory writable by the server?';
     40  }
     41
     42
    3643  if(!class_exists('ZipArchive')){
    3744    $msg['zip'] = 'Your server is not able to extract zip files (PHP Class "ZipArchive" not found).';
     45  }
     46
     47
     48  if( ini_get('safe_mode') ){
     49    $msg['safemode'] = "PHP is running in safe mode, uploading compositions will not work.";
    3850  }
    3951
     
    157169  }
    158170  else{
    159     return $path . " could not be created.";
     171    return false;
    160172  }
    161173}
Note: See TracChangeset for help on using the changeset viewer.