[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qsos-commits] qsos/apps/phpviewer QSOSDocument.php
From: |
Raphaël Semeteys |
Subject: |
[Qsos-commits] qsos/apps/phpviewer QSOSDocument.php |
Date: |
Tue, 07 Nov 2006 23:18:27 +0000 |
CVSROOT: /sources/qsos
Module name: qsos
Changes by: Raphaël Semeteys <rsemeteys> 06/11/07 23:18:27
Modified files:
apps/phpviewer : QSOSDocument.php
Log message:
renderscore modified
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/phpviewer/QSOSDocument.php?cvsroot=qsos&r1=1.1&r2=1.2
Patches:
Index: QSOSDocument.php
===================================================================
RCS file: /sources/qsos/qsos/apps/phpviewer/QSOSDocument.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- QSOSDocument.php 31 Oct 2006 15:56:05 -0000 1.1
+++ QSOSDocument.php 7 Nov 2006 23:18:27 -0000 1.2
@@ -53,11 +53,6 @@
$query = "//address@hidden'".$name."']/element";
$nb = $this->xpath->query($query);
return $nb->length;
- /*if ($nb->length != 0) {
- return true;
- } else {
- return false;
- }*/
}
//$element: name of the XML header tag
@@ -152,21 +147,16 @@
$score = 0;
$sum = 0;
$totalWeight = 0;
- $isRenderable = true;
for ($i=0; $i < count($tree); $i++) {
$totalWeight++;
- if ($tree[$i]->score == null) $isRenderable = false;
+ if ($tree[$i]->score == null) {
+ $isRenderable = false;
+ }
$sum += round($tree[$i]->score, 2);
}
-;
- if ($isRenderable) {
$score = round(($sum/$totalWeight), 2);
- }
- else {
- $score = null;
- }
return $score;
}
- [Qsos-commits] qsos/apps/phpviewer QSOSDocument.php,
Raphaël Semeteys <=