This file is indexed.

/usr/share/tdiary/contrib/plugin/picasa.rb is in tdiary-contrib 3.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# show photo image on Picasa Web Album
#
# usage:
#   picasa( src[, title[, place]] )
#     - src: The url of the photo to show.
#     - title: title of photo. (optional)
#     - place: class name of img element. default is 'photo'.
#
#   picasa_left( src[, title] )
#
#   picasa_right( src[, title] )
#
# options configurable through settings:
#   @conf['picasa.user'] : picasa username
#   @conf['picasa.default_size'] : default image size
#
# Copyright (c) hb <http://www.smallstyle.com>
# Distributed under the GPL.
#

def picasa( src, alt = "photo", place = 'photo' )
	src.sub!( %r|/s\d+/|, "/s200/" ) if @conf.iphone?
	
	if @cgi.mobile_agent?
		body = %Q|<a href="#{src}">#{alt}</a>|
	else
		body = %Q|<img title="#{alt}" alt="#{alt}" src="#{src}" class="#{place} picasa">|
	end
	body
end

def picasa_left( src, alt = "photo" )
	picasa( src, alt, 'left' )
end

def picasa_right( src, alt = "photo" )
	picasa( src, alt, 'right' )
end

if /\A(form|edit|preview|showcomment)\z/ === @mode then
	enable_js( 'picasa.js' )
	add_js_setting( '$tDiary.plugin.picasa' )
	add_js_setting( '$tDiary.plugin.picasa.userId', %Q|'#{@conf['picasa.user']}'| )
	add_js_setting( '$tDiary.plugin.picasa.imgMax', %Q|'#{@conf[ 'picasa.default_size'] || 400}'| )
end

add_edit_proc do |date|
	unless @conf['picasa.user'] 
		'<p>[ERROR] picasa.rb: Picasa username is not specified.</p>'
	else
		<<-HTML
			<h3 class="plugin_picasa"><span>Picasa Web Album</span></h3>
			<div id="plugin_picasa"></div>
		HTML
	end
end