SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 80 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

This method
publishes and un-publishes multiple records at once. If the table includes a checked_
out field, we can ensure that the record is not checked out or is checked out to the
current user. This example publishes a record.
$publishIds = array($id);
$user =& JFactory::getUser();
if (!$table->publish($publishIds, 1, $user->get('id')))
{
// handle unable to publish record
// use $table->getError() for an explanation
}
The first parameter is an array of keys of the records we wish to publish or unpublish.
The second parameter is the new published value, 0 = not published, 1 =
published; this is optional, by default it is 1. The final parameter, also optional, is
used only when the checked_out field exists. Only fields that are not checked out or
are checked out by the specified user can be updated.
The method returns true if the publishing was successful. This is not the same as
saying all the specified records have been updated. For example if a specified record
is checked out by a different user, the record will not be updated but the method will
return true.


Pages:
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6