]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/wikilens/RatingsDb.php
+ Add getTheRatingsDb() singleton.
[SourceForge/phpwiki.git] / lib / wikilens / RatingsDb.php
1 <?php // -*-php-*-
2 rcs_id('$Id: RatingsDb.php,v 1.3 2004-06-30 20:05:36 dfrankow Exp $');
3
4 /*
5  * @author:  Dan Frankowski (wikilens author), Reini Urban (as plugin)
6  *
7  * TODO: 
8  * - fix RATING_STORAGE = WIKIPAGE
9  * - fix smart caching
10  * - finish mysuggest.c (external engine with data from mysql)
11  * - add php_prediction
12  * - add the various show modes (esp. TopN queries in PHP)
13  */
14 /*
15  CREATE TABLE rating (
16         dimension INT(4) NOT NULL,
17         raterpage INT(11) NOT NULL,
18         rateepage INT(11) NOT NULL,
19         ratingvalue FLOAT NOT NULL,
20         rateeversion INT(11) NOT NULL,
21         isPrivate ENUM('yes','no'),
22         tstamp TIMESTAMP(14) NOT NULL,
23         PRIMARY KEY (dimension, raterpage, rateepage)
24  );
25 */
26
27 //define('RATING_STORAGE','WIKIPAGE');   // not fully supported yet
28 define('RATING_STORAGE','SQL');          // only for mysql yet.
29 // leave undefined for internal, slow php engine.
30 //define('RATING_EXTERNAL',PHPWIKI_DIR . 'suggest.exe');
31
32 class RatingsDb extends WikiDB {
33
34        
35     function RatingsDb() {
36         global $request;
37         $this->_dbi = &$request->_dbi;
38         $this->_backend = &$this->_dbi->_backend;
39         if (isa($this->_backend, 'WikiDB_backend_PearDB'))
40             $this->dbtype = "PearDB";
41         else
42             $this->dbtype = "ADODB";
43         $this->iter_class = "WikiDB_backend_".$this->dbtype."_generic_iter";
44         
45         extract($this->_backend->_table_names);
46         if (empty($rating_tbl)) {
47             $rating_tbl = (!empty($GLOBALS['DBParams']['prefix']) 
48                            ? $GLOBALS['DBParams']['prefix'] : '') . 'rating';
49             $request->_dbi->_backend->_table_names['rating_tbl'] = $rating_tbl;
50         }
51     }
52     
53     // this is a singleton.  It ensures there is only 1 ratingsDB.
54     function &getTheRatingsDb(){
55         static $_theRatingsDb;
56         
57         if (!isset($_theRatingsDb)){
58             $_theRatingsDb = new RatingsDb();
59         } 
60         //echo "rating db is $_theRatingsDb";
61         return $_theRatingsDb;
62     }
63    
64
65 /// *************************************************************************************
66 // FIXME    
67 // from Reini Urban's RateIt plugin
68     function addRating($rating, $userid, $pagename, $dimension) {
69         if (RATING_STORAGE == 'SQL') {
70             $page = $this->_dbi->getPage($pagename);
71             $current = $page->getCurrentRevision();
72             $rateeversion = $current->getVersion();
73             $this->sql_rate($userid, $pagename, $rateeversion, $dimension, $rating);
74         } else {
75             $this->metadata_set_rating($userid, $pagename, $dimension, $rating);
76         }
77     }
78
79     function deleteRating($userid=null, $pagename=null, $dimension=null) {
80         if (is_null($dimension)) $dimension = $this->dimension;
81         if (is_null($userid))    $userid = $this->userid; 
82         if (is_null($pagename))  $pagename = $this->pagename;
83         if (RATING_STORAGE == 'SQL') {
84             $this->sql_delete_rating($userid, $pagename, $dimension);
85         } else {
86             $this->metadata_set_rating($userid, $pagename, $dimension, -1);
87         }
88     }
89     
90     function getRating($userid=null, $pagename=null, $dimension=null) {
91         if (RATING_STORAGE == 'SQL') {
92             $ratings_iter = $this->sql_get_rating($dimension, $userid, $pagename);
93             if ($rating = $ratings_iter->next()) {
94                 return $rating['ratingvalue'];
95             } else 
96                 return false;
97         } else {
98             return $this->metadata_get_rating($userid, $pagename, $dimension);
99         }
100     }
101
102     function getUsersRated($dimension=null, $orderby = null) {
103         if (is_null($dimension)) $dimension = $this->dimension;
104         if (is_null($userid))    $userid = $this->userid; 
105         if (is_null($pagename))  $pagename = $this->pagename;
106         if (RATING_STORAGE == 'SQL') {
107             $ratings_iter = $this->sql_get_users_rated($dimension, $orderby);
108             if ($rating = $ratings_iter->next()) {
109                 return $rating['ratingvalue'];
110             } else 
111                 return false;
112         } else {
113             return $this->metadata_get_users_rated($dimension, $orderby);
114         }
115     }
116    
117     
118     /**
119      * Get ratings.
120      *
121      * @param dimension  The rating dimension id.
122      *                   Example: 0
123      *                   [optional]
124      *                   If this is null (or left off), the search for ratings
125      *                   is not restricted by dimension.
126      *
127      * @param rater  The page id of the rater, i.e. page doing the rating.
128      *               This is a Wiki page id, often of a user page.
129      *               Example: "DanFr"
130      *               [optional]
131      *               If this is null (or left off), the search for ratings
132      *               is not restricted by rater.
133      *               TODO: Support an array
134      *
135      * @param ratee  The page id of the ratee, i.e. page being rated.
136      *               Example: "DudeWheresMyCar"
137      *               [optional]
138      *               If this is null (or left off), the search for ratings
139      *               is not restricted by ratee.
140      *
141      * @param orderby An order-by clause with fields and (optionally) ASC
142      *                or DESC.
143      *               Example: "ratingvalue DESC"
144      *               [optional]
145      *               If this is null (or left off), the search for ratings
146      *               has no guaranteed order
147      *
148      * @param pageinfo The type of page that has its info returned (i.e.,
149      *               'pagename', 'hits', and 'pagedata') in the rows.
150      *               Example: "rater"
151      *               [optional]
152      *               If this is null (or left off), the info returned
153      *               is for the 'ratee' page (i.e., thing being rated).
154      *
155      * @return DB iterator with results 
156      */
157     function get_rating($dimension=null, $rater=null, $ratee=null,
158                         $orderby = null, $pageinfo = "ratee") {
159         if (RATING_STORAGE == 'SQL') {
160             $ratings_iter = $this->sql_get_rating($dimension, $rater, $pagename);
161             if ($rating = $ratings_iter->next()) {
162                 return $rating['ratingvalue'];
163             } else 
164                 return false;
165                // return $ratings_iter;
166         } else {
167             return $this->metadata_get_rating($rater, $pagename, $dimension);
168         }
169         /*
170         return $this->_backend->get_rating($dimension, $rater, $ratee,
171                                            $orderby, $pageinfo);
172         */
173     }
174     
175     function get_users_rated($dimension=null, $orderby = null) {
176         if (RATING_STORAGE == 'SQL') {
177             $ratings_iter = $this->sql_get_users_rated($dimension, $orderby);
178             if ($rating = $ratings_iter->next()) {
179                return $rating['ratingvalue'];
180             } else 
181                 return false;
182         } else {
183             return $this->metadata_get_users_rated($dimension, $orderby);
184         }
185         /*
186         return $this->_backend->get_users_rated($dimension, $orderby);
187         */
188     }
189
190     /**
191      * Like get_rating(), but return a WikiDB_PageIterator
192      * FIXME!
193      */
194     function get_rating_page($dimension=null, $rater=null, $ratee=null,
195                         $orderby = null, $pageinfo = "ratee") {
196         $result = $this->_backend->get_rating_page($dimension, $rater, $ratee,
197                                                    $orderby, $pageinfo);
198         return new WikiDB_PageIterator($this, $result);
199     }
200
201     /**
202      * Delete a rating.
203      *
204      * @param rater  The page id of the rater, i.e. page doing the rating.
205      *               This is a Wiki page id, often of a user page.
206      * @param ratee  The page id of the ratee, i.e. page being rated.
207      * @param dimension  The rating dimension id.
208      *
209      * @access public
210      *
211      * @return true upon success
212      */
213     function delete_rating($rater, $ratee, $dimension) {
214         if (RATING_STORAGE == 'SQL') {
215             $this->sql_delete_rating($userid, $pagename, $dimension);
216         } else {
217             $this->metadata_set_rating($userid, $pagename, $dimension, -1);
218         }
219         /*
220         return $this->_backend->delete_rating($rater, $ratee, $dimension);
221         */
222     }
223
224     /**
225      * Rate a page.
226      *
227      * @param rater  The page id of the rater, i.e. page doing the rating.
228      *               This is a Wiki page id, often of a user page.
229      * @param ratee  The page id of the ratee, i.e. page being rated.
230      * @param rateeversion  The version of the ratee page.
231      * @param dimension  The rating dimension id.
232      * @param rating The rating value (a float).
233      *
234      * @access public
235      *
236      * @return true upon success
237      */
238     function rate($rater, $ratee, $rateeversion, $dimension, $rating) {
239         if (RATING_STORAGE == 'SQL') {
240             $page = $this->_dbi->getPage($pagename);
241             $current = $page->getCurrentRevision();
242             $rateeversion = $current->getVersion();
243             $this->sql_rate($userid, $pagename, $rateeversion, $dimension, $rating);
244         } else {
245             $this->metadata_set_rating($userid, $pagename, $dimension, $rating);
246         }
247         /*
248         return $this->_backend->rate($rater, $ratee, $rateeversion, $dimension, $rating);
249         */
250     }
251     
252     //function getUsersRated(){}
253     
254 //*******************************************************************************
255     // TODO:
256     // Use wikilens/RatingsUser.php for the php methods.
257     //
258     // Old:
259     // Currently we have to call the "suggest" CGI
260     //   http://www-users.cs.umn.edu/~karypis/suggest/
261     // until we implement a simple recommendation engine.
262     // Note that "suggest" is only free for non-profit organizations.
263     // I am currently writing a binary CGI using suggest, which loads 
264     // data from mysql.
265     function getPrediction($userid=null, $pagename=null, $dimension=null) {
266         if (is_null($dimension)) $dimension = $this->dimension;
267         if (is_null($userid))    $userid   = $this->userid; 
268         if (is_null($pagename))  $pagename = $this->pagename;
269         $dbi = &$this->_dbi->_backend;
270         if (isset($pagename))
271             $page = $dbi->_get_pageid($pagename);
272         else return 0;
273         if (isset($userid))
274             $user = $dbi->_get_pageid($userid);
275         else return 0;
276         
277         return 0;
278         
279         if (defined('RATING_EXTERNAL') and RATING_EXTERNAL) {
280             // how call suggest.exe? as CGI or natively
281             //$rating = HTML::Raw("<!--#include virtual=".RATING_ENGINE." -->");
282             $args = "-u$user -p$page -malpha"; // --top 10
283             if (isset($dimension))
284                 $args .= " -d$dimension";
285             $rating = passthru(RATING_EXTERNAL . " $args");
286         } else {
287             $rating = $this->php_prediction($userid, $pagename, $dimension);
288         }
289         return $rating;
290     }
291
292     /**
293      * TODO: slow item-based recommendation engine, similar to suggest RType=2.
294      *       Only the SUGGEST_EstimateAlpha part
295      * Take wikilens/RatingsUser.php for the php methods.
296      */
297     function php_prediction($userid=null, $pagename=null, $dimension=null) {
298         if (is_null($dimension)) $dimension = $this->dimension;
299         if (is_null($userid))    $userid   = $this->userid; 
300         if (is_null($pagename))  $pagename = $this->pagename;
301         if (RATING_STORAGE == 'SQL') {
302             $rating = 0;
303         } else {
304             $rating = 0;
305         }
306         return $rating;
307     }
308     
309     function getNumUsers($pagename=null, $dimension=null) {
310         if (is_null($dimension)) $dimension = $this->dimension;
311         if (is_null($pagename))  $pagename = $this->pagename;
312         if (RATING_STORAGE == 'SQL') {
313             $ratings_iter = $this->sql_get_rating($dimension, null, $pagename,
314                                                   null, "ratee");
315             return $ratings_iter->count();
316         } else {
317             $page = $this->_dbi->getPage($pagename);
318             $data = $page->get('rating');
319             if (!empty($data[$dimension]))
320                 return count($data[$dimension]);
321             else 
322                 return 0;
323         }
324     }
325     // TODO: metadata method
326     function getAvg($pagename=null, $dimension=null) {
327         if (is_null($dimension)) $dimension = $this->dimension;
328         if (is_null($pagename))  $pagename = $this->pagename;
329         if (RATING_STORAGE == 'SQL') {
330             $dbi = &$this->_dbi->_backend;
331             $where = "WHERE 1";
332             if (isset($pagename)) {
333                 $raterid = $dbi->_get_pageid($pagename, true);
334                 $where .= " AND raterpage=$raterid";
335             }
336             if (isset($dimension)) {
337                 $where .= " AND dimension=$dimension";
338             }
339             //$dbh = &$this->_dbi;
340             extract($dbi->_table_names);
341             $query = "SELECT AVG(ratingvalue) as avg"
342                    . " FROM $rating_tbl r, $page_tbl p "
343                    . $where. " GROUP BY raterpage";
344             $result = $dbi->_dbh->query($query);
345             $iter = new $this->iter_class($this,$result);
346             $row = $iter->next();
347             return $row['avg'];
348         } else {
349             return 2.5;
350         }
351     }
352 //*******************************************************************************
353
354     /**
355      * Get ratings.
356      *
357      * @param dimension  The rating dimension id.
358      *                   Example: 0
359      *                   [optional]
360      *                   If this is null (or left off), the search for ratings
361      *                   is not restricted by dimension.
362      *
363      * @param rater  The page id of the rater, i.e. page doing the rating.
364      *               This is a Wiki page id, often of a user page.
365      *               Example: "DanFr"
366      *               [optional]
367      *               If this is null (or left off), the search for ratings
368      *               is not restricted by rater.
369      *               TODO: Support an array
370      *
371      * @param ratee  The page id of the ratee, i.e. page being rated.
372      *               Example: "DudeWheresMyCar"
373      *               [optional]
374      *               If this is null (or left off), the search for ratings
375      *               is not restricted by ratee.
376      *               TODO: Support an array
377      *
378      * @param orderby An order-by clause with fields and (optionally) ASC
379      *                or DESC.
380      *               Example: "ratingvalue DESC"
381      *               [optional]
382      *               If this is null (or left off), the search for ratings
383      *               has no guaranteed order
384      *
385      * @param pageinfo The type of page that has its info returned (i.e.,
386      *               'pagename', 'hits', and 'pagedata') in the rows.
387      *               Example: "rater"
388      *               [optional]
389      *               If this is null (or left off), the info returned
390      *               is for the 'ratee' page (i.e., thing being rated).
391      *
392      * @return DB iterator with results 
393      */
394     function sql_get_rating($dimension=null, $rater=null, $ratee=null,
395                             $orderby=null, $pageinfo = "ratee") {
396         if (empty($dimension)) $dimension=null;
397         $result = $this->_sql_get_rating_result($dimension, $rater, $ratee, $orderby, $pageinfo);
398         return new $this->iter_class($this, $result);
399     }
400
401     function sql_get_users_rated($dimension=null, $orderby=null) {
402         if (empty($dimension)) $dimension=null;
403         $result = $this->_sql_get_rating_result($dimension, null, null, $orderby, "rater");
404         return new $this->iter_class($this, $result);
405     }
406
407     /**
408      * @access private
409      * @return result ressource, suitable to the iterator
410      */
411     function _sql_get_rating_result($dimension=null, $rater=null, $ratee=null,
412                                     $orderby=null, $pageinfo = "ratee") {
413         // pageinfo must be 'rater' or 'ratee'
414         if (($pageinfo != "ratee") && ($pageinfo != "rater"))
415             return;
416         $dbi = &$this->_dbi->_backend;
417         //$dbh = &$this->_dbi;
418         extract($dbi->_table_names);
419         $where = "WHERE r." . $pageinfo . "page = p.id";
420         if (isset($dimension)) {
421             $where .= " AND dimension=$dimension";
422         }
423         if (isset($rater)) {
424             $raterid = $dbi->_get_pageid($rater, true);
425             $where .= " AND raterpage=$raterid";
426         }
427         if (isset($ratee)) {
428             $rateeid = $dbi->_get_pageid($ratee, true);
429             $where .= " AND rateepage=$rateeid";
430         }
431         $orderbyStr = "";
432         if (isset($orderby)) {
433             $orderbyStr = " ORDER BY " . $orderby;
434         }
435         if (isset($rater) or isset($ratee)) $what = '*';
436         // same as _get_users_rated_result()
437         else $what = 'DISTINCT p.pagename, r.ratingvalue, r.dimension';
438
439         $query = "SELECT $what"
440                . " FROM $rating_tbl r, $page_tbl p "
441                . $where
442                . $orderbyStr;
443         $result = $dbi->_dbh->query($query);
444         return $result;
445     }
446
447     /**
448      * Delete a rating.
449      *
450      * @param rater  The page id of the rater, i.e. page doing the rating.
451      *               This is a Wiki page id, often of a user page.
452      * @param ratee  The page id of the ratee, i.e. page being rated.
453      * @param dimension  The rating dimension id.
454      *
455      * @access public
456      *
457      * @return true upon success
458      */
459     function sql_delete_rating($rater, $ratee, $dimension) {
460         //$dbh = &$this->_dbi;
461         $dbi = &$this->_dbi->_backend;
462         extract($dbi->_table_names);
463
464         $dbi->lock();
465         $raterid = $dbi->_get_pageid($rater, true);
466         $rateeid = $dbi->_get_pageid($ratee, true);
467         $where = "WHERE raterpage=$raterid and rateepage=$rateeid";
468         if (isset($dimension)) {
469             $where .= " AND dimension=$dimension";
470         }
471         $dbi->_dbh->query("DELETE FROM $rating_tbl $where");
472         $dbi->unlock();
473         return true;
474     }
475
476     /**
477      * Rate a page.
478      *
479      * @param rater  The page id of the rater, i.e. page doing the rating.
480      *               This is a Wiki page id, often of a user page.
481      * @param ratee  The page id of the ratee, i.e. page being rated.
482      * @param rateeversion  The version of the ratee page.
483      * @param dimension  The rating dimension id.
484      * @param rating The rating value (a float).
485      *
486      * @access public
487      *
488      * @return true upon success
489      */
490     //               ($this->userid, $this->pagename, $this->dimension, $rating);
491     function sql_rate($rater, $ratee, $rateeversion, $dimension, $rating) {
492         $dbi = &$this->_dbi->_backend;
493         extract($dbi->_table_names);
494         if (empty($rating_tbl))
495             $rating_tbl = $this->_dbi->getParam('prefix') . 'rating';
496
497         //$dbi->lock();
498         $raterid = $dbi->_get_pageid($rater, true);
499         $rateeid = $dbi->_get_pageid($ratee, true);
500         assert($raterid);
501         assert($rateeid);
502         //we changed back to delete and insert because update didn't work if it was a new rating
503         
504         $dbi->_dbh->query("DELETE from $rating_tbl WHERE dimension=$dimension AND raterpage=$raterid AND rateepage=$rateeid");
505         $where = "WHERE raterpage='$raterid' AND rateepage='$rateeid'";
506
507         $insert = "INSERT INTO $rating_tbl (dimension, raterpage, rateepage, ratingvalue, rateeversion) VALUES ('$dimension', $raterid, $rateeid, '$rating', '$rateeversion')";
508         $dbi->_dbh->query($insert);
509         
510         //$dbi->unlock();
511         return true;
512     }
513
514     function metadata_get_rating($userid, $pagename, $dimension) {
515         $page = $this->_dbi->getPage($pagename);
516         $data = $page->get('rating');
517         if (!empty($data[$dimension][$userid]))
518             return (float)$data[$dimension][$userid];
519         else 
520             return false;
521     }
522
523     function metadata_set_rating($userid, $pagename, $dimension, $rating = -1) {
524         $page = $this->_dbi->getPage($pagename);
525         $data = $page->get('rating');
526         if ($rating == -1)
527             unset($data[$dimension][$userid]);
528         else {
529             if (empty($data[$dimension][$userid]))
530                 $data[$dimension] = array($userid => (float)$rating);
531             else
532                 $data[$dimension][$userid] = $rating;
533         }
534         $page->set('rating',$data);
535     }
536    
537 }
538
539 /*
540 class RatingsDB_backend_PearDB 
541 extends WikiDB_backend_PearDB {
542     function get_rating($dimension=null, $rater=null, $ratee=null,
543                         $orderby=null, $pageinfo = "ratee") {
544         $result = $this->_get_rating_result(
545                          $dimension, $rater, $ratee, $orderby, $pageinfo);
546         return new WikiDB_backend_PearDB_generic_iter($this, $result);
547     }
548     
549     function get_users_rated($dimension=null, $orderby=null) {
550         $result = $this->_get_users_rated_result(
551                          $dimension, $orderby);
552         return new WikiDB_backend_PearDB_generic_iter($this, $result);
553     }
554
555     function get_rating_page($dimension=null, $rater=null, $ratee=null,
556                              $orderby=null, $pageinfo = "ratee") {
557         $result = $this->_get_rating_result(
558                          $dimension, $rater, $ratee, $orderby, $pageinfo);
559         return new WikiDB_backend_PearDB_iter($this, $result);
560     }
561
562     function _get_rating_result($dimension=null, $rater=null, $ratee=null,
563                                 $orderby=null, $pageinfo = "ratee") {
564         // pageinfo must be 'rater' or 'ratee'
565         if (($pageinfo != "ratee") && ($pageinfo != "rater"))
566             return;
567
568         $dbh = &$this->_dbh;
569         extract($this->_table_names);
570
571         $where = "WHERE r." . $pageinfo . "page = p.id";
572         if (isset($dimension)) {
573             $where .= " AND dimension=$dimension";
574         }
575         if (isset($rater)) {
576             $raterid = $this->_get_pageid($rater, true);
577             $where .= " AND raterpage=$raterid";
578         }
579         if (isset($ratee)) {
580                 if(is_array($ratee)){
581                         $where .= " AND (";
582                         for($i = 0; $i < count($ratee); $i++){
583                                 $rateeid = $this->_get_pageid($ratee[$i], true);
584                         $where .= "rateepage=$rateeid";
585                                 if($i != (count($ratee) - 1)){
586                                         $where .= " OR ";
587                                 }
588                         }
589                         $where .= ")";
590                 } else {
591                         $rateeid = $this->_get_pageid($ratee, true);
592                 $where .= " AND rateepage=$rateeid";
593                 }
594         }
595
596         $orderbyStr = "";
597         if (isset($orderby)) {
598             $orderbyStr = " ORDER BY " . $orderby;
599         }
600
601         $query = "SELECT *"
602             . " FROM $rating_tbl r, $page_tbl p "
603             . $where
604             . $orderbyStr;
605
606         $result = $dbh->query($query);
607
608         return $result;
609     }
610     
611     function _get_users_rated_result($dimension=null, $orderby=null) {
612         $dbh = &$this->_dbh;
613         extract($this->_table_names);
614
615         $where = "WHERE p.id=r.raterpage";
616         if (isset($dimension)) {
617             $where .= " AND dimension=$dimension";
618         }
619         $orderbyStr = "";
620         if (isset($orderby)) {
621             $orderbyStr = " ORDER BY " . $orderby;
622         }
623
624         $query = "SELECT DISTINCT p.pagename"
625             . " FROM $rating_tbl r, $page_tbl p "
626             . $where
627             . $orderbyStr;
628
629         $result = $dbh->query($query);
630
631         return $result;
632     }
633     function delete_rating($rater, $ratee, $dimension) {
634         $dbh = &$this->_dbh;
635         extract($this->_table_names);
636
637         $this->lock();
638         $raterid = $this->_get_pageid($rater, true);
639         $rateeid = $this->_get_pageid($ratee, true);
640
641         $dbh->query("DELETE FROM $rating_tbl WHERE raterpage=$raterid and rateepage=$rateeid and dimension=$dimension");
642         $this->unlock();
643         return true;
644     }
645
646     function rate($rater, $ratee, $rateeversion, $dimension, $rating, $isPrivate = 'no') {
647         $dbh = &$this->_dbh;
648         extract($this->_table_names);
649
650         $this->lock();
651         $raterid = $this->_get_pageid($rater, true);
652         $rateeid = $this->_get_pageid($ratee, true);
653
654         $dbh->query("DELETE FROM $rating_tbl WHERE raterpage=$raterid and rateepage=$rateeid and dimension=$dimension and isPrivate='$isPrivate'");
655         // NOTE: Leave tstamp off the insert, and MySQL automatically updates it
656         $dbh->query("INSERT INTO $rating_tbl (dimension, raterpage, rateepage, ratingvalue, rateeversion, isPrivate) VALUES ($dimension, $raterid, $rateeid, $rating, $rateeversion, '$isPrivate')");
657         $this->unlock();
658         return true;
659     }
660
661 */
662
663 // $Log: not supported by cvs2svn $
664 // Revision 1.2  2004/06/19 10:22:41  rurban
665 // outcomment the pear specific methods to let all pages load
666 //
667 // Revision 1.1  2004/06/18 14:42:17  rurban
668 // added wikilens libs (not yet merged good enough, some work for DanFr)
669 // 
670
671 // Local Variables:
672 // mode: php
673 // tab-width: 8
674 // c-basic-offset: 4
675 // c-hanging-comment-ender-p: nil
676 // indent-tabs-mode: nil
677 // End:
678 ?>