MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trail...
authorPetr Skoda <skodak@moodle.org>
Sun, 1 Nov 2009 12:22:45 +0000 (12:22 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 1 Nov 2009 12:22:45 +0000 (12:22 +0000)
39 files changed:
message/discussion.php
message/edit.php
message/history.php
message/index.php
message/lib.php
message/messages.php
message/output/email/db/upgrade.php
message/output/email/lib.php
message/output/email/message_output_email.php
message/output/email/version.php
message/output/jabber/db/upgrade.php
message/output/jabber/lib.php
message/output/jabber/message_output_jabber.php
message/output/jabber/version.php
message/output/lib.php
message/output/popup/db/upgrade.php
message/output/popup/lib.php
message/output/popup/message_output_popup.php
message/output/popup/version.php
message/refresh.php
message/search.html
message/user.php
mnet/environment.php
mnet/lib.php
mnet/peer.php
mnet/publickey.php
mnet/remote_client.php
mnet/rpclib.php
mnet/testclient.php
mnet/xmlrpc/client.php
mnet/xmlrpc/server.php
mnet/xmlrpc/xmlparser.php
my/index.php
notes/delete.php
notes/edit.php
notes/edit_form.php
notes/index.php
notes/lib.php
notes/version.php

index 17be442..9f83377 100644 (file)
@@ -84,7 +84,7 @@
               scrolling="yes" marginwidth="10" marginheight="10" frameborder="0" />
        <frame src="refresh.php?id=<?php p($user->id)?>&amp;name=<?php echo urlencode(fullname($user)) ?>"  name="refresh"
               scrolling="no"  marginwidth="0" marginheight="0" frameborder="0" />
-       
+
        <frame src="send.php?id=<?php p($user->id)?>"     name="send"
               scrolling="no"  marginwidth="2" marginheight="2" frameborder="0" />
      </frameset>
     $options = new object();
     $options->para = false;
     $options->newlines = true;
-    
+
     $params = array('uid1'=>$USER->id ,'userid1'=>$userid, 'start1'=>$start, 'uid2'=>$USER->id ,'userid2'=>$userid, 'start2'=>$start);
     if ($newonly) {
         $lastsql1 = " AND timecreated > :last1";
     if ($messages = $DB->get_records_select('message_read', "(useridto = :uid1 AND useridfrom = :userid1 AND timeread > :start1 $lastsql1) OR (useridto = :userid2 AND useridfrom = :uid2 AND timeread > :start2 $lastsql2)", $params)) {
         foreach ($messages as $message) {
             $time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
-            
+
             if ($message->useridfrom == $USER->id) {
                 $fullname = $mefullname;
             } else {
     if ($messages = $DB->get_records_select('message', "useridto = :userid1 AND useridfrom = :uid1 $lastsql1", $params)) {
         foreach ($messages as $message) {
             $time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
-            
+
             if ($message->fullmessageformat == FORMAT_HTML){
                 $printmessage = format_text($message->fullmessagehtml, $message->fullmessageformat, $options, 0);
             } else{
         }
     }
     /*Get still to be read message, use message/lib.php funtion*/
-    $messages = message_get_popup_messages($USER->id, $userid); 
+    $messages = message_get_popup_messages($USER->id, $userid);
     if ($messages) {
         foreach ($messages as $message) {
             $time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
-            
+
             if ($message->fullmessageformat == FORMAT_HTML){
                 $printmessage = format_text($message->fullmessagehtml, $message->fullmessageformat, $options, 0);
             } else{
                 $sortkey = $message->timecreated."$i";
             }
             $allmessages[$sortkey] = $printmessage;
-            
+
             if ($message->timecreated < $start) {
                 $start = $message->timecreated; // move start back so that we see all current history
             }
index b82f248..d3cc1ac 100644 (file)
@@ -45,7 +45,7 @@ if (!$course = $DB->get_record('course', array('id' => $course))) {
 if ($course->id != SITEID) {
     require_login($course);
 
-} else { 
+} else {
     if (!isloggedin()) {
         if (empty($SESSION->wantsurl)) {
             $SESSION->wantsurl = $CFG->httpswwwroot.'/message/edit.php';
@@ -132,7 +132,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
     redirect("$CFG->wwwroot/message/edit.php?id=$user->id&course=$course->id");
 }
 
-/// Load preferences 
+/// Load preferences
 $preferences = new object();
 
 /// Get providers preferences
@@ -153,7 +153,7 @@ foreach ( $providers as $providerid => $provider){
 
 /// For every processors put its options on the form (need to get function from processor's lib.php)
 $processors = $DB->get_records('message_processors');
-foreach ( $processors as $processorid => $processor){    
+foreach ( $processors as $processorid => $processor){
     $processorfile = $CFG->dirroot. '/message/output/'.$processor->name.'/message_output_'.$processor->name.'.php';
     if ( is_readable($processorfile) ) {
         include_once( $processorfile );
@@ -172,7 +172,7 @@ $streditmymessage = get_string('editmymessage', 'message');
 $strparticipants  = get_string('participants');
 $userfullname     = fullname($user, true);
 
-if (has_capability('moodle/course:viewparticipants', $coursecontext) || 
+if (has_capability('moodle/course:viewparticipants', $coursecontext) ||
     has_capability('moodle/site:viewparticipants', $systemcontext)) {
     $PAGE->navbar->add($strparticipants, new moodle_url($CFG->wwwroot.'/message/index.php', array('id'=>$course->id)));
 }
@@ -267,4 +267,3 @@ echo "</form>";
 
 echo $OUTPUT->footer();
 
-?>
\ No newline at end of file
index cd3f7ca..5e13508 100644 (file)
@@ -22,7 +22,7 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  * @package message
  */
-      
+
 require('../config.php');
 require('lib.php');
 
@@ -131,4 +131,3 @@ if ($messages = message_get_history($user1, $user2)) {
 
 echo $OUTPUT->footer();
 
-?>
\ No newline at end of file
index 66fe2de..df82171 100644 (file)
@@ -102,21 +102,21 @@ if ($tab == 'contacts') {
 $PAGE->set_generaltype('popup');
 $PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fullname));
 echo $OUTPUT->header();
-echo '<table cellspacing="2" cellpadding="2" border="0" width="95%" class="boxaligncenter">';  
+echo '<table cellspacing="2" cellpadding="2" border="0" width="95%" class="boxaligncenter">';
 echo '<tr>';
 
 /// Print out the tabs
 echo '<td>';
 $tabrow = array();
-$tabrow[] = new tabobject('contacts', $CFG->wwwroot.'/message/index.php?tab=contacts', 
+$tabrow[] = new tabobject('contacts', $CFG->wwwroot.'/message/index.php?tab=contacts',
                            get_string('contacts', 'message'));
-$tabrow[] = new tabobject('search', $CFG->wwwroot.'/message/index.php?tab=search', 
+$tabrow[] = new tabobject('search', $CFG->wwwroot.'/message/index.php?tab=search',
                            get_string('search', 'message'));
-$tabrow[] = new tabobject('settings', $CFG->wwwroot.'/message/index.php?tab=settings', 
+$tabrow[] = new tabobject('settings', $CFG->wwwroot.'/message/index.php?tab=settings',
                            get_string('settings', 'message'));
 $tabrows = array($tabrow);
 
-print_tabs($tabrows, $tab); 
+print_tabs($tabrows, $tab);
 
 echo '</td>';
 
@@ -135,4 +135,3 @@ if (function_exists($tabprintfunction)) {
 echo '</td> </tr> </table>';
 echo $OUTPUT->footer();
 
-?>
\ No newline at end of file
index a0b243d..29a04c3 100644 (file)
@@ -59,14 +59,14 @@ function message_print_contacts() {
     $strangers       = array();
 
 
-    // get all in our contactlist who are not blocked in our contact list 
+    // get all in our contactlist who are not blocked in our contact list
     // and count messages we have waiting from each of them
-    $contactsql = "SELECT u.id, u.firstname, u.lastname, u.picture, 
+    $contactsql = "SELECT u.id, u.firstname, u.lastname, u.picture,
                           u.imagealt, u.lastaccess, count(m.id) as messagecount
                      FROM {message_contacts} mc
                      JOIN {user} u ON u.id = mc.contactid
                      LEFT OUTER JOIN {message} m ON m.useridfrom = mc.contactid AND m.useridto = ?
-                    WHERE mc.userid = ? AND mc.blocked = 0 
+                    WHERE mc.userid = ? AND mc.blocked = 0
                  GROUP BY u.id, u.firstname, u.lastname, u.picture,
                           u.imagealt, u.lastaccess
                  ORDER BY u.firstname ASC";
@@ -88,12 +88,12 @@ function message_print_contacts() {
 
     // get messages from anyone who isn't in our contact list and count the number
     // of messages we have from each of them
-    $strangersql = "SELECT u.id, u.firstname, u.lastname, u.picture, 
+    $strangersql = "SELECT u.id, u.firstname, u.lastname, u.picture,
                            u.imagealt, u.lastaccess, count(m.id) as messagecount
                       FROM {message} m
                       JOIN {user} u  ON u.id = m.useridfrom
                       LEFT OUTER JOIN {message_contacts} mc ON mc.contactid = m.useridfrom AND mc.userid = m.useridto
-                     WHERE mc.id IS NULL AND m.useridto = ? 
+                     WHERE mc.id IS NULL AND m.useridto = ?
                   GROUP BY u.id, u.firstname, u.lastname, u.picture,
                            u.imagealt, u.lastaccess
                   ORDER BY u.firstname ASC";
@@ -532,7 +532,7 @@ function message_print_user ($user=false, $iscontact=false, $isblocked=false) {
     $userpic = moodle_user_picture::make($USER, SITEID);
     $userpic->size = 20;
     $userpic->link = true;
-    
+
     if ($user === false) {
         echo $OUTPUT->user_picture($userpic);
     } else {
@@ -584,7 +584,7 @@ function message_contact_link($userid, $linktype='add', $return=false, $script="
 
     $command = $linktype.'contact';
     $string  = $str->{$command};
-    $alttext = $text ? '' : $string; 
+    $alttext = $text ? '' : $string;
     $text = $text ? '&nbsp;'.$string : '';
 
     switch ($linktype) {
@@ -712,7 +712,7 @@ function message_search_users($courseid, $searchtext, $sort='', $exceptions='')
         return $DB->get_records_sql("SELECT $fields
                                        FROM {user} u
                                        LEFT JOIN {message_contacts} mc
-                                            ON mc.contactid = u.id AND mc.userid = ? 
+                                            ON mc.contactid = u.id AND mc.userid = ?
                                       WHERE $select
                                             AND ($fullname $LIKE ?)
                                             $except
@@ -728,7 +728,7 @@ function message_search_users($courseid, $searchtext, $sort='', $exceptions='')
                                          FROM {user} u
                                          JOIN {role_assignments} ra ON ra.userid = u.id
                                          LEFT JOIN {message_contacts} mc
-                                              ON mc.contactid = u.id AND mc.userid = ? 
+                                              ON mc.contactid = u.id AND mc.userid = ?
                                         WHERE $select
                                               AND ra.contextid $contextlists
                                               AND ($fullname $LIKE ?)
@@ -1011,7 +1011,7 @@ function message_format_message(&$message, &$user, $format='', $keywords='', $cl
  */
 function message_post_message($userfrom, $userto, $message, $format, $messagetype) {
     global $CFG, $SITE, $USER, $DB;
-    
+
     $eventdata = new object();
     $eventdata->component        = 'message';
     $eventdata->name             = 'instantmessage';
@@ -1045,7 +1045,7 @@ function message_get_participants() {
 }
 
 /**
- * Print a row of contactlist displaying user picture, messages waiting and 
+ * Print a row of contactlist displaying user picture, messages waiting and
  * block links etc
  * @param $contact contact object containing all fields required for $OUTPUT->user_picture()
  * @param $incontactlist is the user a contact of ours?
@@ -1078,7 +1078,7 @@ function message_print_contactlist_user($contact, $incontactlist = true){
     echo $OUTPUT->user_picture($userpic);
     echo '</td>';
     echo '<td class="contact">';
-    
+
     $popupoptions = array(
             'height' => 500,
             'width' => 500,
@@ -1126,7 +1126,7 @@ function message_move_userfrom_unread2read($userid) {
 
 function message_get_popup_messages($destuserid, $fromuserid=NULL){
     global $DB;
-    
+
     $processor = $DB->get_record('message_processors', array('name' => 'popup'));
 
     $messagesproc = $DB->get_records('message_working', array('processorid'=>$processor->id), 'id ASC');
@@ -1144,7 +1144,7 @@ function message_get_popup_messages($destuserid, $fromuserid=NULL){
             $message->timeread = time();
             $messageid = $message->id;
             unset($message->id);
-        
+
             //delete what we've processed and check if can move message
             $DB->delete_records('message_working', array('id' => $msgp->id));
             if ( $DB->count_records('message_working', array('unreadmessageid'=>$messageid)) == 0){
index 5c9be78..3731365 100644 (file)
@@ -31,5 +31,4 @@ $PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fu
 echo $OUTPUT->header();
 echo "<div id='messages'></div>";
 echo $OUTPUT->footer();
-    
-?>
\ No newline at end of file
+
index 4b27cdc..b6f1d3a 100644 (file)
@@ -27,9 +27,8 @@
  * Upgrade code for email message processor
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 function xmldb_message_email_upgrade($oldversion) {
@@ -52,4 +51,4 @@ function xmldb_message_email_upgrade($oldversion) {
     return $result;
 }
 
-?>
+
index f5ae20f..16cb259 100644 (file)
@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
@@ -27,9 +27,8 @@
  * Email message processor - lib file
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 /**
index e3a8bc6..28f597d 100644 (file)
@@ -27,9 +27,8 @@
  * Email message processor - send a given message by email
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 require_once($CFG->dirroot.'/message/output/lib.php');
 
@@ -57,7 +56,7 @@ class message_output_email extends message_output {
             $message->fullmessagehtml)
         ){
             /// Move the entry to the other table
-            $message->timeread = time();            
+            $message->timeread = time();
             $messageid = $message->id;
             unset($message->id);
 
@@ -78,11 +77,11 @@ class message_output_email extends message_output {
         return true;
     }
 
-    /** 
+    /**
      * Creates necessary fields in the messaging config form.
      * @param object $mform preferences form class
      */
-    function config_form($preferences){ 
+    function config_form($preferences){
         global $USER;
         $string = get_string('email').': <input size="30" name="email_email" value="'.$preferences->email_email.'" />';
         if (empty($preferences->email_email)) {
@@ -94,15 +93,15 @@ class message_output_email extends message_output {
     /**
      * Parses the form submited data and saves it into preferences array.
      * @param object $mform preferences form class
-     * @param array $preferences preferences array 
+     * @param array $preferences preferences array
      */
     function process_form($form, &$preferences){
         $preferences['message_processor_email_email'] = $form->email_email;
     }
 
     /**
-     * Loads the config data from database to put on the form (initial load) 
-     * @param array $preferences preferences array 
+     * Loads the config data from database to put on the form (initial load)
+     * @param array $preferences preferences array
      * @param int $userid the user id
      */
     function load_data(&$preferences, $userid){
index b598954..a57eab9 100755 (executable)
@@ -27,7 +27,6 @@
  * Email processor version information
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  * @package
  */
@@ -36,4 +35,4 @@
 $plugin->version  = 2008072401;
 $plugin->requires = 2008072401;
 
-?>
+
index 350c204..33e9648 100644 (file)
@@ -27,9 +27,8 @@
  * Upgrade code for jabber message processor
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 function xmldb_message_jabber_upgrade($oldversion) {
@@ -52,4 +51,4 @@ function xmldb_message_jabber_upgrade($oldversion) {
     return $result;
 }
 
-?>
+
index e4be9ce..cbf3f78 100644 (file)
@@ -27,9 +27,8 @@
  * Jabber message processor - lib file
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 /**
index 817f960..37fbb45 100644 (file)
@@ -27,9 +27,8 @@
  * Jabber message processor - send a given message by jabber
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 
@@ -43,7 +42,7 @@ require_once($CFG->dirroot.'/message/output/lib.php');
 require_once($CFG->libdir.'/jabber/XMPP/XMPP.php');
 
 class message_output_jabber extends message_output {
-    
+
     /**
      * Processes the message (sends using jabber).
      * @param object $message the message to be sent
@@ -51,7 +50,7 @@ class message_output_jabber extends message_output {
      */
     function send_message($message){
         global $DB;
-        
+
         if (!$userfrom = $DB->get_record('user', array('id' => $message->useridfrom))) {
             return false;
         }
@@ -74,11 +73,11 @@ class message_output_jabber extends message_output {
         } catch(XMPPHP_Exception $e) {
             return false;
         }
-        
+
         return true;
     }
 
-    /** 
+    /**
      * Creates necessary fields in the messaging config form.
      * @param object $mform preferences form class
      */
@@ -89,15 +88,15 @@ class message_output_jabber extends message_output {
     /**
      * Parses the form submited data and saves it into preferences array.
      * @param object $mform preferences form class
-     * @param array $preferences preferences array 
+     * @param array $preferences preferences array
      */
     function process_form($form, &$preferences){
         $preferences['message_processor_jabber_jabberid'] = $form->jabber_jabberid;
     }
 
     /**
-     * Loads the config data from database to put on the form (initial load) 
-     * @param array $preferences preferences array 
+     * Loads the config data from database to put on the form (initial load)
+     * @param array $preferences preferences array
      * @param int $userid the user id
      */
     function load_data(&$preferences, $userid){
@@ -107,7 +106,7 @@ class message_output_jabber extends message_output {
 }
 
 /*
- * 
+ *
  *         $f = fopen('/tmp/event_jabberx', 'a+');
         fwrite($f, date('l dS \of F Y h:i:s A')."\n");
         fwrite($f, "from: $message->userfromid\n");
@@ -128,4 +127,4 @@ $a = new message_output_jabber();
 
 $a->send_message($savemessage);
 * */
-?>
+
index 9abc461..cf32a6e 100755 (executable)
@@ -27,7 +27,6 @@
  * Jabber processor version information
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  * @package
  */
@@ -35,4 +34,4 @@
 $plugin->version  = 2008090900;
 $plugin->requires = 2008091500;
 
-?>
+
index be8c56c..b485bf2 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
  * Base message output class
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 /**
  * Base message output class
  */
-abstract class message_output {        
+abstract class message_output {
     public abstract function send_message($message);
     public abstract function process_form($form, &$preferences);
     public abstract function load_data(&$preferences, $userid);
@@ -43,4 +42,4 @@ abstract class message_output {
 }
 
 
-?>
+
index efc0334..1895c44 100644 (file)
@@ -27,9 +27,8 @@
  * Upgrade code for popup message processor
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 function xmldb_message_popup_upgrade($oldversion) {
@@ -52,4 +51,4 @@ function xmldb_message_popup_upgrade($oldversion) {
     return $result;
 }
 
-?>
+
index add746c..813968a 100644 (file)
@@ -27,9 +27,8 @@
  * Popup message processor - lib file
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package 
+ * @package
  */
 
 /**
index 6d1b36d..08a0dca 100644 (file)
@@ -28,17 +28,17 @@ require_once($CFG->dirroot.'/message/output/lib.php');
 
 class message_output_popup extends message_output{
 
-    /** 
+    /**
      * Process the popup message.
-     * The popup doesn't send data only saves in the database for later use, 
-     * the popup_interface.php takes the message from the message table into 
+     * The popup doesn't send data only saves in the database for later use,
+     * the popup_interface.php takes the message from the message table into
      * the message_read.
      * @param object $message the message to be sent
      * @return true if ok, false if error
      */
     public function send_message($message) {
         global $DB;
-        
+
         //put the process record into db
         $processor = $DB->get_record('message_processors', array('name'=>'popup'));
         $procmessage = new object();
@@ -50,7 +50,7 @@ class message_output_popup extends message_output{
         //should only save this message for later delivery
         return true;
     }
-    
+
     function config_form($preferences) {
         return '<table>'.
                '<tr><td align="right">'.get_string('showmessagewindow', 'message').':</td><td><input type="checkbox" name="showmessagewindow" '.($preferences->showmessagewindow==1?" checked=\"checked\"":"").' /></td></tr>'.
@@ -59,7 +59,7 @@ class message_output_popup extends message_output{
                '<tr><td align="right">'.get_string('noframesjs', 'message').':</td><td><input type="checkbox" name="noframesjs" '.($preferences->noframesjs==1?" checked=\"checked\"":"").' /></td></tr>'.
                '</table>';
     }
-    
+
     public function process_form($form, &$preferences) {
         $preferences['message_showmessagewindow'] = $form->showmessagewindow?1:0;
         $preferences['message_blocknoncontacts']  = $form->blocknoncontacts?1:0;
index c966588..d12d4bd 100755 (executable)
@@ -27,7 +27,6 @@
  * Popup processor version information
  *
  * @author Luis Rodrigues
- * @version  $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  * @package
  */
@@ -35,4 +34,4 @@
 $plugin->version  = 2008072401;
 $plugin->requires = 2008072401;
 
-?>
+
index 0b1c485..992f457 100644 (file)
@@ -91,4 +91,3 @@ $PAGE->requires->js_function_call('refresh_page', Array(($wait*1000), "refresh.p
 
 echo $OUTPUT->footer();
 
-?>
\ No newline at end of file
index ff6cad9..92c0a63 100644 (file)
@@ -18,7 +18,7 @@
         <td colspan="2">
             <input type="checkbox" name="mycourses" id="mycourses" /><label for="mycourses"><?php print_string('onlymycourses', 'message') ?></label></td>
     </tr>
-    
+
     <tr><td colspan="3"></td></tr>
 
 
         <td><input type="text" name="keywords" id="keywords" size="16" /></td>
         <td><input type="submit" name="keywordssubmit" value="<?php print_string('search') ?>" /></td>
     </tr>
-    
+
     <tr>
         <td>&nbsp;</td>
         <td colspan="2">
             <input type="checkbox" name="includeblocked" id="includeblocked" /><label for="includeblocked"><?php print_string('includeblockedusers', 'message') ?></label></td>
     </tr>
-    
+
     <tr><td>&nbsp;</td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption1" value="tome" /><label for="keywordsoption1"><?php print_string('onlytome', 'message') ?></label></td></tr>
     <tr><td>&nbsp;</td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption2" value="fromme" /><label for="keywordsoption2"><?php print_string('onlyfromme', 'message') ?></label></td></tr>
     <tr><td>&nbsp;</td><td colspan="2"><input type="radio" checked="checked" name="keywordsoption" id="keywordsoption3" value="allmine" /><label for="keywordsoption3"><?php print_string('allmine', 'message') ?></label></td></tr>
-    
+
     <?php if (has_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_SYSTEM))) { ?>
     <tr><td>&nbsp;</td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption4" value="allusers" /><label for="keywordsoption4"><?php print_string('allusers', 'message') ?></label></td></tr>
     <?php } ?>
 
 <?php
-/* Potential abuse problems - temporarily disabled 
+/* Potential abuse problems - temporarily disabled
     echo '<tr><td colspan="3"><input type="radio" name="keywordsoption" alt="'.get_string('allstudents', 'message').'" value="courseusers" />'.get_string('allstudents', 'message').'<br />&nbsp;&nbsp;&nbsp;'.$cs.'; </td></tr>';
 
 */
 
 ?>
-    
+
 </table>
 
 </form>
index f377d28..c6855ae 100644 (file)
@@ -20,7 +20,7 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  * @package message
  */
-      
+
 require('../config.php');
 require('lib.php');
 
@@ -118,4 +118,3 @@ echo '</td></tr></table>';
 
 echo $OUTPUT->footer();
 
-?>
\ No newline at end of file
index 2af14ed..e4f6f6f 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * Info about the local environment, wrt RPC
  *
@@ -97,7 +97,7 @@ class mnet_environment {
                 array_unshift($openssl_history, $this->keypair);
             }
 
-            // 2. How many old keys do we want to keep? Use array_slice to get 
+            // 2. How many old keys do we want to keep? Use array_slice to get
             // rid of any we don't want
             $openssl_generations = $DB->get_field('config_plugins', 'value', array('plugin'=>'mnet', 'name'=>'openssl_generations'));
             if(empty($openssl_generations)) {
@@ -166,5 +166,3 @@ class mnet_environment {
         return $this->keypair['publickey'];
     }
 }
-
-?>
index 194808c..ed38256 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * Library functions for mnet
  *
@@ -105,7 +105,7 @@ function mnet_get_public_key($uri, $application=null) {
     $curlerrno = curl_errno($ch);
     if ($curlerrno!=0) {
         debugging("Request for $uri failed with curl error $curlerrno");
-    } 
+    }
 
     // check HTTP error code
     $info =  curl_getinfo($ch);
@@ -653,5 +653,3 @@ function mnet_get_app_jumppath ($applicationid) {
     }
     return $appjumppaths[$applicationid];
 }
-
-?>
index c624a07..c9089a4 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * An object to represent lots of information about an RPC-peer machine
  *
@@ -240,12 +240,12 @@ class mnet_peer {
         return false;
     }
 
-    /** 
+    /**
      * Load information from db about an mnet peer into this object's properties
-     * 
+     *
      * @param string $wwwroot - address of peer whose details we want to load
      * @return bool - indication of success or failure
-     */ 
+     */
     function set_wwwroot($wwwroot) {
         global $CFG, $DB;
 
@@ -285,7 +285,7 @@ class mnet_peer {
     /**
      * Several methods can be used to get an 'mnet_host' record. They all then
      * send it to this private method to populate this object's attributes.
-     * 
+     *
      * @param   object  $hostinfo   A database record from the mnet_host table
      * @return  void
      */
@@ -312,5 +312,3 @@ class mnet_peer {
         return $this->public_key_ref;
     }
 }
-
-?>
index 725c631..10ddcbe 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * Print this server's public key and exit
  *
@@ -18,4 +18,3 @@ if ($CFG->mnet_dispatcher_mode === 'off') {
 header("Content-type: text/plain");
 $keypair = mnet_get_keypair();
 echo $keypair['certificate'];
-?>
index 1f6e5ac..f0dcec1 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * An object to represent lots of information about an RPC-peer machine
  *
@@ -91,4 +91,3 @@ class mnet_remote_client extends mnet_peer {
         return false;
     }
 }
-?>
index 4156fa3..b56a3a4 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * Some dummy functions to test XML-RPC with
  */
@@ -59,16 +59,16 @@ class testClass {
         $this->first = 'last';
         $this->last  = 'first';
     }
-    
+
     function augment_first($newval) {
         $this->first = $this->first.$newval;
         return $this->first;
     }
-    
+
     function augment_first_RPC_OK() {
         return true;
     }
-    
+
     function mnet_concatenate_strings_RPC_OK() {
         return true;
     }
@@ -76,5 +76,3 @@ class testClass {
         return $string1.$string2.$string3;
     }
 }
-
-?>
index 95c810a..6b8bbf9 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 /**
  * A service browser for remote Moodles
  *
@@ -102,7 +102,7 @@ if (!empty($_GET['hostid']) && array_key_exists($_GET['hostid'], $hosts)) {
         $mnet_request->set_method('system/listMethods');
         $mnet_request->send($mnet_peer);
         $methods = $mnet_request->response;
-    
+
         echo '<hr /><br /><h3>Methods '.$host->wwwroot .'</h3><table><th>Method</th><th colspan="2">Options</th>';
         foreach ($methods as $id => $method) {
             echo '<tr><td>'.$method.'</td><td> <a href="testclient.php?hostid='.$host->id.'&method='.$id.'&show=sig">Inspect</a></td></tr>'."\n";
index 819ce05..874aae2 100644 (file)
@@ -355,4 +355,3 @@ class mnet_xmlrpc_client {
         return $httprequest;
     }
 }
-?>
index 1817d35..0e93cee 100644 (file)
@@ -299,7 +299,7 @@ function mnet_server_fault_xml($code, $text, $privatekey = null) {
  * Translate XML-RPC's strange function call syntax into a more straightforward
  * PHP-friendly alternative. This dummy function will be called by the
  * dispatcher, and can be used to call a method on an object, or just a function
- * 
+ *
  * The methodName argument (eg. mnet/testlib/mnet_concatenate_strings)
  * is ignored.
  *
@@ -312,7 +312,7 @@ function mnet_server_fault_xml($code, $text, $privatekey = null) {
  */
 function mnet_server_dummy_method($methodname, $argsarray, $functionname) {
     global $MNET_REMOTE_CLIENT;
-    
+
     if (is_object($MNET_REMOTE_CLIENT->object_to_call)) {
         return @call_user_method_array($functionname, $MNET_REMOTE_CLIENT->object_to_call, $argsarray);
     } else if (!empty($MNET_REMOTE_CLIENT->static_location)) {
@@ -535,7 +535,7 @@ function mnet_server_dispatch($payload) {
                     // Filename doesn't end in 'php'; possible attack?
                     // Generate error response - unable to locate function
                     exit(mnet_server_fault(7012, 'nosuchfunction'));
-                } 
+                }
 
                 // The call stack holds the path to any include file
                 $includefile = $CFG->dirroot.'/'.$filename;
@@ -588,7 +588,7 @@ function mnet_system($method, $params, $hostinfo) {
                     {mnet_rpc} rpc
                 WHERE
                     s2r.rpcid = rpc.id AND
-                    h2s.serviceid = s2r.serviceid AND 
+                    h2s.serviceid = s2r.serviceid AND
                     h2s.hostid in ('.$id_list .') AND
                     h2s.publish =\'1\'
                 ORDER BY
@@ -610,7 +610,7 @@ function mnet_system($method, $params, $hostinfo) {
                     {mnet_rpc} rpc
                 WHERE
                     s2r.rpcid = rpc.id AND
-                    h2s.serviceid = s2r.serviceid AND 
+                    h2s.serviceid = s2r.serviceid AND
                     h2s.hostid in ('.$id_list .') AND
                     h2s.publish =\'1\' AND
                     svc.id = h2s.serviceid AND
@@ -641,7 +641,7 @@ function mnet_system($method, $params, $hostinfo) {
             WHERE
                 rpc.xmlrpc_path = ? AND
                 s2r.rpcid = rpc.id AND
-                h2s.serviceid = s2r.serviceid AND 
+                h2s.serviceid = s2r.serviceid AND
                 h2s.publish =\'1\' AND
                 h2s.hostid in ('.$id_list .')';
         $params = array($params[0]);
@@ -672,7 +672,7 @@ function mnet_system($method, $params, $hostinfo) {
                 rpc.xmlrpc_path = ? AND
                 s2r.rpcid = rpc.id AND
                 h2s.publish =\'1\' AND
-                h2s.serviceid = s2r.serviceid AND 
+                h2s.serviceid = s2r.serviceid AND
                 h2s.hostid in ('.$id_list .')';
         $params = array($params[0]);
 
@@ -705,20 +705,20 @@ function mnet_system($method, $params, $hostinfo) {
 
         if (is_array($result)) {
             foreach($result as $service) {
-                $services[] = array('name' => $service->name, 
-                                    'apiversion' => $service->apiversion, 
-                                    'publish' => $service->publish, 
+                $services[] = array('name' => $service->name,
+                                    'apiversion' => $service->apiversion,
+                                    'publish' => $service->publish,
                                     'subscribe' => $service->subscribe);
             }
         }
 
         return $services;
-    }  
+    }
     exit(mnet_server_fault(7019, 'nosuchfunction'));
 }
 
 /**
- * Initialize the object (if necessary), execute the method or function, and 
+ * Initialize the object (if necessary), execute the method or function, and
  * return the response
  *
  * @param  string  $includefile    The file that contains the object definition
@@ -785,7 +785,7 @@ function mnet_server_invoke_method($includefile, $methodname, $method, $payload,
  * Accepts a public key from a new remote host and returns the public key for
  * this host. If 'register all hosts' is turned on, it will bootstrap a record
  * for the remote host in the mnet_host table (if it's not already there)
- * 
+ *
  * @param  string  $function      XML-RPC requires this but we don't... discard!
  * @param  array   $params        Array of parameters
  *                                $params[0] is the remote wwwroot
@@ -806,5 +806,3 @@ function mnet_keyswap($function, $params) {
     }
     return $MNET->public_key;
 }
-
-?>
index e62743d..f3ad409 100644 (file)
@@ -308,4 +308,3 @@ class mnet_encxml_parser {
         return true;
     }
 }
-?>
index 64bd4ea..4fea5a2 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
     // this is the 'my moodle' page
 
     if (isset($CFG->mycoursesperpage)) {
         $courses_limit = $CFG->mycoursesperpage;
     }
-    
+
     $morecourses = false;
     if ($courses_limit > 0) {
         $courses_limit = $courses_limit + 1;
     }
-    
+
     $courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, $courses_limit);
     $site = get_site();
     $course = $site; //just in case we need the old global $course hack
 
     echo $OUTPUT->footer();
 
-?>
index 81c438c..040a9aa 100644 (file)
@@ -71,4 +71,3 @@ if (data_submitted() && confirm_sesskey()) {
     note_print($note, NOTES_SHOW_BODY | NOTES_SHOW_HEAD);
     echo $OUTPUT->footer();
 }
-?>
index 505e64c..870afe7 100644 (file)
@@ -99,4 +99,4 @@ echo $OUTPUT->header();
 echo $OUTPUT->heading(fullname($user));
 
 $noteform->display();
-echo $OUTPUT->footer();
\ No newline at end of file
+echo $OUTPUT->footer();
index 7a94d5b..2c9f2b0 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
 require_once($CFG->libdir.'/formslib.php');
 
@@ -31,4 +31,3 @@ class note_edit_form extends moodleform {
         $mform->setType('id', PARAM_INT);
     }
 }
-?>
\ No newline at end of file
index 096e610..75d6cb8 100644 (file)
@@ -139,4 +139,4 @@ if ($courseid != SITEID) {
 
 echo $OUTPUT->box_end();
 
-echo $OUTPUT->footer();
\ No newline at end of file
+echo $OUTPUT->footer();
index 701ec0e..d139d5c 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 /**
  * Library of functions and constants for notes
@@ -281,4 +281,3 @@ function note_delete_all($courseid) {
 
     return $DB->delete_records('post', array('module'=>'notes', 'courseid'=>$courseid));
 }
-?>
index 084a681..020fce1 100644 (file)
@@ -1,4 +1,4 @@
-<?php   // $Id$
+<?php
 
 /////////////////////////////////////////////////////////////////////////////////
 ///  Code fragment to define the version of the note module