Ángel Guzmán Maeso : Use array_random() and explode() in quote function

Jeremy Newman jnewman at winehq.org
Mon Jun 2 16:54:53 CDT 2008


Module: website
Branch: master
Commit: ed04546b951e78f6fdd692e6ea24d3df48ee5c6f
URL:    http://source.winehq.org/git/website.git/?a=commit;h=ed04546b951e78f6fdd692e6ea24d3df48ee5c6f

Author: Ángel Guzmán Maeso <shakaran at gmail.com>
Date:   Mon Jun  2 16:24:07 2008 -0500

Use array_random() and explode() in quote function

---

 site |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/site b/site
index 0e13900..67d6d27 100644
--- a/site
+++ b/site
@@ -379,8 +379,8 @@ function view_screenshots ($x)
 // random quote
 function view_quote ()
 {
-    $quotes = split("\n",$GLOBALS[html]->template('base','quotes'));
-    return $quotes[rand(0,(count($quotes)-2))];
+    $quotes = explode("\n",trim($GLOBALS[html]->template('base','quotes')));
+    return $quotes[array_rand($quotes)];
 }
 
 // end of file




More information about the wine-cvs mailing list