[marginalia] r557 committed - Remove stray addslashes instances...

2 views
Skip to first unread message

margi...@googlecode.com

unread,
Jul 10, 2012, 9:47:11 PM7/10/12
to marginali...@googlegroups.com
Revision: 557
Author: geof.glass
Date: Tue Jul 10 18:46:52 2012
Log: Remove stray addslashes instances
Fix hover text on delete button in summary page
Pass $reply parameter when creating quote button, for future use to prevent
attempt to reply when user lacks permission.
Fix return code from upgrade.php.

http://code.google.com/p/marginalia/source/detail?r=557

Modified:
/moodle/trunk/moodle/blocks/marginalia/db/upgrade.php
/moodle/trunk/moodle/blocks/marginalia/moodle_marginalia.php
/moodle/trunk/moodle/blocks/marginalia/summary.php
/moodle/trunk/moodle/blocks/marginalia/version.php

=======================================
--- /moodle/trunk/moodle/blocks/marginalia/db/upgrade.php Wed May 30
15:29:42 2012
+++ /moodle/trunk/moodle/blocks/marginalia/db/upgrade.php Tue Jul 10
18:46:52 2012
@@ -40,6 +40,7 @@
function xmldb_block_marginalia_upgrade( $oldversion )
{
global $CFG, $DB;
+ $result = true;

$dbman = $DB->get_manager( );

=======================================
--- /moodle/trunk/moodle/blocks/marginalia/moodle_marginalia.php Fri Jun 22
14:05:41 2012
+++ /moodle/trunk/moodle/blocks/marginalia/moodle_marginalia.php Tue Jul 10
18:46:52 2012
@@ -352,10 +352,10 @@
return $output;
}

- public function output_quote_button( )
+ public function output_quote_button( $canreply )
{
$output =
html_writer::tag( 'button', '<span>'.get_string( 'quote_button',
ANNOTATION_STRINGS ).'</span>',
- array( 'class'=>'smartquote' ) );
+ array( 'class'=>'smartquote' . ($canreply ? ' canreply' : '') ) );
//$output .= html_writer::end_tag( 'button' );
return $output;
}
@@ -817,18 +817,18 @@
$sheet = $annotation->getSheet( );
$record->sheet_type = $this->sheet_type( $sheet );

- $record->url = addslashes( $annotation->getUrl( ) );
- $record->note = addslashes( $annotation->getNote( ) );
- $record->quote = addslashes( $annotation->getQuote( ) );
- $record->quote_title = addslashes( $annotation->getQuoteTitle( ) );
+ $record->url = $annotation->getUrl( );
+ $record->note = $annotation->getNote( );
+ $record->quote = $annotation->getQuote( );
+ $record->quote_title = $annotation->getQuoteTitle( );

// Map author username to id #
$userid = $annotation->getQuoteAuthorId( );
$user = $DB->get_record( 'user', array( 'id' => (int) $userid ) );
$record->quote_author_id = $user ? $user->id : null;

- $record->link = addslashes( $annotation->getLink( ) );
- $record->link_title = addslashes( $annotation->getLinkTitle( ) );
+ $record->link = $annotation->getLink( );
+ $record->link_title = $annotation->getLinkTitle( );
$record->created = $annotation->getCreated( );
$record->modified = $annotation->getModified( );

@@ -841,14 +841,14 @@
$xpathEnd = $xpathRange->getEnd( );
}

- $record->start_block = addslashes( $sequenceStart->getPaddedPathStr( ) );
- $record->start_xpath = null === $xpathRange ? null : addslashes(
$xpathStart->getPathStr( ) );
+ $record->start_block = $sequenceStart->getPaddedPathStr( );
+ $record->start_xpath = null === $xpathRange ? null :
$xpathStart->getPathStr( );
$record->start_line = $sequenceStart->getLines( );
$record->start_word = $sequenceStart->getWords( ) ?
$sequenceStart->getWords( ) : 0;
$record->start_char = $sequenceStart->getChars( );

- $record->end_block = addslashes( $sequenceEnd->getPaddedPathStr( ) );
- $record->end_xpath = null === $xpathRange ? null : addslashes(
$xpathEnd->getPathStr( ) );
+ $record->end_block = $sequenceEnd->getPaddedPathStr( );
+ $record->end_xpath = null === $xpathRange ? null :
$xpathEnd->getPathStr( );
$record->end_line = $sequenceEnd->getLines( );
$record->end_word = $sequenceEnd->getWords( ) ? $sequenceEnd->getWords(
) : 0;
$record->end_char = $sequenceEnd->getChars( );
=======================================
--- /moodle/trunk/moodle/blocks/marginalia/summary.php Mon Jun 25 23:00:07
2012
+++ /moodle/trunk/moodle/blocks/marginalia/summary.php Tue Jul 10 18:46:52
2012
@@ -364,7 +364,8 @@
// Controls for current user
if ( isloggedin() && $annotation->userid == $USER->id ) {
$delid = s( 'del'.$annotation->id );
- echo "<button class='delete-button' id='$delid'>x</button>\n";
+ $deltitle = get_string( 'js_delete_annotation_button',
ANNOTATION_STRINGS );
+ echo "<button class='delete-button' id='$delid'
title='$deltitle'>x</button>\n";
}

// User name (or "me" for current user)
=======================================
--- /moodle/trunk/moodle/blocks/marginalia/version.php Fri Jun 22 16:07:18
2012
+++ /moodle/trunk/moodle/blocks/marginalia/version.php Tue Jul 10 18:46:52
2012
@@ -1,3 +1,3 @@
<?php
- $plugin->version = 2012062200;
+ $plugin->version = 2012071000;
$plugin->requires = 2010112400;
Reply all
Reply to author
Forward
0 new messages