- Avoid an intermediate variable
- Use `rawContent()` in `Attach` module
- Small typo
$video_id = $_POST['id'];
- $r = Attach::exists(['id' => $video_id, 'uid' => local_user()]);
- if ($r === true) {
+ if (Attach::exists(['id' => $video_id, 'uid' => local_user()])) {
// delete the attachment
Attach::delete(['id' => $video_id, 'uid' => local_user()]);
Show this help
bin/console storage list
- List avaiable storage backends
+ List available storage backends
bin/console storage set <name>
Set current storage backend
class Attach extends BaseModule
{
/**
- * @brief Module initializer
- *
- * Fetch an attached file given the id
+ * @brief Return to user an attached file given the id
*/
- public static function init()
+ public static function rawContent()
{
$a = self::getApp();
if ($a->argc != 2) {
exit();
// NOTREACHED
}
-}
\ No newline at end of file
+}