public function __construct()
 {
     $guid = getInput("guid");
     $entity = getEntity($guid);
     $title = getInput("title");
     $description = getInput("description");
     $access_id = getInput("access_id");
     Security::checkForEmptyFields(array("title"));
     $entity->title = $title;
     $entity->description = $description;
     $entity->access_id = $access_id;
     $entity->save();
     new SystemMessage("Your video has been updated.");
     forward("videos");
 }
 public function __construct()
 {
     $title = getInput("title");
     $description = getInput("description");
     Security::checkForEmptyFields(array("title"));
     $logged_in_user = getLoggedInUser();
     $logged_in_user_guid = $logged_in_user->guid;
     $album = new Videoalbum();
     $album->title = $title;
     $album->description = $description;
     $album->owner_guid = $logged_in_user_guid;
     $album->save();
     $album->createAvatar();
     new Activity(getLoggedInUserGuid(), "activity:video:album:add", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $album->getURL(), $album->title, $album->icon(EXTRALARGE, "img-responsive")));
     new SystemMessage("Your album has been created.");
     forward("videos");
 }
 public function __construct()
 {
     $guid = getInput("guid");
     $album = getEntity($guid);
     $title = getInput("title");
     $description = getInput("description");
     $access_id = getInput("access_id");
     Security::checkForEmptyFields(array("title"));
     $album->title = $title;
     $album->description = $description;
     $album->access_id = $access_id;
     $album->save();
     if (isset($_FILES['avatar']['tmp_name'])) {
         $album->createAvatar();
     }
     new SystemMessage("Your album has been updated.");
     forward("photos");
 }
 public function __construct($data = array())
 {
     gateKeeper();
     $guid = getInput("guid");
     if (!$guid) {
         $guid = $data['guid'];
     }
     $user = getLoggedInUser();
     $status = getInput("status");
     if (!$status) {
         $status = $data['status'];
     } else {
         Security::checkForEmptyFields(array("status"));
     }
     if ($guid == $user->guid) {
         if (strpos($status, "&lt;img") == false || strpos($status, "<img") == false) {
             $user->profile_status = $status;
             $user->save();
         }
     }
     $status = display("output/editor", array("value" => $status));
     $s = new Profilestatus();
     $s->description = $status;
     $s->owner_guid = getLoggedInUserGuid();
     $s->container_guid = $guid;
     $s->owner_full_name = getLoggedInUser()->full_name;
     $s->owner_icon = getLoggedInUser()->icon;
     $s->save();
     $owner = getEntity($guid);
     if ($guid == $user->guid) {
         new Activity($guid, "activity:status:update:self", array($user->getURL(), $user->full_name, truncate($status)));
     } else {
         new Activity($user->guid, "activity:status:update:friend", array($user->getURL(), $user->full_name, $owner->getURL(), $owner->full_name, truncate($status)));
     }
     forward();
 }
function checkForEmptyFields($fieldnames = array())
{
    return Security::checkForEmptyFields($fieldnames);
}