Thanks for this. I'm not very experienced applying patches but when I spliced this back together guessing where the line breaks were supposed to be I'm getting:
user@hostname:/var/www/fog/management/ajax$ sudo patch image.search.php image.search.php.patch
patching file image.search.php
Hunk #1 FAILED at 74.
1 out of 1 hunk FAILED -- saving rejects to file image.search.php.rej
Am I using the patch command incorrectly?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
here is a patch for showing the ID in the image listing:
--- image.search.php_old 2011-06-11 08:52:05.000000000 +0200
+++ image.search.php 2012-09-06 14:53:47.000000000 +0200
@@ -74,7 +74,7 @@
foreach ($data AS $item)
{
print '<tr class="' . (++$i % 2 ? 'alt1' : 'alt2') . '">
- <td><a href="' . "?node=$node&sub=edit&imageid=$item[id]" . '" title="Edit">' . $item['name'] . '</a></td>
+ <td><a href="' . "?node=$node&sub=edit&imageid=$item[id]" . '" title="Edit">' . $item['name'] . ' (' . $item[id] . ')</a></td>
<td>' . substr($item['description'], 0, 35) . '</td>
<td align="center">' . $item['storagegroup'] . '</td>
<td align="center"><a href="' . "?node=$node&sub=edit&imageid=$item[id]" . '"><span class="icon icon-edit" title="Edit: ' . $item['name'] . '"></span></a></td>
Best regards,
schmalenegger
Hi schmalenegger,
Thanks for this. I'm not very experienced applying patches but when I spliced this back together guessing where the line breaks were supposed to be I'm getting:
user@hostname:/var/www/fog/management/ajax$ sudo patch image.search.php image.search.php.patch
patching file image.search.php
Hunk #1 FAILED at 74.
1 out of 1 hunk FAILED -- saving rejects to file image.search.php.rej
Am I using the patch command incorrectly?
Thanks!
Maybe I had some trailing white space or something but I never did get the patch to work. So I simply added the:
(' . $item[id] . ')
to line # 76 in /var/www/fog/management/ajax/image.search.php and it worked fine.
I wasn't thrilled with the layout so added a new column instead:
<td align="center">' . $item[id] . '</td>
Removed the alphabetical sorting commands from the sql line:
ORDER BY imageName
and added the header for the column in ../includes/images.list.include.php:
<td><?php print _('ID#'); ?></td>
I'm sure the code above won't print correctly here but they're just one line each.