From 5576f99ff67d84b69837ef29c9102c8c15145c03 Mon Sep 17 00:00:00 2001 From: jim Date: Sat, 20 May 2006 15:06:54 +0000 Subject: [PATCH] dList v2.2.5 beta - Tested and fixed bugs on PHP 5.x. Only remaining problem is that short tags is disabled by default in PHP 5.x. As of this moment dList templates use style tags for simplicity. - Other minor changes which i don't remember. git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@23 a5845835-ea0f-0410-a762-dd0bfe9bfde8 --- exec/output.exec.php | 3 ++- index.php | 2 +- libs/dirlist.lib.php | 3 ++- libs/exechandler.lib.php | 24 +++++++++++++----------- libs/imagethumb.lib.php | 2 +- templates/simple/_details.phtml | 4 +++- templates/simple/render.exec.php | 1 + 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/exec/output.exec.php b/exec/output.exec.php index f1aa956..8905329 100644 --- a/exec/output.exec.php +++ b/exec/output.exec.php @@ -84,7 +84,7 @@ class Path { class Sort { //>Section> sort.get_url - function get_url ($sortby) { + function get_url ($sortby, $desc=false) { global $config; $return = array(); $current_sort = ( empty($_REQUEST['sort']) ) ? $config->default_sort : $_REQUEST['sort'] ; @@ -97,6 +97,7 @@ class Sort { } else { if ($sortby != $config->default_sort) { $return[] = 'sort='.$sortby; + if ( $desc == true ) $return[] = 'order=desc'; } } diff --git a/index.php b/index.php index 0e12d58..8fc3231 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* - dList v2.2.4 beta + dList v2.2.5 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com diff --git a/libs/dirlist.lib.php b/libs/dirlist.lib.php index 04c8b98..3f52598 100644 --- a/libs/dirlist.lib.php +++ b/libs/dirlist.lib.php @@ -4,7 +4,7 @@ class dirList { /* - Class: dirList v2.1.1 beta + Class: dirList v2.1.2 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com @@ -172,6 +172,7 @@ class dirList { function getDetails ($item) { $item = str_replace("\\", '/', $item); $return['name'] = basename($item); + $return['name'] = preg_replace('/.*(?:\/|\\\\)(.*?)$/i', "$1", $item); // Owner and Group if ( ($group = $this->getGroup($item)) != false ) $return = array_merge($return, $group); diff --git a/libs/exechandler.lib.php b/libs/exechandler.lib.php index b806684..6ce277e 100644 --- a/libs/exechandler.lib.php +++ b/libs/exechandler.lib.php @@ -4,7 +4,7 @@ class execHandler { /* - Class: execHandler v0.7.5 beta + Class: execHandler v0.7.6 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com @@ -155,16 +155,18 @@ class execHandler { .= "\n\n//==========================\n// Stage: ".$stage.":".$stage_priority."\n//==========================\n"; $new_stage = true; } - foreach( $this->execution_order[$stage] as $key => $code ) { - if( $this->debug ) { - $pr = explode('|', $key, 2); - $pr = $pr[0]; - $this->compiled_code - .= ( $new_stage ) ? "\n// Section: ".$code.":".$pr."\n" : "\n\n// Section: ".$code.":".$pr."\n" ; - $this->compiled_code .= $this->clean_up_code($this->code[$stage][$code]); - $new_stage = false; - } else { - $this->compiled_code .= $this->code[$stage][$code]; + if ( !empty($this->execution_order[$stage]) ) { + foreach( $this->execution_order[$stage] as $key => $code ) { + if( $this->debug ) { + $pr = explode('|', $key, 2); + $pr = $pr[0]; + $this->compiled_code + .= ( $new_stage ) ? "\n// Section: ".$code.":".$pr."\n" : "\n\n// Section: ".$code.":".$pr."\n" ; + $this->compiled_code .= $this->clean_up_code($this->code[$stage][$code]); + $new_stage = false; + } else { + $this->compiled_code .= $this->code[$stage][$code]; + } } } } diff --git a/libs/imagethumb.lib.php b/libs/imagethumb.lib.php index 44b3870..424f246 100644 --- a/libs/imagethumb.lib.php +++ b/libs/imagethumb.lib.php @@ -4,7 +4,7 @@ class imageThumb { /* - Class: image v0.2 beta + Class: imageThumb v0.2 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com diff --git a/templates/simple/_details.phtml b/templates/simple/_details.phtml index e9685ae..300266d 100644 --- a/templates/simple/_details.phtml +++ b/templates/simple/_details.phtml @@ -1,7 +1,9 @@ - $value): ?> + $value): + $reverse = ($key == 'mtime') ? true : false; + ?> diff --git a/templates/simple/render.exec.php b/templates/simple/render.exec.php index b167de6..5a8fd31 100644 --- a/templates/simple/render.exec.php +++ b/templates/simple/render.exec.php @@ -36,6 +36,7 @@ if ( !empty($_COOKIE['dList_simple_viewMode']) && !empty($config->tpl_modes[$_CO } + //>Section> include_phtml include(TPL_PATH.'index.phtml');
$key?>$key?>