From: Petr Skoda Date: Sun, 1 Nov 2009 12:22:45 +0000 (+0000) Subject: MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trail... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1d42298086ef7722334ff26fea7f0ed63c449303;p=moodle.git MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- diff --git a/message/discussion.php b/message/discussion.php index 17be44264b..9f8337725b 100644 --- a/message/discussion.php +++ b/message/discussion.php @@ -84,7 +84,7 @@ scrolling="yes" marginwidth="10" marginheight="10" frameborder="0" /> - + @@ -233,7 +233,7 @@ $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"; @@ -249,7 +249,7 @@ 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 { @@ -277,7 +277,7 @@ 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{ @@ -296,11 +296,11 @@ } } /*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{ @@ -316,7 +316,7 @@ $sortkey = $message->timecreated."$i"; } $allmessages[$sortkey] = $printmessage; - + if ($message->timecreated < $start) { $start = $message->timecreated; // move start back so that we see all current history } diff --git a/message/edit.php b/message/edit.php index b82f248999..d3cc1ac933 100644 --- a/message/edit.php +++ b/message/edit.php @@ -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 ""; echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/message/history.php b/message/history.php index cd3f7ca4d3..5e13508cb0 100644 --- a/message/history.php +++ b/message/history.php @@ -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 diff --git a/message/index.php b/message/index.php index 66fe2dea3a..df821717ea 100644 --- a/message/index.php +++ b/message/index.php @@ -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 ''; +echo '
'; echo ''; /// Print out the tabs echo ''; @@ -135,4 +135,3 @@ if (function_exists($tabprintfunction)) { echo '
'; $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 '
'; echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/message/lib.php b/message/lib.php index a0b243db3a..29a04c362b 100644 --- a/message/lib.php +++ b/message/lib.php @@ -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 ? ' '.$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 ''; echo ''; - + $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){ diff --git a/message/messages.php b/message/messages.php index 5c9be78a66..3731365ecf 100644 --- a/message/messages.php +++ b/message/messages.php @@ -31,5 +31,4 @@ $PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fu echo $OUTPUT->header(); echo "
"; echo $OUTPUT->footer(); - -?> \ No newline at end of file + diff --git a/message/output/email/db/upgrade.php b/message/output/email/db/upgrade.php index 4b27cdc6af..b6f1d3a03c 100644 --- a/message/output/email/db/upgrade.php +++ b/message/output/email/db/upgrade.php @@ -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; } -?> + diff --git a/message/output/email/lib.php b/message/output/email/lib.php index f5ae20fabc..16cb259e85 100644 --- a/message/output/email/lib.php +++ b/message/output/email/lib.php @@ -1,4 +1,4 @@ -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').': '; 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){ diff --git a/message/output/email/version.php b/message/output/email/version.php index b598954010..a57eab90e6 100755 --- a/message/output/email/version.php +++ b/message/output/email/version.php @@ -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; -?> + diff --git a/message/output/jabber/db/upgrade.php b/message/output/jabber/db/upgrade.php index 350c2046ba..33e96482fa 100644 --- a/message/output/jabber/db/upgrade.php +++ b/message/output/jabber/db/upgrade.php @@ -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; } -?> + diff --git a/message/output/jabber/lib.php b/message/output/jabber/lib.php index e4be9ceded..cbf3f7834d 100644 --- a/message/output/jabber/lib.php +++ b/message/output/jabber/lib.php @@ -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 */ /** diff --git a/message/output/jabber/message_output_jabber.php b/message/output/jabber/message_output_jabber.php index 817f9603af..37fbb45601 100644 --- a/message/output/jabber/message_output_jabber.php +++ b/message/output/jabber/message_output_jabber.php @@ -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); * */ -?> + diff --git a/message/output/jabber/version.php b/message/output/jabber/version.php index 9abc46157b..cf32a6e5cb 100755 --- a/message/output/jabber/version.php +++ b/message/output/jabber/version.php @@ -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; -?> + diff --git a/message/output/lib.php b/message/output/lib.php index be8c56c879..b485bf2ac0 100644 --- a/message/output/lib.php +++ b/message/output/lib.php @@ -1,4 +1,4 @@ - + diff --git a/message/output/popup/db/upgrade.php b/message/output/popup/db/upgrade.php index efc033424a..1895c445be 100644 --- a/message/output/popup/db/upgrade.php +++ b/message/output/popup/db/upgrade.php @@ -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; } -?> + diff --git a/message/output/popup/lib.php b/message/output/popup/lib.php index add746c14a..813968a2d5 100644 --- a/message/output/popup/lib.php +++ b/message/output/popup/lib.php @@ -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 */ /** diff --git a/message/output/popup/message_output_popup.php b/message/output/popup/message_output_popup.php index 6d1b36d426..08a0dca8a1 100644 --- a/message/output/popup/message_output_popup.php +++ b/message/output/popup/message_output_popup.php @@ -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 ''. ''. @@ -59,7 +59,7 @@ class message_output_popup extends message_output{ ''. '
'.get_string('showmessagewindow', 'message').':showmessagewindow==1?" checked=\"checked\"":"").' />
'.get_string('noframesjs', 'message').':noframesjs==1?" checked=\"checked\"":"").' />
'; } - + public function process_form($form, &$preferences) { $preferences['message_showmessagewindow'] = $form->showmessagewindow?1:0; $preferences['message_blocknoncontacts'] = $form->blocknoncontacts?1:0; diff --git a/message/output/popup/version.php b/message/output/popup/version.php index c966588c1e..d12d4bd69f 100755 --- a/message/output/popup/version.php +++ b/message/output/popup/version.php @@ -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; -?> + diff --git a/message/refresh.php b/message/refresh.php index 0b1c4858a3..992f457a26 100644 --- a/message/refresh.php +++ b/message/refresh.php @@ -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 diff --git a/message/search.html b/message/search.html index ff6cad9890..92c0a63b35 100644 --- a/message/search.html +++ b/message/search.html @@ -18,7 +18,7 @@ - + @@ -30,29 +30,29 @@ - +   - +       - +   '.get_string('allstudents', 'message').'
   '.$cs.'; '; */ ?> - + diff --git a/message/user.php b/message/user.php index f377d28d76..c6855ae1e2 100644 --- a/message/user.php +++ b/message/user.php @@ -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 ''; echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mnet/environment.php b/mnet/environment.php index 2af14ed2c3..e4f6f6f800 100644 --- a/mnet/environment.php +++ b/mnet/environment.php @@ -1,4 +1,4 @@ -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']; } } - -?> diff --git a/mnet/lib.php b/mnet/lib.php index 194808c58d..ed38256944 100644 --- a/mnet/lib.php +++ b/mnet/lib.php @@ -1,4 +1,4 @@ - diff --git a/mnet/peer.php b/mnet/peer.php index c624a07618..c9089a4aca 100644 --- a/mnet/peer.php +++ b/mnet/peer.php @@ -1,4 +1,4 @@ -public_key_ref; } } - -?> diff --git a/mnet/publickey.php b/mnet/publickey.php index 725c631483..10ddcbe7bd 100644 --- a/mnet/publickey.php +++ b/mnet/publickey.php @@ -1,4 +1,4 @@ -mnet_dispatcher_mode === 'off') { header("Content-type: text/plain"); $keypair = mnet_get_keypair(); echo $keypair['certificate']; -?> diff --git a/mnet/remote_client.php b/mnet/remote_client.php index 1f6e5acdbb..f0dcec1147 100644 --- a/mnet/remote_client.php +++ b/mnet/remote_client.php @@ -1,4 +1,4 @@ - diff --git a/mnet/rpclib.php b/mnet/rpclib.php index 4156fa39dc..b56a3a4de7 100644 --- a/mnet/rpclib.php +++ b/mnet/rpclib.php @@ -1,4 +1,4 @@ -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; } } - -?> diff --git a/mnet/testclient.php b/mnet/testclient.php index 95c810a454..6b8bbf938b 100644 --- a/mnet/testclient.php +++ b/mnet/testclient.php @@ -1,4 +1,4 @@ -set_method('system/listMethods'); $mnet_request->send($mnet_peer); $methods = $mnet_request->response; - + echo '

Methods '.$host->wwwroot .'

'; foreach ($methods as $id => $method) { echo ''."\n"; diff --git a/mnet/xmlrpc/client.php b/mnet/xmlrpc/client.php index 819ce05f3d..874aae2285 100644 --- a/mnet/xmlrpc/client.php +++ b/mnet/xmlrpc/client.php @@ -355,4 +355,3 @@ class mnet_xmlrpc_client { return $httprequest; } } -?> diff --git a/mnet/xmlrpc/server.php b/mnet/xmlrpc/server.php index 1817d35a1e..0e93cee59d 100644 --- a/mnet/xmlrpc/server.php +++ b/mnet/xmlrpc/server.php @@ -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; } - -?> diff --git a/mnet/xmlrpc/xmlparser.php b/mnet/xmlrpc/xmlparser.php index e62743d4a9..f3ad40988d 100644 --- a/mnet/xmlrpc/xmlparser.php +++ b/mnet/xmlrpc/xmlparser.php @@ -308,4 +308,3 @@ class mnet_encxml_parser { return true; } } -?> diff --git a/my/index.php b/my/index.php index 64bd4ea33d..4fea5a2f26 100644 --- a/my/index.php +++ b/my/index.php @@ -1,4 +1,4 @@ -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 @@ -111,4 +111,3 @@ echo $OUTPUT->footer(); -?> diff --git a/notes/delete.php b/notes/delete.php index 81c438cbb6..040a9aa577 100644 --- a/notes/delete.php +++ b/notes/delete.php @@ -71,4 +71,3 @@ if (data_submitted() && confirm_sesskey()) { note_print($note, NOTES_SHOW_BODY | NOTES_SHOW_HEAD); echo $OUTPUT->footer(); } -?> diff --git a/notes/edit.php b/notes/edit.php index 505e64c6f7..870afe7c87 100644 --- a/notes/edit.php +++ b/notes/edit.php @@ -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(); diff --git a/notes/edit_form.php b/notes/edit_form.php index 7a94d5bd48..2c9f2b0f6d 100644 --- a/notes/edit_form.php +++ b/notes/edit_form.php @@ -1,4 +1,4 @@ -libdir.'/formslib.php'); @@ -31,4 +31,3 @@ class note_edit_form extends moodleform { $mform->setType('id', PARAM_INT); } } -?> \ No newline at end of file diff --git a/notes/index.php b/notes/index.php index 096e610d4f..75d6cb8245 100644 --- a/notes/index.php +++ b/notes/index.php @@ -139,4 +139,4 @@ if ($courseid != SITEID) { echo $OUTPUT->box_end(); -echo $OUTPUT->footer(); \ No newline at end of file +echo $OUTPUT->footer(); diff --git a/notes/lib.php b/notes/lib.php index 701ec0ed23..d139d5c469 100644 --- a/notes/lib.php +++ b/notes/lib.php @@ -1,4 +1,4 @@ -delete_records('post', array('module'=>'notes', 'courseid'=>$courseid)); } -?> diff --git a/notes/version.php b/notes/version.php index 084a681f32..020fce1398 100644 --- a/notes/version.php +++ b/notes/version.php @@ -1,4 +1,4 @@ -
MethodOptions
'.$method.' Inspect