[Php-blog-plugin-cvs] additional_plugins/serendipity_event_assigncategories serendipity_event_assi
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: Garvin H. <gar...@us...> - 2013-09-26 00:32:12
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_assigncategories In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24462/serendipity_event_assigncategories Modified Files: serendipity_event_assigncategories.php Log Message: gitclone.sh autocommit Index: serendipity_event_assigncategories.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_assigncategories/serendipity_event_assigncategories.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- serendipity_event_assigncategories.php 12 Aug 2013 07:58:37 -0000 1.13 +++ serendipity_event_assigncategories.php 26 Sep 2013 00:32:10 -0000 1.14 @@ -23,7 +23,7 @@ $propbag->add('description', PLUGIN_ASSIGNCATEGORIES_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.2'); + $propbag->add('version', '1.3'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'php' => '4.1.0' @@ -140,8 +140,10 @@ echo '<tr>' . "\n"; echo '<td valign="top"><strong>' . htmlspecialchars($cat_data['category_name']) . '</strong></td>' . "\n"; echo '<td><select size="5" name="serendipity[assigncat][' . $cat_data['categoryid'] . '][]" multiple="true">' . "\n"; - foreach($entries AS $entryid => $entry) { - echo '<option value="' . $entryid . '" ' . (in_array($cat_data['categoryid'], $entry['categories']) ? 'selected="selected"' : '') . '>' . htmlspecialchars($entry['title']) . '</option>' . "\n"; + if (is_array($entries) && !empty($entries)) { + foreach($entries AS $entryid => $entry) { + echo '<option value="' . $entryid . '" ' . (in_array($cat_data['categoryid'], (array)$entry['categories']) ? 'selected="selected"' : '') . '>' . htmlspecialchars($entry['title']) . '</option>' . "\n"; + } } echo '</select></td>' . "\n"; echo '</tr>' . "\n"; |