[dev] [commit] r1016 - in wwwbase: . ajax
automailer at dexonline.ro
automailer at dexonline.ro
Thu Oct 3 21:38:34 EEST 2013
Author: grigoroiualex
Date: Thu Oct 3 21:38:34 2013
New Revision: 1016
Log:
Minor changes to revisions 1001 and 1013.
Modified:
wwwbase/ajax/getImageTags.php
wwwbase/search.php
Modified: wwwbase/ajax/getImageTags.php
==============================================================================
--- wwwbase/ajax/getImageTags.php Thu Oct 3 18:50:37 2013 (r1015)
+++ wwwbase/ajax/getImageTags.php Thu Oct 3 21:38:34 2013 (r1016)
@@ -15,13 +15,11 @@
$lines = VisualTag::get_all_by_imageId($imageId);
-if(!empty($lines)) {
- foreach($lines as $line) {
- $row = Lexem::get_by_id($line->lexemeId);
- $tags[] = array('textX' => (int)$line->textXCoord, 'textY' => (int)$line->textYCoord,
- 'imgX' => (int)$line->imgXCoord, 'imgY' => (int)$line->imgYCoord,
- 'label' => $line->label, 'lexeme' => $row->formUtf8General);
- }
+foreach($lines as $line) {
+ $row = Lexem::get_by_id($line->lexemeId);
+ $tags[] = array('textX' => (int)$line->textXCoord, 'textY' => (int)$line->textYCoord,
+ 'imgX' => (int)$line->imgXCoord, 'imgY' => (int)$line->imgYCoord,
+ 'label' => $line->label, 'lexeme' => $row->formUtf8General);
}
$resp = array('dims' => $dims, 'tags' => $tags);
Modified: wwwbase/search.php
==============================================================================
--- wwwbase/search.php Thu Oct 3 18:50:37 2013 (r1015)
+++ wwwbase/search.php Thu Oct 3 21:38:34 2013 (r1016)
@@ -308,17 +308,15 @@
$lines = Visual::get_all_by_lexemeId($lexeme->id);
foreach ($lines as $line) {
- if(!empty($line)) {
- $imgTags = array();
+ $imgTags = array();
- // For every lexeme, it fetches images and thumbs paths from the database
- $image = Visual::getImageWww($line->path);
- $thumb = Visual::getThumbWww($line->path);
+ // For every lexeme, it fetches images and thumbs paths from the database
+ $image = Visual::getImageWww($line->path);
+ $thumb = Visual::getThumbWww($line->path);
- // and stores them in the $images array.
- $images[] = array('img' => $image, 'tmb' => $thumb, 'name' => $lexeme->formUtf8General,
- 'id' => $line->id);
- }
+ // and stores them in the $images array.
+ $images[] = array('img' => $image, 'tmb' => $thumb, 'name' => $lexeme->formUtf8General,
+ 'id' => $line->id);
}
}
More information about the Dev
mailing list