[Xfce4-commits] <www:master> FIx sorting and add dummy for 4.10.

Nick Schermer noreply at xfce.org
Sat Apr 21 18:20:01 CEST 2012


Updating branch refs/heads/master
         to 55829833ec48d9c52f805c94720fb91ce01bf7f5 (commit)
       from 35054d4fb9352b2b72f86cf71a035922ba58c452 (commit)

commit 55829833ec48d9c52f805c94720fb91ce01bf7f5
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Apr 21 18:17:26 2012 +0200

    FIx sorting and add dummy for 4.10.

 pages/download/changelogs/4.10.php               |   84 ++++++++++++++++++++++
 pages/download/changelogs/4.10pre2.php           |    2 +-
 pages/download/changelogs/{4.8.0.php => 4.8.php} |    0
 pages/download/changelogs/index.php              |   19 ++++-
 4 files changed, 101 insertions(+), 4 deletions(-)

diff --git a/pages/download/changelogs/4.10.php b/pages/download/changelogs/4.10.php
new file mode 100644
index 0000000..718a67c
--- /dev/null
+++ b/pages/download/changelogs/4.10.php
@@ -0,0 +1,84 @@
+
+
+<h1>Xfce 4.10 Changelog</h1>
+
+<h2>Dependency Changes</h2>
+<ul>
+  <li>For changes in the 4.10 dependecies, please look at the <a href="/download/changelogs/4.10pre1">4.10pre1</a> ChangeLog.</li>
+  <li>See also the <a href="/download/changelogs/4.10pre1">4.10pre1</a> and <a href="/download/changelogs/4.10pre2">4.10pre2</a> ChangeLog for major changes in the 4.10 release.</li>
+</ul>
+
+<h2>Development Tools <em>(xfce4-dev-tools)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Utility Library <em>(libxfce4util)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Widget Library <em>(libxfce4ui)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Extension Library <em>(exo)</em></h2>
+<ul>
+        
+</ul>
+
+<h2>File Manager <em>(thunar)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Application Finder <em>(xfce4-appfinder)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Panel <em>(xfce4-panel)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Session Manager <em>(xfce4-session)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Settings Manager <em>(xfce4-settings)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Configuration Manager <em>(xfconf)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Desktop Manager <em>(xfdesktop)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Window Manager <em>(xfwm4)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Theme Engine <em>(gtk-xfce-engine)</em></h2>
+<ul>
+
+</ul>
+
+<h2>Power Manager <em>(xfce4-power-manager)</em></h2>
+<ul>
+ 
+</ul>
+
+<h2>Volume Manager <em>(thunar-volman)</em></h2>
+<ul>
+
+</ul>
diff --git a/pages/download/changelogs/4.10pre2.php b/pages/download/changelogs/4.10pre2.php
index d0d002a..fafbaff 100644
--- a/pages/download/changelogs/4.10pre2.php
+++ b/pages/download/changelogs/4.10pre2.php
@@ -4,7 +4,7 @@
 
 <h2>Dependency Changes</h2>
 <ul>
-  <li>For changes in the 4.10 dependecies, please look at the <a href="/download/changelogs/4.10pre1">4.10pre1 ChangeLog</a>.</li>
+  <li>For changes in the 4.10 dependecies, please look at the <a href="/download/changelogs/4.10pre1">4.10pre1</a> ChangeLog.</li>
 </ul>
 
 <h2>Development Tools <em>(xfce4-dev-tools)</em></h2>
diff --git a/pages/download/changelogs/4.8.0.php b/pages/download/changelogs/4.8.php
similarity index 100%
rename from pages/download/changelogs/4.8.0.php
rename to pages/download/changelogs/4.8.php
diff --git a/pages/download/changelogs/index.php b/pages/download/changelogs/index.php
index 5e082f7..6da9ac4 100644
--- a/pages/download/changelogs/index.php
+++ b/pages/download/changelogs/index.php
@@ -3,8 +3,8 @@
 $head['title'] = R_('Changelogs');
 
 $major_versions = array (
-        '/^4\.10(\.|pre)/' => R_('Xfce 4.10'),
-        '/^4\.8(\.|pre)/' => R_('Xfce 4.8'),
+        '/^4\.10(|pre)/' => R_('Xfce 4.10'),
+        '/^4\.8(|pre)/' => R_('Xfce 4.8'),
         '/^4\.[56]\./' => R_('Xfce 4.6'),
         '/^4\.[34]\./' => R_('Xfce 4.4'),
         '/^4\.[12]\./' => R_('Xfce 4.2'));
@@ -12,6 +12,19 @@ $major_versions = array (
 $path = 'pages/download/changelogs/';
 $versions = array ();
 
+function xfce_versort ($a, $b)
+{
+	if ($a == $b)
+		return 0;
+
+	$pre_a = strpos ($a, 'pre') !== false;
+	$pre_b = strpos ($b, 'pre') !== false;
+	if ($pre_a != $pre_b)
+		return $pre_a ? +1 : -1;
+
+	return ($a > $b) ? -1 : +1;
+}
+
 if ($dir = opendir ('pages/download/changelogs/'))
 {
 	while (($name = readdir($dir)) !== false)
@@ -25,7 +38,7 @@ if ($dir = opendir ('pages/download/changelogs/'))
 	}
 	closedir ($dir);
 }
-rsort ($versions);
+usort ($versions, 'xfce_versort');
 ?>
 
 <h1><?php echo $head['title'] ?></h1>


More information about the Xfce4-commits mailing list