This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +19
-14
lines changed Expand file tree Collapse file tree 5 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ function taskAction()
63
63
64
64
$ modules = Zend_Registry::get ('notifier ' )->modules ;
65
65
$ tasks = Zend_Registry::get ('notifier ' )->tasks ;
66
- call_user_func (array ($ modules [$ tasks [$ task ]['module ' ]],$ tasks [$ task ]['method ' ]), $ params );
66
+ call_user_func (array ($ modules [$ tasks [$ task ]['module ' ]], $ tasks [$ task ]['method ' ]), $ params );
67
67
$ this ->disableLayout ();
68
68
$ this ->disableView ();
69
69
}
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ echo $this->doctype()
242
242
</div>
243
243
<div class="Footer"><a href="http://www.kitware.com/products/midas.html">MIDAS</a> <?php echo $ this ->version ?> by <a href="http://www.kitware.com">Kitware</a> © <?php echo date ("Y " ) ?> -
244
244
<?php
245
- echo $ this ->t ('Generated in ' ).' ' .$ this ->generatedTimer ." ms " ;
245
+ echo $ this ->t ('Generated in ' ).' ' .$ this ->generatedTimer ." s " ;
246
246
?>
247
247
- <a href="http://public.kitware.com/Bug/my_view_page.php"><?php echo $ this ->t ('Report bug ' );?> </a>
248
248
</div>
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public function save($dao)
69
69
$ index = $ component ->getLuceneItemIndex ();
70
70
71
71
$ hits = $ index ->find ("item_id: " .$ dao ->getKey ());
72
- foreach ($ hits as $ hit )
72
+ foreach ($ hits as $ hit )
73
73
{
74
74
$ index ->delete ($ hit ->id );
75
75
}
@@ -82,19 +82,22 @@ public function save($dao)
82
82
$ revisionModel = $ modelLoad ->loadModel ('ItemRevision ' );
83
83
$ revision = $ this ->getLastRevision ($ dao );
84
84
85
- $ metadata = $ revisionModel ->getMetadata ($ revision );
86
- $ metadataString = '' ;
87
-
88
- foreach ($ metadata as $ m )
89
- {
90
- $ doc ->addField (Zend_Search_Lucene_Field::Keyword ($ m ->getElement ().'- ' .$ m ->getQualifier (), $ m ->getValue ()));
91
- if (!is_numeric ($ m ->getValue ()))
85
+ if ($ revision != false )
86
+ {
87
+ $ metadata = $ revisionModel ->getMetadata ($ revision );
88
+ $ metadataString = '' ;
89
+
90
+ foreach ($ metadata as $ m )
92
91
{
93
- $ metadataString .=' ' . $ m ->getValue ();
92
+ $ doc ->addField (Zend_Search_Lucene_Field::Keyword ($ m ->getElement ().'- ' .$ m ->getQualifier (), $ m ->getValue ()));
93
+ if (!is_numeric ($ m ->getValue ()))
94
+ {
95
+ $ metadataString .= ' ' . $ m ->getValue ();
96
+ }
94
97
}
98
+
99
+ $ doc ->addField (Zend_Search_Lucene_Field::Text ('metadata ' , $ metadataString ));
95
100
}
96
-
97
- $ doc ->addField (Zend_Search_Lucene_Field::Text ('metadata ' , $ metadataString ));
98
101
$ index ->addDocument ($ doc );
99
102
$ index ->commit ();
100
103
}
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ function delete($itemdao)
210
210
$ index = $ component ->getLuceneItemIndex ();
211
211
212
212
$ hits = $ index ->find ("item_id: " .$ itemdao ->getKey ());
213
- foreach ($ hits as $ hit )
213
+ foreach ($ hits as $ hit )
214
214
{
215
215
$ index ->delete ($ hit ->id );
216
216
}
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
You can’t perform that action at this time.
0 commit comments