93 |
93 |
# If this attribute is set a milestone has a defined target timepoint
|
94 |
94 |
def due
|
95 |
95 |
if read_attribute(:due) && read_attribute(:due) > 0
|
96 |
|
Time.at(read_attribute(:due)).to_date
|
|
96 |
Time.at(read_attribute(:due) / 1000000).to_date
|
97 |
97 |
else
|
98 |
98 |
nil
|
99 |
99 |
end
|
... | ... | |
101 |
101 |
# This is the real timepoint at which the milestone has finished.
|
102 |
102 |
def completed
|
103 |
103 |
if read_attribute(:completed) && read_attribute(:completed) > 0
|
104 |
|
Time.at(read_attribute(:completed)).to_date
|
|
104 |
Time.at(read_attribute(:completed) / 1000000).to_date
|
105 |
105 |
else
|
106 |
106 |
nil
|
107 |
107 |
end
|
... | ... | |
121 |
121 |
set_table_name :attachment
|
122 |
122 |
set_inheritance_column :none
|
123 |
123 |
|
124 |
|
def time; Time.at(read_attribute(:time)) end
|
|
124 |
def time; Time.at(read_attribute(:time) / 1000000) end
|
125 |
125 |
|
126 |
126 |
def original_filename
|
127 |
127 |
filename
|
... | ... | |
182 |
182 |
read_attribute(:description).blank? ? summary : read_attribute(:description)
|
183 |
183 |
end
|
184 |
184 |
|
185 |
|
def time; Time.at(read_attribute(:time)) end
|
186 |
|
def changetime; Time.at(read_attribute(:changetime)) end
|
|
185 |
def time; Time.at(read_attribute(:time) / 1000000) end
|
|
186 |
def changetime; Time.at(read_attribute(:changetime) / 1000000) end
|
187 |
187 |
end
|
188 |
188 |
|
189 |
189 |
class TracTicketChange < ActiveRecord::Base
|
190 |
190 |
set_table_name :ticket_change
|
191 |
191 |
|
192 |
|
def time; Time.at(read_attribute(:time)) end
|
|
192 |
def time; Time.at(read_attribute(:time) / 1000000) end
|
193 |
193 |
end
|
194 |
194 |
|
195 |
195 |
TRAC_WIKI_PAGES = %w(InterMapTxt InterTrac InterWiki RecentChanges SandBox TracAccessibility TracAdmin TracBackup TracBrowser TracCgi TracChangeset \
|
... | ... | |
214 |
214 |
super.select {|column| column.name.to_s != 'readonly'}
|
215 |
215 |
end
|
216 |
216 |
|
217 |
|
def time; Time.at(read_attribute(:time)) end
|
|
217 |
def time; Time.at(read_attribute(:time) / 1000000) end
|
218 |
218 |
end
|
219 |
219 |
|
220 |
220 |
class TracPermission < ActiveRecord::Base
|