Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Anderson Grüdtner Martins committed Sep 10, 2014
1 parent 8c1195c commit f591f2e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/admin/controllers/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ public function save()

$row->bind($post);

$text = JRequest::getVar('description_1', '', 'post', 'string', JREQUEST_ALLOWRAW);
$text = str_replace('<br>', '<br />', $text);
$pattern = '#<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';
$tagPos = preg_match($pattern, $text);
$text = JRequest::getVar('description_1', '', 'post', 'string', JREQUEST_ALLOWRAW);
$text = str_replace('<br>', '<br />', $text);
$pattern = '#<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';
$tagPos = preg_match($pattern, $text);
if ($tagPos == 0) {
$row->brief = $text;
$row->description_1 = "";
} else {
list($row->brief, $row->description_1) = preg_split($pattern, $text, 2);
}

$text = JRequest::getVar('description_2', '', 'post', 'string', JREQUEST_ALLOWRAW);
$text = str_replace('<br>', '<br />', $text);
$text = JRequest::getVar('description_2', '', 'post', 'string', JREQUEST_ALLOWRAW);
$text = str_replace('<br>', '<br />', $text);
$row->description_2 = $text;
$text = JRequest::getVar('description_3', '', 'post', 'string', JREQUEST_ALLOWRAW);
$text = str_replace('<br>', '<br />', $text);
$text = JRequest::getVar('description_3', '', 'post', 'string', JREQUEST_ALLOWRAW);
$text = str_replace('<br>', '<br />', $text);
$row->description_3 = $text;
$row->show_email = isset($row->show_email);
$row->show_email = isset($row->show_email);
$row->require_email = isset($row->require_email);
$row->require_agree = isset($row->require_agree);

$file = JRequest::getVar("file", '', "files");
$file["name"] = JFile::makeSafe($file["name"]);
$file = JRequest::getVar("file", '', "files");
$file["name"] = JFile::makeSafe($file["name"]);

if (isset($file["name"]) && $file["name"]) {
if ($post["old_file"] && JFile::exists(JPath::clean(JPATH_SITE."/media"."/OSDownloads/".$post["old_file"]))) {
Expand Down

0 comments on commit f591f2e

Please sign in to comment.