Plugin Directory

Changeset 691326


Ignore:
Timestamp:
04/03/2013 07:12:03 PM (13 years ago)
Author:
DaganLev
Message:

version 1.0.5 with some fixes

Location:
solid-code-theme-editor
Files:
38 added
2 edited

Legend:

Unmodified
Added
Removed
  • solid-code-theme-editor/trunk/readme.txt

    r689595 r691326  
    5959* added abilities to delete old files
    6060
     61= 1.0.4 =
     62* small fixes to work with new functionality
     63
    6164== Upgrade Notice ==
    6265
  • solid-code-theme-editor/trunk/sc-theme-editor.php

    r689595 r691326  
    44Plugin URI: http://solid-code.co.uk/2011/08/solid-code-theme-editor/
    55Description: Adds a special editor to the theme editor with more functionality
    6 Version: 1.0.4
     6Version: 1.0.5
    77Author: Dagan Lev
    88Author URI: http://solid-code.co.uk
     
    209209        <div class="scte_content_left">
    210210            <ul>
    211                 <li style="float:left;"><a href="<?php echo $pluginURL; ?>/solid-code-theme-editor/downloadfile/?theme=<?php echo urlencode($theme->template); ?>&amp;file=<?php echo urlencode($urlFile); ?>">Download File</a></li>
    212                 <li style="float:left;margin-left:20px;"><a href="<?php echo $pluginURL; ?>/solid-code-theme-editor/downloadbackup/?theme=<?php echo urlencode($theme->template); ?>">Download Whole Theme</a> (ZIP)</li>
     211                <li style="float:left;"><a href="<?php echo (is_multisite() ? '': $pluginURL); ?>/solid-code-theme-editor/downloadfile/?theme=<?php echo urlencode($theme->template); ?>&amp;file=<?php echo urlencode($urlFile); ?>">Download File</a></li>
     212                <li style="float:left;margin-left:20px;"><a href="<?php echo (is_multisite() ? '': $pluginURL); ?>/solid-code-theme-editor/downloadbackup/?theme=<?php echo urlencode($theme->template); ?>">Download Whole Theme</a> (ZIP)</li>
    213213            </ul>
    214214            <div style="clear:both;"><!-- EMPTY --></div>
     
    306306    $strtmp = '';
    307307    $strtmpdir = '';
    308     if ($handle = opendir($dir)) {
     308    if (file_exists($dir)) {
    309309        if(str_ireplace(str_ireplace($maindir,'',$dir),'',$sfile) != $sfile){
    310310            $strtmpdir = '<ul class="scte_show">';
    311311        }else{
    312             $strtmpdir = '<ul>';   
    313         }
    314         while (false !== ($file = readdir($handle))) {
     312            $strtmpdir = '<ul>';         
     313        }
     314        $files=glob($dir.'/*');
     315        sort($files);
     316
     317        foreach($files as $file){
     318            $file=str_replace($dir.'/','',$file);
    315319            if ($file != "." && $file != ".." && $file != ".svn") {
    316320                if(is_dir($dir . '/' . $file)){
    317                     $strtmpdir .= '<li>' . $file . scte_loopThroughFiles($maindir,$dir . '/'. $file,$theme,$sfile) . '</li>';   
     321                    $strtmpdir .= '<li>' . $file . scte_loopThroughFiles($maindir,$dir . '/'. $file,$theme,$sfile) . '</li>';       
    318322                }else{
    319323                    if($sfile==(str_ireplace($maindir,'',$dir . '/') . $file)){
     
    326330        }
    327331        $strtmp = $strtmpdir . $strtmp . '</ul>';
    328         closedir($handle);
    329332    }
    330333    return $strtmp;
Note: See TracChangeset for help on using the changeset viewer.