class GNUsocialPhotoPlugin extends MicroAppPlugin
{
+ var $oldSaveNew = true;
+
function onCheckSchema()
{
$schema = Schema::get();
return true;
}
- function onAutoload($cls)
- {
- $dir = dirname(__FILE__);
- switch($cls)
- {
- case 'Photo':
- include_once $dir . '/Photo.php';
- break;
- case 'NewPhotoForm':
- include_once $dir . '/newphotoform.php';
- break;
- case 'NewphotoAction':
- include_once $dir . '/newphoto.php';
- break;
- default:
- break;
- }
- return true;
- }
-
- function onRouterInitialized($m)
+ function onRouterInitialized(URLMapper $m)
{
$m->connect('main/photo/new', array('action' => 'newphoto'));
$m->connect('main/photo/:id', array('action' => 'showphoto'));
return array(Photo::OBJECT_TYPE);
}
- function saveNoticeFromActivity($activity, $actor, $options=array())
+ function saveNoticeFromActivity(Activity $activity, Profile $actor, array $options=array())
{
if(count($activity->objects) != 1) {
}
- function activityObjectFromNotice($notice)
+ function activityObjectFromNotice(Notice $notice)
{
$photo = Photo::getByNotice($notice);
$object->type = Photo::OBJECT_TYPE;
$object->title = $photo->title;
$object->summary = $notice->content;
- $object->link = $notice->bestUrl();
+ $object->link = $notice->getUrl();
$object->largerImage = $photo->photo_uri;
$object->thumbnail = $photo->thumb_uri;
}
- function showNotice($notice, $out)
+ function showNoticeContent(Notice $notice, HTMLOutputter $out)
{
$photo = Photo::getByNotice($notice);
if ($photo) {
}
}
- function deleteRelated($notice)
+ function deleteRelated(Notice $notice)
{
$photo = Photo::getByNotice($notice);
if ($photo) {