diff --git a/app/Commands/CreateCommentCommand.php b/app/Commands/CreateCommentCommand.php
index 54c215f0..cac33db8 100644
--- a/app/Commands/CreateCommentCommand.php
+++ b/app/Commands/CreateCommentCommand.php
@@ -78,25 +78,25 @@ class CreateCommentCommand extends CommandBase
$comment->$column = $this->_id;
$comment->save();
- // Recount the track's comments, if this is a track comment
- if ($this->_type === 'track') {
- $entity = Track::find($this->_id);
+ // Recount the track's comments, if this is a track comment
+ if ($this->_type === 'track') {
+ $entity = Track::find($this->_id);
- } elseif ($this->_type === 'album') {
- $entity = Album::find($this->_id);
+ } elseif ($this->_type === 'album') {
+ $entity = Album::find($this->_id);
- } elseif ($this->_type === 'playlist') {
- $entity = Playlist::find($this->_id);
+ } elseif ($this->_type === 'playlist') {
+ $entity = Playlist::find($this->_id);
- } elseif ($this->_type === 'user') {
- $entity = User::find($this->_id);
+ } elseif ($this->_type === 'user') {
+ $entity = User::find($this->_id);
- } else {
- App::abort(400, 'This comment is being added to an invalid entity!');
- }
+ } else {
+ App::abort(400, 'This comment is being added to an invalid entity!');
+ }
- $entity->comment_count = Comment::where($column, $this->_id)->count();
- $entity->save();
+ $entity->comment_count = Comment::where($column, $this->_id)->count();
+ $entity->save();
return CommandResponse::succeed(Comment::mapPublic($comment));
}
diff --git a/app/Commands/ToggleFavouriteCommand.php b/app/Commands/ToggleFavouriteCommand.php
index 1928e71e..ba496fa5 100644
--- a/app/Commands/ToggleFavouriteCommand.php
+++ b/app/Commands/ToggleFavouriteCommand.php
@@ -62,14 +62,14 @@ class ToggleFavouriteCommand extends CommandBase
DB::table($resourceTable)->whereId($this->_resourceId)->update([
'favourite_count' =>
DB::raw('(
- SELECT
- COUNT(id)
- FROM
- favourites
- WHERE ' .
+ SELECT
+ COUNT(id)
+ FROM
+ favourites
+ WHERE ' .
$typeId . ' = ' . $this->_resourceId . ')')
]);
return CommandResponse::succeed(['is_favourited' => $isFavourited]);
}
-}
\ No newline at end of file
+}
diff --git a/app/Console/Commands/ClassifyMLPMA.php b/app/Console/Commands/ClassifyMLPMA.php
index 649bc315..92ed7299 100644
--- a/app/Console/Commands/ClassifyMLPMA.php
+++ b/app/Console/Commands/ClassifyMLPMA.php
@@ -80,7 +80,7 @@ class ClassifyMLPMA extends Command
$queriedTitle = DB::connection()->getPdo()->quote($sanitizedTrackTitle);
$officialSongs = ShowSong::select(['id', 'title'])
->whereRaw("
- MATCH (title)
+ MATCH (title)
AGAINST ($queriedTitle IN BOOLEAN MODE)
")
->get();
diff --git a/app/Console/Commands/ImportMLPMA.php b/app/Console/Commands/ImportMLPMA.php
index e312acb0..897a0efe 100644
--- a/app/Console/Commands/ImportMLPMA.php
+++ b/app/Console/Commands/ImportMLPMA.php
@@ -167,12 +167,12 @@ class ImportMLPMA extends Command
list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
} elseif (Str::lower($file->getExtension()) === 'wav') {
- list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
+ list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
}
- //==========================================================================================================
+ //==========================================================================================================
// Determine the release date.
//==========================================================================================================
$modifiedDate = Carbon::createFromTimeStampUTC(File::lastModified($file->getPathname()));
diff --git a/app/Console/Commands/PoniverseApiSetup.php b/app/Console/Commands/PoniverseApiSetup.php
index fb5e312e..c11faf88 100644
--- a/app/Console/Commands/PoniverseApiSetup.php
+++ b/app/Console/Commands/PoniverseApiSetup.php
@@ -42,15 +42,15 @@ class PoniverseApiSetup extends Command
{
$this->output->getFormatter()->setStyle('bold', new OutputFormatterStyle(null, null, ['bold']));
- $this->comment('Sign in with your Poniverse account! Your password won\'t be stored locally.');
- $this->line('');
- $this->comment('This sets up your Poniverse API credentials, which are necessary for Pony.fm\'s integration with Poniverse to work.');
- $this->line('');
- $this->comment('If you don\'t have a Poniverse account, create one at:
Error: Unable to send file $archiveName. HTML Headers have already been sent from $headerFile in line $headerLine
")) { - if ((ob_get_contents() === FALSE || ob_get_contents() == '') or die("\nError: Unable to send file $archiveName.epub. Output buffer contains the following text (typically warnings or errors):
" . ob_get_contents() . "
Length mismatch
\n"); - } - $this->streamFileLength += $length; - - return $length; - } - - /** - * Close the current stream. - * - * @return bool $success - */ - public function closeStream() { - if ($this->isFinalized || strlen($this->streamFilePath) == 0) { - return FALSE; - } - - fflush($this->streamData); - fclose($this->streamData); - - $this->processFile($this->streamFile, $this->streamFilePath, $this->streamTimestamp, $this->streamFileComment); - - $this->streamData = null; - $this->streamFilePath = null; - $this->streamTimestamp = null; - $this->streamFileComment = null; - $this->streamFileLength = 0; - - // Windows is a little slow at times, so a millisecond later, we can unlink this. - unlink($this->streamFile); - - $this->streamFile = null; - - return TRUE; - } - - private function processFile($dataFile, $filePath, $timestamp = 0, $fileComment = null) { - if ($this->isFinalized) { - return FALSE; - } - - $tempzip = tempnam(sys_get_temp_dir(), 'ZipStream'); - - $zip = new ZipArchive; - if ($zip->open($tempzip) === TRUE) { - $zip->addFile($dataFile, 'file'); - $zip->close(); - } - - $file_handle = fopen($tempzip, "rb"); - $stats = fstat($file_handle); - $eof = $stats['size']-72; - - fseek($file_handle, 6); - - $gpFlags = fread($file_handle, 2); - $gzType = fread($file_handle, 2); - fread($file_handle, 4); - $fileCRC32 = fread($file_handle, 4); - $v = unpack("Vval", fread($file_handle, 4)); - $gzLength = $v['val']; - $v = unpack("Vval", fread($file_handle, 4)); - $dataLength = $v['val']; - - $this->buildZipEntry($filePath, $fileComment, $gpFlags, $gzType, $timestamp, $fileCRC32, $gzLength, $dataLength, self::EXT_FILE_ATTR_FILE); - - fseek($file_handle, 34); - $pos = 34; - - while (!feof($file_handle) && $pos < $eof) { - $datalen = $this->streamChunkSize; - if ($pos + $this->streamChunkSize > $eof) { - $datalen = $eof-$pos; - } - echo fread($file_handle, $datalen); - $pos += $datalen; - flush(); - } - - fclose($file_handle); - unlink($tempzip); - } - - /** - * Close the archive. - * A closed archive can no longer have new files added to it. - * @return bool $success - */ - public function finalize() { - if (!$this->isFinalized) { - if (strlen($this->streamFilePath) > 0) { - $this->closeStream(); - } - - $cdRecSize = pack("v", sizeof($this->cdRec)); - - $cd = implode("", $this->cdRec); - print($cd); - print(self::ZIP_END_OF_CENTRAL_DIRECTORY); - print($cdRecSize.$cdRecSize); - print(pack("VV", strlen($cd), $this->offset)); - if (!empty($this->zipComment)) { - print(pack("v", strlen($this->zipComment))); - print($this->zipComment); - } else { - print("\x00\x00"); - } - - flush(); - - $this->isFinalized = TRUE; - $cd = null; - $this->cdRec = null; - - return TRUE; - } - return FALSE; - } - - /** - * Calculate the 2 byte dostime used in the zip entries. - * - * @param int $timestamp - * @return 2-byte encoded DOS Date - */ - private function getDosTime($timestamp = 0) { - $timestamp = (int)$timestamp; - $oldTZ = @date_default_timezone_get(); - date_default_timezone_set('UTC'); - $date = ($timestamp == 0 ? getdate() : getdate($timestamp)); - date_default_timezone_set($oldTZ); - if ($date["year"] >= 1980) { - return pack("V", (($date["mday"] + ($date["mon"] << 5) + (($date["year"]-1980) << 9)) << 16) | - (($date["seconds"] >> 1) + ($date["minutes"] << 5) + ($date["hours"] << 11))); - } - return "\x00\x00\x00\x00"; - } - - /** - * Build the Zip file structures - * - * @param String $filePath - * @param String $fileComment - * @param String $gpFlags - * @param String $gzType - * @param int $timestamp - * @param string $fileCRC32 - * @param int $gzLength - * @param int $dataLength - * @param integer $extFileAttr Use self::EXT_FILE_ATTR_FILE for files, self::EXT_FILE_ATTR_DIR for Directories. - */ - private function buildZipEntry($filePath, $fileComment, $gpFlags, $gzType, $timestamp, $fileCRC32, $gzLength, $dataLength, $extFileAttr) { - $filePath = str_replace("\\", "/", $filePath); - $fileCommentLength = (empty($fileComment) ? 0 : strlen($fileComment)); - $timestamp = (int)$timestamp; - $timestamp = ($timestamp == 0 ? time() : $timestamp); - - $dosTime = $this->getDosTime($timestamp); - $tsPack = pack("V", $timestamp); - - $ux = "\x75\x78\x0B\x00\x01\x04\xE8\x03\x00\x00\x04\x00\x00\x00\x00"; - - if (!isset($gpFlags) || strlen($gpFlags) != 2) { - $gpFlags = "\x00\x00"; - } - - $isFileUTF8 = mb_check_encoding($filePath, "UTF-8") && !mb_check_encoding($filePath, "ASCII"); - $isCommentUTF8 = !empty($fileComment) && mb_check_encoding($fileComment, "UTF-8") && !mb_check_encoding($fileComment, "ASCII"); - if ($isFileUTF8 || $isCommentUTF8) { - $flag = 0; - $gpFlagsV = unpack("vflags", $gpFlags); - if (isset($gpFlagsV['flags'])) { - $flag = $gpFlagsV['flags']; - } - $gpFlags = pack("v", $flag | (1 << 11)); - } - - $header = $gpFlags . $gzType . $dosTime. $fileCRC32 - . pack("VVv", $gzLength, $dataLength, strlen($filePath)); // File name length - - $zipEntry = self::ZIP_LOCAL_FILE_HEADER; - $zipEntry .= self::ATTR_VERSION_TO_EXTRACT; - $zipEntry .= $header; - $zipEntry .= $this->addExtraField ? "\x1C\x00" : "\x00\x00"; // Extra field length - $zipEntry .= $filePath; // FileName - // Extra fields - if ($this->addExtraField) { - $zipEntry .= "\x55\x54\x09\x00\x03" . $tsPack . $tsPack . $ux; - } - - print($zipEntry); - - $cdEntry = self::ZIP_CENTRAL_FILE_HEADER; - $cdEntry .= self::ATTR_MADE_BY_VERSION; - $cdEntry .= ($dataLength === 0 ? "\x0A\x00" : self::ATTR_VERSION_TO_EXTRACT); - $cdEntry .= $header; - $cdEntry .= $this->addExtraField ? "\x18\x00" : "\x00\x00"; // Extra field length - $cdEntry .= pack("v", $fileCommentLength); // File comment length - $cdEntry .= "\x00\x00"; // Disk number start - $cdEntry .= "\x00\x00"; // internal file attributes - $cdEntry .= $extFileAttr; // External file attributes - $cdEntry .= pack("V", $this->offset); // Relative offset of local header - $cdEntry .= $filePath; // FileName - // Extra fields - if ($this->addExtraField) { - $cdEntry .= "\x55\x54\x05\x00\x03" . $tsPack . $ux; - } - - if (!empty($fileComment)) { - $cdEntry .= $fileComment; // Comment - } - - $this->cdRec[] = $cdEntry; - $this->offset += strlen($zipEntry) + $gzLength; - } - - /** - * Join $file to $dir path, and clean up any excess slashes. - * - * @param String $dir - * @param String $file - */ - public static function pathJoin($dir, $file) { - if (empty($dir) || empty($file)) { - return self::getRelativePath($dir . $file); - } - return self::getRelativePath($dir . '/' . $file); - } - - /** - * Clean up a path, removing any unnecessary elements such as /./, // or redundant ../ segments. - * If the path starts with a "/", it is deemed an absolute path and any /../ in the beginning is stripped off. - * The returned path will not end in a "/". - * - * @param String $path The path to clean up - * @return String the clean path - */ - public static function getRelativePath($path) { - $path = preg_replace("#/+\.?/+#", "/", str_replace("\\", "/", $path)); - $dirs = explode("/", rtrim(preg_replace('#^(?:\./)+#', '', $path), '/')); - - $offset = 0; - $sub = 0; - $subOffset = 0; - $root = ""; - - if (empty($dirs[0])) { - $root = "/"; - $dirs = array_splice($dirs, 1); - } else if (preg_match("#[A-Za-z]:#", $dirs[0])) { - $root = strtoupper($dirs[0]) . "/"; - $dirs = array_splice($dirs, 1); - } - - $newDirs = array(); - foreach ($dirs as $dir) { - if ($dir !== "..") { - $subOffset--; - $newDirs[++$offset] = $dir; - } else { - $subOffset++; - if (--$offset < 0) { - $offset = 0; - if ($subOffset > $sub) { - $sub++; - } - } - } - } - - if (empty($root)) { - $root = str_repeat("../", $sub); - } - return $root . implode("/", array_slice($newDirs, 0, $offset)); - } + const VERSION = 1.37; + + const ZIP_LOCAL_FILE_HEADER = "\x50\x4b\x03\x04"; // Local file header signature + const ZIP_CENTRAL_FILE_HEADER = "\x50\x4b\x01\x02"; // Central file header signature + const ZIP_END_OF_CENTRAL_DIRECTORY = "\x50\x4b\x05\x06\x00\x00\x00\x00"; //end of Central directory record + + const EXT_FILE_ATTR_DIR = "\x10\x00\xFF\x41"; + const EXT_FILE_ATTR_FILE = "\x00\x00\xFF\x81"; + + const ATTR_VERSION_TO_EXTRACT = "\x14\x00"; // Version needed to extract + const ATTR_MADE_BY_VERSION = "\x1E\x03"; // Made By Version + + private $zipMemoryThreshold = 1048576; // Autocreate tempfile if the zip data exceeds 1048576 bytes (1 MB) + + private $zipComment = null; + private $cdRec = array(); // central directory + private $offset = 0; + private $isFinalized = FALSE; + private $addExtraField = TRUE; + + private $streamChunkSize = 16384; // 65536; + private $streamFilePath = null; + private $streamTimeStamp = null; + private $streamComment = null; + private $streamFile = null; + private $streamData = null; + private $streamFileLength = 0; + + /** + * Constructor. + * + * @param String $archiveName Name to send to the HTTP client. + * @param String $contentType Content mime type. Optional, defaults to "application/zip". + */ + function __construct($archiveName = "", $contentType = "application/zip") { + if (!function_exists('sys_get_temp_dir')) { + die ("ERROR: ZipStream " . self::VERSION . " requires PHP version 5.2.1 or above."); + } + + $headerFile = null; + $headerLine = null; + if (!headers_sent($headerFile, $headerLine) or die("Error: Unable to send file $archiveName. HTML Headers have already been sent from $headerFile in line $headerLine
")) { + if ((ob_get_contents() === FALSE || ob_get_contents() == '') or die("\nError: Unable to send file $archiveName.epub. Output buffer contains the following text (typically warnings or errors):
" . ob_get_contents() . "
Length mismatch
\n"); + } + $this->streamFileLength += $length; + + return $length; + } + + /** + * Close the current stream. + * + * @return bool $success + */ + public function closeStream() { + if ($this->isFinalized || strlen($this->streamFilePath) == 0) { + return FALSE; + } + + fflush($this->streamData); + fclose($this->streamData); + + $this->processFile($this->streamFile, $this->streamFilePath, $this->streamTimestamp, $this->streamFileComment); + + $this->streamData = null; + $this->streamFilePath = null; + $this->streamTimestamp = null; + $this->streamFileComment = null; + $this->streamFileLength = 0; + + // Windows is a little slow at times, so a millisecond later, we can unlink this. + unlink($this->streamFile); + + $this->streamFile = null; + + return TRUE; + } + + private function processFile($dataFile, $filePath, $timestamp = 0, $fileComment = null) { + if ($this->isFinalized) { + return FALSE; + } + + $tempzip = tempnam(sys_get_temp_dir(), 'ZipStream'); + + $zip = new ZipArchive; + if ($zip->open($tempzip) === TRUE) { + $zip->addFile($dataFile, 'file'); + $zip->close(); + } + + $file_handle = fopen($tempzip, "rb"); + $stats = fstat($file_handle); + $eof = $stats['size']-72; + + fseek($file_handle, 6); + + $gpFlags = fread($file_handle, 2); + $gzType = fread($file_handle, 2); + fread($file_handle, 4); + $fileCRC32 = fread($file_handle, 4); + $v = unpack("Vval", fread($file_handle, 4)); + $gzLength = $v['val']; + $v = unpack("Vval", fread($file_handle, 4)); + $dataLength = $v['val']; + + $this->buildZipEntry($filePath, $fileComment, $gpFlags, $gzType, $timestamp, $fileCRC32, $gzLength, $dataLength, self::EXT_FILE_ATTR_FILE); + + fseek($file_handle, 34); + $pos = 34; + + while (!feof($file_handle) && $pos < $eof) { + $datalen = $this->streamChunkSize; + if ($pos + $this->streamChunkSize > $eof) { + $datalen = $eof-$pos; + } + echo fread($file_handle, $datalen); + $pos += $datalen; + flush(); + } + + fclose($file_handle); + unlink($tempzip); + } + + /** + * Close the archive. + * A closed archive can no longer have new files added to it. + * @return bool $success + */ + public function finalize() { + if (!$this->isFinalized) { + if (strlen($this->streamFilePath) > 0) { + $this->closeStream(); + } + + $cdRecSize = pack("v", sizeof($this->cdRec)); + + $cd = implode("", $this->cdRec); + print($cd); + print(self::ZIP_END_OF_CENTRAL_DIRECTORY); + print($cdRecSize.$cdRecSize); + print(pack("VV", strlen($cd), $this->offset)); + if (!empty($this->zipComment)) { + print(pack("v", strlen($this->zipComment))); + print($this->zipComment); + } else { + print("\x00\x00"); + } + + flush(); + + $this->isFinalized = TRUE; + $cd = null; + $this->cdRec = null; + + return TRUE; + } + return FALSE; + } + + /** + * Calculate the 2 byte dostime used in the zip entries. + * + * @param int $timestamp + * @return 2-byte encoded DOS Date + */ + private function getDosTime($timestamp = 0) { + $timestamp = (int)$timestamp; + $oldTZ = @date_default_timezone_get(); + date_default_timezone_set('UTC'); + $date = ($timestamp == 0 ? getdate() : getdate($timestamp)); + date_default_timezone_set($oldTZ); + if ($date["year"] >= 1980) { + return pack("V", (($date["mday"] + ($date["mon"] << 5) + (($date["year"]-1980) << 9)) << 16) | + (($date["seconds"] >> 1) + ($date["minutes"] << 5) + ($date["hours"] << 11))); + } + return "\x00\x00\x00\x00"; + } + + /** + * Build the Zip file structures + * + * @param String $filePath + * @param String $fileComment + * @param String $gpFlags + * @param String $gzType + * @param int $timestamp + * @param string $fileCRC32 + * @param int $gzLength + * @param int $dataLength + * @param integer $extFileAttr Use self::EXT_FILE_ATTR_FILE for files, self::EXT_FILE_ATTR_DIR for Directories. + */ + private function buildZipEntry($filePath, $fileComment, $gpFlags, $gzType, $timestamp, $fileCRC32, $gzLength, $dataLength, $extFileAttr) { + $filePath = str_replace("\\", "/", $filePath); + $fileCommentLength = (empty($fileComment) ? 0 : strlen($fileComment)); + $timestamp = (int)$timestamp; + $timestamp = ($timestamp == 0 ? time() : $timestamp); + + $dosTime = $this->getDosTime($timestamp); + $tsPack = pack("V", $timestamp); + + $ux = "\x75\x78\x0B\x00\x01\x04\xE8\x03\x00\x00\x04\x00\x00\x00\x00"; + + if (!isset($gpFlags) || strlen($gpFlags) != 2) { + $gpFlags = "\x00\x00"; + } + + $isFileUTF8 = mb_check_encoding($filePath, "UTF-8") && !mb_check_encoding($filePath, "ASCII"); + $isCommentUTF8 = !empty($fileComment) && mb_check_encoding($fileComment, "UTF-8") && !mb_check_encoding($fileComment, "ASCII"); + if ($isFileUTF8 || $isCommentUTF8) { + $flag = 0; + $gpFlagsV = unpack("vflags", $gpFlags); + if (isset($gpFlagsV['flags'])) { + $flag = $gpFlagsV['flags']; + } + $gpFlags = pack("v", $flag | (1 << 11)); + } + + $header = $gpFlags . $gzType . $dosTime. $fileCRC32 + . pack("VVv", $gzLength, $dataLength, strlen($filePath)); // File name length + + $zipEntry = self::ZIP_LOCAL_FILE_HEADER; + $zipEntry .= self::ATTR_VERSION_TO_EXTRACT; + $zipEntry .= $header; + $zipEntry .= $this->addExtraField ? "\x1C\x00" : "\x00\x00"; // Extra field length + $zipEntry .= $filePath; // FileName + // Extra fields + if ($this->addExtraField) { + $zipEntry .= "\x55\x54\x09\x00\x03" . $tsPack . $tsPack . $ux; + } + + print($zipEntry); + + $cdEntry = self::ZIP_CENTRAL_FILE_HEADER; + $cdEntry .= self::ATTR_MADE_BY_VERSION; + $cdEntry .= ($dataLength === 0 ? "\x0A\x00" : self::ATTR_VERSION_TO_EXTRACT); + $cdEntry .= $header; + $cdEntry .= $this->addExtraField ? "\x18\x00" : "\x00\x00"; // Extra field length + $cdEntry .= pack("v", $fileCommentLength); // File comment length + $cdEntry .= "\x00\x00"; // Disk number start + $cdEntry .= "\x00\x00"; // internal file attributes + $cdEntry .= $extFileAttr; // External file attributes + $cdEntry .= pack("V", $this->offset); // Relative offset of local header + $cdEntry .= $filePath; // FileName + // Extra fields + if ($this->addExtraField) { + $cdEntry .= "\x55\x54\x05\x00\x03" . $tsPack . $ux; + } + + if (!empty($fileComment)) { + $cdEntry .= $fileComment; // Comment + } + + $this->cdRec[] = $cdEntry; + $this->offset += strlen($zipEntry) + $gzLength; + } + + /** + * Join $file to $dir path, and clean up any excess slashes. + * + * @param String $dir + * @param String $file + */ + public static function pathJoin($dir, $file) { + if (empty($dir) || empty($file)) { + return self::getRelativePath($dir . $file); + } + return self::getRelativePath($dir . '/' . $file); + } + + /** + * Clean up a path, removing any unnecessary elements such as /./, // or redundant ../ segments. + * If the path starts with a "/", it is deemed an absolute path and any /../ in the beginning is stripped off. + * The returned path will not end in a "/". + * + * @param String $path The path to clean up + * @return String the clean path + */ + public static function getRelativePath($path) { + $path = preg_replace("#/+\.?/+#", "/", str_replace("\\", "/", $path)); + $dirs = explode("/", rtrim(preg_replace('#^(?:\./)+#', '', $path), '/')); + + $offset = 0; + $sub = 0; + $subOffset = 0; + $root = ""; + + if (empty($dirs[0])) { + $root = "/"; + $dirs = array_splice($dirs, 1); + } else if (preg_match("#[A-Za-z]:#", $dirs[0])) { + $root = strtoupper($dirs[0]) . "/"; + $dirs = array_splice($dirs, 1); + } + + $newDirs = array(); + foreach ($dirs as $dir) { + if ($dir !== "..") { + $subOffset--; + $newDirs[++$offset] = $dir; + } else { + $subOffset++; + if (--$offset < 0) { + $offset = 0; + if ($subOffset > $sub) { + $sub++; + } + } + } + } + + if (empty($root)) { + $root = str_repeat("../", $sub); + } + return $root . implode("/", array_slice($newDirs, 0, $offset)); + } } -?> \ No newline at end of file +?> diff --git a/app/ResourceLogItem.php b/app/ResourceLogItem.php index d61669f5..78b0e835 100644 --- a/app/ResourceLogItem.php +++ b/app/ResourceLogItem.php @@ -57,13 +57,13 @@ class ResourceLogItem extends Model DB::table($resourceTable)->whereId($resourceId)->update([ $countColumn => DB::raw('(SELECT - COUNT(id) - FROM - resource_log_items - WHERE ' . + COUNT(id) + FROM + resource_log_items + WHERE ' . $resourceIdColumn . ' = ' . $resourceId . ' - AND - log_type = ' . $logType . ')') + AND + log_type = ' . $logType . ')') ]); if (Auth::check()) { @@ -71,15 +71,15 @@ class ResourceLogItem extends Model DB::table('resource_users')->whereId($resourceUserId)->update([ $countColumn => DB::raw('(SELECT - COUNT(id) - FROM - resource_log_items - WHERE - user_id = ' . Auth::user()->id . ' - AND ' . + COUNT(id) + FROM + resource_log_items + WHERE + user_id = ' . Auth::user()->id . ' + AND ' . $resourceIdColumn . ' = ' . $resourceId . ' - AND - log_type = ' . $logType . ')') + AND + log_type = ' . $logType . ')') ]); } } diff --git a/app/Track.php b/app/Track.php index 3fd8fb60..817c0f78 100644 --- a/app/Track.php +++ b/app/Track.php @@ -127,10 +127,10 @@ class Track extends Model ::published() ->listed() ->join(DB::raw(' - ( SELECT `track_id`, `created_at` - FROM `resource_log_items` - WHERE track_id IS NOT NULL AND log_type = 3 AND `created_at` > now() - INTERVAL 1 DAY - ) AS ranged_plays'), + ( SELECT `track_id`, `created_at` + FROM `resource_log_items` + WHERE track_id IS NOT NULL AND log_type = 3 AND `created_at` > now() - INTERVAL 1 DAY + ) AS ranged_plays'), 'tracks.id', '=', 'ranged_plays.track_id') ->groupBy('id') ->orderBy('plays', 'desc') @@ -598,9 +598,9 @@ class Track extends Model 'copyright' => ['© ' . $this->year . ' ' . $this->user->display_name], 'publisher' => ['Pony.fm - https://pony.fm/'], 'encoded_by' => ['https://pony.fm/'], -// 'url_artist' => [$this->user->url], -// 'url_source' => [$this->url], -// 'url_file' => [$this->url], +// 'url_artist' => [$this->user->url], +// 'url_source' => [$this->url], +// 'url_file' => [$this->url], 'url_publisher' => ['https://pony.fm/'] ]; diff --git a/config/newrelic.php b/config/newrelic.php index 46a27527..a9430448 100644 --- a/config/newrelic.php +++ b/config/newrelic.php @@ -2,41 +2,41 @@ return array( - /* - |-------------------------------------------------------------------------- - | Default NewRelic Integration Settings - |-------------------------------------------------------------------------- - */ + /* + |-------------------------------------------------------------------------- + | Default NewRelic Integration Settings + |-------------------------------------------------------------------------- + */ - /* - * Will automatically name transactions in NewRelic, - * using the Laravel route name, action or request. - * - * Set this to false to use the NewRelic default naming - * scheme, or to set your own in your application. - */ - 'auto_name_transactions' => true, + /* + * Will automatically name transactions in NewRelic, + * using the Laravel route name, action or request. + * + * Set this to false to use the NewRelic default naming + * scheme, or to set your own in your application. + */ + 'auto_name_transactions' => true, - /* - * Define the name used when automatically naming transactions. - * a token string: - * a pattern you define yourself, available tokens: - * {controller} = Controller@action or Closure@path - * {method} = GET / POST / etc. - * {route} = route name if named, otherwise same as {controller} - * {path} = the registered route path (includes variable names) - * {uri} = the actual URI requested - * anything that is not a matched token will remain a string literal - * example: - * "GET /world" with pattern 'hello {path} you really {method} me' would return: - * 'hello /world you really GET me' - */ - 'name_provider' => '{uri} {route}', + /* + * Define the name used when automatically naming transactions. + * a token string: + * a pattern you define yourself, available tokens: + * {controller} = Controller@action or Closure@path + * {method} = GET / POST / etc. + * {route} = route name if named, otherwise same as {controller} + * {path} = the registered route path (includes variable names) + * {uri} = the actual URI requested + * anything that is not a matched token will remain a string literal + * example: + * "GET /world" with pattern 'hello {path} you really {method} me' would return: + * 'hello /world you really GET me' + */ + 'name_provider' => '{uri} {route}', - /* - * Will cause an exception to be thrown if the NewRelic - * PHP agent is not found / installed - */ - 'throw_if_not_installed' => false, + /* + * Will cause an exception to be thrown if the NewRelic + * PHP agent is not found / installed + */ + 'throw_if_not_installed' => false, ); diff --git a/config/poniverse.php b/config/poniverse.php index 15cab0bf..ff60876d 100644 --- a/config/poniverse.php +++ b/config/poniverse.php @@ -1,12 +1,12 @@ 1, - 'urls' => [ - 'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'), - 'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'), - 'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'), - 'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token') - ], - 'client_id' => env('PONI_CLIENT_ID'), - 'secret' => env('PONI_CLIENT_SECRET') + 'version' => 1, + 'urls' => [ + 'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'), + 'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'), + 'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'), + 'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token') + ], + 'client_id' => env('PONI_CLIENT_ID'), + 'secret' => env('PONI_CLIENT_SECRET') ]; diff --git a/database/migrations/2013_09_10_014644_create_latest_column.php b/database/migrations/2013_09_10_014644_create_latest_column.php index d76b3b1c..c33269ad 100644 --- a/database/migrations/2013_09_10_014644_create_latest_column.php +++ b/database/migrations/2013_09_10_014644_create_latest_column.php @@ -11,24 +11,24 @@ class CreateLatestColumn extends Migration }); DB::update(' - UPDATE - tracks - SET - is_latest = true - WHERE - ( - SELECT - t2.id - FROM - (SELECT id, user_id FROM tracks WHERE published_at IS NOT NULL AND deleted_at IS NULL) AS t2 - WHERE - t2.user_id = tracks.user_id - ORDER BY - created_at DESC - LIMIT 1 - ) = tracks.id - AND - published_at IS NOT NULL'); + UPDATE + tracks + SET + is_latest = true + WHERE + ( + SELECT + t2.id + FROM + (SELECT id, user_id FROM tracks WHERE published_at IS NOT NULL AND deleted_at IS NULL) AS t2 + WHERE + t2.user_id = tracks.user_id + ORDER BY + created_at DESC + LIMIT 1 + ) = tracks.id + AND + published_at IS NOT NULL'); } public function down() @@ -37,4 +37,4 @@ class CreateLatestColumn extends Migration $table->dropColumn('is_latest'); }); } -} \ No newline at end of file +} diff --git a/database/migrations/2013_09_24_055911_track_is_listed.php b/database/migrations/2013_09_24_055911_track_is_listed.php index 25d8caa8..75f4b822 100644 --- a/database/migrations/2013_09_24_055911_track_is_listed.php +++ b/database/migrations/2013_09_24_055911_track_is_listed.php @@ -11,10 +11,10 @@ class TrackIsListed extends Migration }); DB::update(' - UPDATE - tracks - SET - is_listed = true'); + UPDATE + tracks + SET + is_listed = true'); } public function down() @@ -23,4 +23,4 @@ class TrackIsListed extends Migration $table->dropColumn('is_listed'); }); } -} \ No newline at end of file +} diff --git a/public/.htaccess b/public/.htaccess index e0f22378..5a35bec2 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -14,10 +14,10 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] - RewriteRule ^(.*\.(?:coffee))$ /asset.php?type=coffee&file=/$1 [L,QSA,NC] - RewriteRule ^(.*\.(?:less))$ /asset.php?type=less&file=/$1 [L,QSA,NC] + RewriteRule ^(.*\.(?:coffee))$ /asset.php?type=coffee&file=/$1 [L,QSA,NC] + RewriteRule ^(.*\.(?:less))$ /asset.php?type=less&file=/$1 [L,QSA,NC]
- Image must be a PNG that is at least 350x350.
-
-
+ Image must be a PNG that is at least 350x350.
+
+
Something went wrong on our servers while we were processing your request. We're really sorry about this, and will work hard to get this resolved as soon as possible.
-In any case, we're sorry this happened. Perhaps you would like to go to our home page?
\ No newline at end of file +Something went wrong on our servers while we were processing your request. We're really sorry about this, and will work hard to get this resolved as soon as possible.
+In any case, we're sorry this happened. Perhaps you would like to go to our home page?
diff --git a/public/templates/favourites/_layout.html b/public/templates/favourites/_layout.html index 5f6096d3..349aaefc 100644 --- a/public/templates/favourites/_layout.html +++ b/public/templates/favourites/_layout.html @@ -1,14 +1,14 @@- $state = {{$state.current.name}} - $stateParams = {{$stateParams}} --
+ $state = {{$state.current.name}} + $stateParams = {{$stateParams}} ++ diff --git a/public/templates/favourites/albums.html b/public/templates/favourites/albums.html index 76f13c39..fb7e2ed1 100644 --- a/public/templates/favourites/albums.html +++ b/public/templates/favourites/albums.html @@ -1,3 +1,3 @@
The pony fan music site. By bronies, for bronies.
-- We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike. -
-- Features include unlimited downloads, unlimited uploads, lossless uploads and much more! Click here for more details! -
+The pony fan music site. By bronies, for bronies.
++ We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike. +
++ Features include unlimited downloads, unlimited uploads, lossless uploads and much more! Click here for more details! +
-Some My Little Pony: Friendship is Magic fans - typically referred to as "bronies" are the musical type, and show their appreciation for the show by pouring their talent into fan music. -
The brony fan music community is diverse, spanning genres from symphonic metal to trance and everything in between. But most importantly, the community creates music.
-A lot of music.
-All this music has to go somewhere. YouTube, SoundCloud, and Bandcamp are popular outlets that many brony musicians use to host their tunes. But no mainstream sites are specifically designed for our fandom's needs, and they're not particularly helpful if, as a listener, you're looking for pony fan music.
-That's where Pony.fm comes in. Pony.fm is a community, hosting service, and music database rolled into one, with a generous dash of pony on top.
+Some My Little Pony: Friendship is Magic fans - typically referred to as "bronies" are the musical type, and show their appreciation for the show by pouring their talent into fan music. +
The brony fan music community is diverse, spanning genres from symphonic metal to trance and everything in between. But most importantly, the community creates music.
+A lot of music.
+All this music has to go somewhere. YouTube, SoundCloud, and Bandcamp are popular outlets that many brony musicians use to host their tunes. But no mainstream sites are specifically designed for our fandom's needs, and they're not particularly helpful if, as a listener, you're looking for pony fan music.
+That's where Pony.fm comes in. Pony.fm is a community, hosting service, and music database rolled into one, with a generous dash of pony on top.
-Eenope!
-Pony.fm is an original project. Although it takes inspiration from a number of well-known services for the general public, Pony.fm is not specifically modeled after any one of them. As a fan site itself, Pony.fm is an experience all its own.
-Simply put, "Pony.fm is Pony.fm."
+Eenope!
+Pony.fm is an original project. Although it takes inspiration from a number of well-known services for the general public, Pony.fm is not specifically modeled after any one of them. As a fan site itself, Pony.fm is an experience all its own.
+Simply put, "Pony.fm is Pony.fm."
-Pony.fm is a service created by bronies, for bronies. Every inch of the Pony.fm experience is crafted with ponies and bronies in mind. Some of the features necessarily resemble what you may find on other sites - lossless uploads, for example - but some features are specific to the pony fan music community.
-Created as a service for the fandom, Pony.fm aims to be the one-stop shop for all things pony music, for artists and listeners alike.
+Pony.fm is a service created by bronies, for bronies. Every inch of the Pony.fm experience is crafted with ponies and bronies in mind. Some of the features necessarily resemble what you may find on other sites - lossless uploads, for example - but some features are specific to the pony fan music community.
+Created as a service for the fandom, Pony.fm aims to be the one-stop shop for all things pony music, for artists and listeners alike.
-MLP Forums and Pony.fm share an owner, and each encompasses a different segment of the global My Little Pony: Friendship is Magic community. Put together, both sites are able to offer a richer "supercommunity" experience than either site could offer on its own.
+MLP Forums and Pony.fm share an owner, and each encompasses a different segment of the global My Little Pony: Friendship is Magic community. Put together, both sites are able to offer a richer "supercommunity" experience than either site could offer on its own.
-Pony.fm was created by Feld0, a pony-loving teenager who heard the call of code. Recognizing the need for a true pony-specific music hosting site, and realizing that MLP Forums provided him with the resources he needed to make it happen, he created a blank text file and started pumping code into his computer.
+Pony.fm was created by Feld0, a pony-loving teenager who heard the call of code. Recognizing the need for a true pony-specific music hosting site, and realizing that MLP Forums provided him with the resources he needed to make it happen, he created a blank text file and started pumping code into his computer.
The site is now maintained by him and Nelson LaQuet as part of the Poniverse network.
-MP3 encoding is "lossy." Lossy means that, during the encoding process, quality gets sacrificed for a decrease in size.
-Pony.fm does not provide only MP3's; it also provides OGG's and lossless FLAC's. Uploading a lossless file puts a "perfect" copy of your track in Pony.fm's file store, which can be offered up for download on its own for audiophiles who like CD or better-than-CD sound quality, but starting from a lossless original also allows Pony.fm to transcode a song to other lossy formats with only one degree of loss.
+ +MP3 encoding is "lossy." Lossy means that, during the encoding process, quality gets sacrificed for a decrease in size.
+Pony.fm does not provide only MP3's; it also provides OGG's and lossless FLAC's. Uploading a lossless file puts a "perfect" copy of your track in Pony.fm's file store, which can be offered up for download on its own for audiophiles who like CD or better-than-CD sound quality, but starting from a lossless original also allows Pony.fm to transcode a song to other lossy formats with only one degree of loss.
-Pony.fm accepts a lossless upload, which is converted to FLAC (if it isn't already FLAC) for storage. This leaves a "perfect," unblemished copy of the track in Pony.fm's file store.
-An MP3 file can be created from the FLAC. Minimal quality is lost because creating an MP3 from the FLAC is as good as creating an MP3 directly from your DAW.
-An OGG Vorbis file can be created from the FLAC. Minimal quality is lost because Pony.fm has a lossless copy of the track on file; thus, we don't have the "recompressing a compressed MP3" issue that is present if Pony.fm's "master file" was an MP3.
+Pony.fm accepts a lossless upload, which is converted to FLAC (if it isn't already FLAC) for storage. This leaves a "perfect," unblemished copy of the track in Pony.fm's file store.
+An MP3 file can be created from the FLAC. Minimal quality is lost because creating an MP3 from the FLAC is as good as creating an MP3 directly from your DAW.
+An OGG Vorbis file can be created from the FLAC. Minimal quality is lost because Pony.fm has a lossless copy of the track on file; thus, we don't have the "recompressing a compressed MP3" issue that is present if Pony.fm's "master file" was an MP3.
- -Pony.fm analyzes all uploads to determine their format and check it against a whitelist; the file extension is ignored. Unfortunately, slight variations in AIFF and WAV files exist that need to be individually whitelisted.
-The alpha should have nailed most of these by now, but if there are some that still are not being accepted, contact an admin with the specific file details and they will try to add them to the White List.
+ +Pony.fm analyzes all uploads to determine their format and check it against a whitelist; the file extension is ignored. Unfortunately, slight variations in AIFF and WAV files exist that need to be individually whitelisted.
+The alpha should have nailed most of these by now, but if there are some that still are not being accepted, contact an admin with the specific file details and they will try to add them to the White List.
- -At the top right of your screen there should be a button titled "Upload" next to the "send feedback" one. Select the Upload button and a drop down menu will appear, select the first option titled "Track Uploader". You should now be on a screen displaying the uploader. Select the Green button titled "Add Files" and select your song from your computer. The track should now start its download.
-Please be aware that Pony.fm doesn't support MP3 uploads.
+ +At the top right of your screen there should be a button titled "Upload" next to the "send feedback" one. Select the Upload button and a drop down menu will appear, select the first option titled "Track Uploader". You should now be on a screen displaying the uploader. Select the Green button titled "Add Files" and select your song from your computer. The track should now start its download.
+Please be aware that Pony.fm doesn't support MP3 uploads.
- -Avatars in Pony.fm use a free service called Gravatar. To learn more about it, and setup your own Gravatar account, click here!
+ +Avatars in Pony.fm use a free service called Gravatar. To learn more about it, and setup your own Gravatar account, click here!
- -MLP Forums is one of the web's largest and most well known My Little Pony: Friendship is Magic forum communities. Formally linking the two sites together paves the way for a rich, cross-site community experience. Members of one site can easily jump into the other without the hassle of managing yet another account, and content can seamlessly be brought from MLP Forums to Pony.fm and vice versa in meaningful ways.
+ +MLP Forums is one of the web's largest and most well known My Little Pony: Friendship is Magic forum communities. Formally linking the two sites together paves the way for a rich, cross-site community experience. Members of one site can easily jump into the other without the hassle of managing yet another account, and content can seamlessly be brought from MLP Forums to Pony.fm and vice versa in meaningful ways.
- -At the top of your page should be a nifty little button to the left of the upload button that says "Send Feedback".
-Click this and a form will pop up, just follow the two simple instructions and enter the information needed and click "submit".
-All feedback is greatly appreciated on Pony FM and we do our hardest to keep this site functional and to keep all of you happy.
+ +At the top of your page should be a nifty little button to the left of the upload button that says "Send Feedback".
+Click this and a form will pop up, just follow the two simple instructions and enter the information needed and click "submit".
+All feedback is greatly appreciated on Pony FM and we do our hardest to keep this site functional and to keep all of you happy.
- -The Poniverse is a network that links together several Brony sites ,such as MLP Forums, together to form a super community of sorts that provides sites that satisfy everyone's needs.
-Pony FM is just one of those sites and sets out to provide Brony Musicians with their own special corner to share their work with others and to receive feedback from other musicians, and in lots of cases to form collaborations that can end up in great partnerships.
+ +The Poniverse is a network that links together several Brony sites ,such as MLP Forums, together to form a super community of sorts that provides sites that satisfy everyone's needs.
+Pony FM is just one of those sites and sets out to provide Brony Musicians with their own special corner to share their work with others and to receive feedback from other musicians, and in lots of cases to form collaborations that can end up in great partnerships.
- -You sure can!
-At the bottom left of your screen there is a small button that says Site Stats that's nestled just below a button for Pony.fm Forum.
-Click on the "Site Stats" button and you will be taken to a screen that shows you graphs depicting the number of Track Views, Track Downloads, Track Plays and User Registrations.
+ +You sure can!
+At the bottom left of your screen there is a small button that says Site Stats that's nestled just below a button for Pony.fm Forum.
+Click on the "Site Stats" button and you will be taken to a screen that shows you graphs depicting the number of Track Views, Track Downloads, Track Plays and User Registrations.
- -On each user's screen there is a nifty little section where you can leave comments. This is used best for providing feedback and to show them your support, but if you plan on trying to start a collaboration and would prefer a more private means of communication, underneath the user Bio, there is a "send a message" which will utilise the "Personal Messenger" from MLP Forums to allow you to send a message to that artist.
+ +On each user's screen there is a nifty little section where you can leave comments. This is used best for providing feedback and to show them your support, but if you plan on trying to start a collaboration and would prefer a more private means of communication, underneath the user Bio, there is a "send a message" which will utilise the "Personal Messenger" from MLP Forums to allow you to send a message to that artist.
- -At the current time a report feature isn't quite installed into the site, however, email feld0@pony.fm and he would be glad to handle any moderating issues that you have. But to reiterate what was said before, there IS a report function in the works.
+ +At the current time a report feature isn't quite installed into the site, however, email feld0@pony.fm and he would be glad to handle any moderating issues that you have. But to reiterate what was said before, there IS a report function in the works.
- -Click on the song that you are looking to download and you will notice to the right of the screen is a button titled "Downloads".
-Click this button and you will be brought a drop down menu with FLAC, MP3, OGG, AAC and ALAC file types for you to download.
-Select your preferred file type to start the download and it should all be smooth sailing from there.
-Click on the song that you are looking to download and you will notice to the right of the screen is a button titled "Downloads".
+Click this button and you will be brought a drop down menu with FLAC, MP3, OGG, AAC and ALAC file types for you to download.
+Select your preferred file type to start the download and it should all be smooth sailing from there.
+ + + diff --git a/public/templates/partials/album-share-dialog.html b/public/templates/partials/album-share-dialog.html index 09ba06b2..6db8069e 100644 --- a/public/templates/partials/album-share-dialog.html +++ b/public/templates/partials/album-share-dialog.html @@ -1,13 +1,13 @@Pony.fm was created to organize the My Little Pony community's fan music. The project is maintained by Poniverse, an organization devoted to building and operating fan sites for the pony community.
-Pony.fm would not be possible without the efforts of the open-source community. We thank the following projects, in no particular order, for providing the building blocks for our own.
@@ -42,5 +42,5 @@Drop files here to begin your upload!
-Drop files here to begin your upload!
+FLAC, WAV, and AIFF files will be accepted. Each file can be up to 200 MB in size.
+FLAC, WAV, and AIFF files will be accepted. Each file can be up to 200 MB in size.
-Tracks must be a minimum of 30 seconds long.
+Tracks must be a minimum of 30 seconds long.
-Please note that you need to publish your tracks after uploading them before they will become available to the public.
+Please note that you need to publish your tracks after uploading them before they will become available to the public.
-- - Processing - Uploading - Error - {{upload.name}} - - {{upload.error}} - - - - Publish - - {{upload.name}} - -
- -+ + Processing + Uploading + Error + {{upload.name}} - + {{upload.error}} + + + + Publish + + {{upload.name}} + +
+ +This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/albums/show.blade.php b/resources/views/albums/show.blade.php index ff1c68da..5f7c234c 100644 --- a/resources/views/albums/show.blade.php +++ b/resources/views/albums/show.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/artists/index.blade.php b/resources/views/artists/index.blade.php index efc046b9..c51ce652 100644 --- a/resources/views/artists/index.blade.php +++ b/resources/views/artists/index.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/artists/profile.blade.php b/resources/views/artists/profile.blade.php index ec68134b..5af894d9 100644 --- a/resources/views/artists/profile.blade.php +++ b/resources/views/artists/profile.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index f9b58441..72cc3afa 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 8f70767c..427099a5 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/errors/400.blade.php b/resources/views/errors/400.blade.php index bfc98077..e285d2ba 100644 --- a/resources/views/errors/400.blade.php +++ b/resources/views/errors/400.blade.php @@ -1,12 +1,12 @@ @extends('shared._app_layout') @section('app_content') -Your request was invalid.
+Your request was invalid.
@endsection @section('app_scripts') - -@endsection \ No newline at end of file + +@endsection diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index 3c1d4e61..2acb4622 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -1,12 +1,12 @@ @extends('shared._app_layout') @section('app_content') -You cannot do this.
+You cannot do this.
@endsection @section('app_scripts') - -@endsection \ No newline at end of file + +@endsection diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 05b9d0ed..53d6d4e5 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -1,12 +1,12 @@ @extends('shared._app_layout') @section('app_content') -We could not find what you were looking for.
+We could not find what you were looking for.
@endsection @section('app_scripts') - -@endsection \ No newline at end of file + +@endsection diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php index 809aac05..cecc7832 100644 --- a/resources/views/errors/500.blade.php +++ b/resources/views/errors/500.blade.php @@ -1,12 +1,12 @@ @extends('shared._app_layout') @section('app_content') -There was an error in the server.
+There was an error in the server.
@endsection @section('app_scripts') - -@endsection \ No newline at end of file + +@endsection diff --git a/resources/views/home/index.blade.php b/resources/views/home/index.blade.php index aa6e3cf7..57643d6a 100644 --- a/resources/views/home/index.blade.php +++ b/resources/views/home/index.blade.php @@ -1,12 +1,12 @@ @extends('shared._app_layout') @section('app_content') -The pony fan music site. By bronies, for bronies.
-- We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike. -
-- Features include unlimited downloads, unlimited uploads, lossless uploads and much more! Click here for more details! -
-@endsection \ No newline at end of file +The pony fan music site. By bronies, for bronies.
++ We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike. +
++ Features include unlimited downloads, unlimited uploads, lossless uploads and much more! Click here for more details! +
+@endsection diff --git a/resources/views/pages/about.blade.php b/resources/views/pages/about.blade.php index eb7d6bcb..80edb83e 100644 --- a/resources/views/pages/about.blade.php +++ b/resources/views/pages/about.blade.php @@ -1,5 +1,5 @@ @extends('shared._app_layout') @section('app_content') - {{Helpers::template('pages/about.html')}} -@endsection \ No newline at end of file + {{Helpers::template('pages/about.html')}} +@endsection diff --git a/resources/views/pages/faq.blade.php b/resources/views/pages/faq.blade.php index 00ebfbfa..c7abb588 100644 --- a/resources/views/pages/faq.blade.php +++ b/resources/views/pages/faq.blade.php @@ -1,5 +1,5 @@ @extends('shared._app_layout') @section('app_content') - {{Helpers::template('pages/faq.html')}} -@endsection \ No newline at end of file + {{Helpers::template('pages/faq.html')}} +@endsection diff --git a/resources/views/playlists/index.blade.php b/resources/views/playlists/index.blade.php index 4626fe77..430f584a 100644 --- a/resources/views/playlists/index.blade.php +++ b/resources/views/playlists/index.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/playlists/show.blade.php b/resources/views/playlists/show.blade.php index 51d87fff..0333a696 100644 --- a/resources/views/playlists/show.blade.php +++ b/resources/views/playlists/show.blade.php @@ -1,6 +1,6 @@ @extends('shared._app_layout') @section('app_content') -This page should be what search engines see
-@endsection \ No newline at end of file +This page should be what search engines see
+@endsection diff --git a/resources/views/shared/_app_layout.blade.php b/resources/views/shared/_app_layout.blade.php index 22904a48..47fddc8b 100644 --- a/resources/views/shared/_app_layout.blade.php +++ b/resources/views/shared/_app_layout.blade.php @@ -2,85 +2,85 @@ @section('content') - + - + (function(d, s, id){ + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) {return;} + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/en_US/all.js"; + fjs.parentNode.insertBefore(js, fjs); + }(document, 'script', 'facebook-jssdk')); + -