Skip to content

Commit

Permalink
refs #1613 : bugfix : private line function does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Oct 8, 2012
1 parent ca79cae commit cbae70b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions interface/blog/line.php
Expand Up @@ -10,11 +10,13 @@
'key' => array('string','default'=>''),
'mode' => array('string','default'=>'url'),
'content' => array('string','default'=>''),
'category' => array('string','default'=>'public'),
'page' => array('int',1,'default'=>'')
),
'POST' => array(
'key' => array('string','default'=>''),
'mode' => array('string','default'=>'url'),
'category' => array('string','default'=>'public'),
'content' => array('string','default'=>'')
)
);
Expand All @@ -28,10 +30,12 @@
$key = null;
}
$content = $_POST['content'];
$category = $_POST['category'];
$mode = $_POST['mode'];
} else {
$key = $_GET['key'];
$content = $_GET['content'];
$category = $_GET['category'];
$mode = $_GET['mode'];
}

Expand All @@ -42,6 +46,7 @@
$password = Setting::getBlogSetting('LinePassword', null, true);
if(($password === $key) || doesHaveOwnership()) {
$lineobj->content = $content;
$lineobj->category = $category;
$result = $lineobj->add();
fireEvent('AddLine',$result, $lineobj);
$cache = pageCache::getInstance();
Expand Down
8 changes: 5 additions & 3 deletions interface/owner/entry/line/index.php
Expand Up @@ -41,6 +41,7 @@
$conditions['blogid'] = getBlogId();
$conditions['page'] = $_GET['page'];
if(isset($_GET['category'])) $conditions['category'] = $_GET['category'];
if(isset($_POST['category'])) $conditions['category'] = $_POST['category'];
if(isset($_POST['search'])) $conditions['keyword'] = $_POST['search'];
$conditions['linesforpage'] = 15;

Expand Down Expand Up @@ -98,8 +99,9 @@ function getMoreContent(page,lines,mode) {
PM.addRequest(request, "<?php echo _t('라인을 불러오고 있습니다.');?>");
request.send("page="+page
+"&lines="+lines<?php
if(isset($conditions['category'])) echo '+"&category="+'.$conditions['category'];
if(isset($conditions['keyword'])) echo '+"&keyword='.htmlspecialchars($searchKeyword).'"';?>);
if(isset($conditions['category'])) echo '+"&category='.$conditions['category'].'"';
if(isset($conditions['keyword'])) echo '+"&keyword='.htmlspecialchars($searchKeyword).'"';
?>);
}

function updateList(contentView, buttonView, position) {
Expand Down Expand Up @@ -131,7 +133,7 @@ function writeLine() {
alert("<?php echo _t('라인을 저장할 수 없었습니다.');?>");
}
PM.addRequest(request, "<?php echo _t('라인을 저장하고 있습니다.');?>");
request.send("content="+content+"&mode=ajax");
request.send("content="+content+"&category=<?php echo $conditions['category'];?>&mode=ajax");
}
//]]>
</script>
Expand Down

0 comments on commit cbae70b

Please sign in to comment.