Skip to content

Commit 6a19ff1

Browse files
committed
Upgrade to v2.0.0
1 parent 6977261 commit 6a19ff1

File tree

10 files changed

+34
-19
lines changed

10 files changed

+34
-19
lines changed

admin-js/admin-helpers.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,12 @@ Ember.Handlebars.helper('format-xmarkdown', function(input) {
2525
if (typeof input == 'undefined') return;
2626

2727
var markdown = new Markdown.getSanitizingConverter();
28+
29+
emoji.sheet_path = Exyht.hostnameWithProtocolPort+'/blog/libraries/js/sheet_twitter_72.png';
30+
emoji.use_sheet = true;
31+
// show the short-name as a `title` attribute for css/img emoji
32+
emoji.include_title = true;
33+
emoji.init_env();
34+
2835
return new Ember.Handlebars.SafeString(emoji.replace_colons(markdown.makeHtml(input)));
2936
});

admin-js/admin-router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ model: function()
3131
editPostTrue: function(){
3232
this.transitionTo('typeblogpost');
3333
},
34-
viewComments: function(post){
35-
this.transitionTo('comment', post.id);
34+
viewComments: function(postId){
35+
this.transitionTo('comment', postId);
3636
}
3737
}
3838
});

app/controllers/AdminController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public function uploadImageFunction($path, $saveInDB){
320320
public function uploadImage(){
321321
$response = self::uploadImageFunction('upload_dir', 0);
322322

323-
echo '<script src="'.URL::to('libraries/js/jquery-1.10.2.min.js').'"></script><script>$("#loadingDiv", window.parent.document).hide();$("#feedback", window.parent.document).html("'.addslashes($response['message']).'");$("#imageUrlTextField", window.parent.document).empty().val("'.addslashes($response['imgUrl']).'");</script>';
323+
echo '<script src="'.URL::to('libraries/js/jquery-2.0.0.min.js').'"></script><script>$("#loadingDiv", window.parent.document).hide();$("#feedback", window.parent.document).html("'.addslashes($response['message']).'");$("#imageUrlTextField", window.parent.document).empty().val("'.addslashes($response['imgUrl']).'");</script>';
324324
}
325325
/*
326326
|--------------------------------------------------------------------------

app/controllers/GalleryController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getGalleryImages($from, $to){
4040
public function removeGimg(){
4141
$img_path = strip_tags($_POST['img_path']);
4242
$deleteImage = File::delete('upload_dir/'.$img_path);
43-
43+
4444
if($deleteImage){
4545
return 'Image removed!';
4646
}else{

app/controllers/HomeController.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -471,13 +471,14 @@ private function getPostCommentsFunction($rawPostId, $bool){
471471
if($c->reply_to_id > 0){
472472

473473
$getReplyToComment = Comment::findReplyToComment($c->reply_to_id);
474-
475-
$p_quiz['comments'][$commentkey]['replyToComment'] = array(
476-
"commentHasReply" => true,
477-
"id" => $c->reply_to_id,
478-
"name" => $getReplyToComment->name,
479-
"email" => self::getGravaterUrl($getReplyToComment->email)
480-
);
474+
if($getReplyToComment->status !== 0){
475+
$p_quiz['comments'][$commentkey]['replyToComment'] = array(
476+
"commentHasReply" => true,
477+
"id" => $c->reply_to_id,
478+
"name" => $getReplyToComment->name,
479+
"email" => self::getGravaterUrl($getReplyToComment->email)
480+
);
481+
}
481482
}
482483
}
483484
}

app/controllers/ProfileController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ public function uploadProfileImage()
5454
$response = $AdminController->uploadImageFunction('prof_img_dir', 1);
5555
if(isset($_POST['picType']) && $_POST['picType'] == 1)
5656
{
57-
echo '<script src="'.URL::to('libraries/js/jquery-1.10.2.min.js').'"></script><script>$("#imgLoadingDiv", window.parent.document).hide();$("#imgFeedback", window.parent.document).html("'.addslashes($response['message']).'");$("#profileImageDiv", window.parent.document).attr("src","'.addslashes($response['imgUrl']).'");</script>';
57+
echo '<script src="'.URL::to('libraries/js/jquery-2.0.0.min.js').'"></script><script>$("#imgLoadingDiv", window.parent.document).hide();$("#imgFeedback", window.parent.document).html("'.addslashes($response['message']).'");$("#profileImageDiv", window.parent.document).attr("src","'.addslashes($response['imgUrl']).'");</script>';
5858
}
5959
else
6060
{
61-
echo '<script src="'.URL::to('libraries/js/jquery-1.10.2.min.js').'"></script><script>$("#imgLoadingDiv", window.parent.document).hide();$("#imgFeedback", window.parent.document).html("'.addslashes($response['message']).'");</script>';
61+
echo '<script src="'.URL::to('libraries/js/jquery-2.0.0.min.js').'"></script><script>$("#imgLoadingDiv", window.parent.document).hide();$("#imgFeedback", window.parent.document).html("'.addslashes($response['message']).'");</script>';
6262
}
6363
}
6464
/*

app/models/Comment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public static function findComments($postId)
3434

3535
public static function findReplyToComment($id)
3636
{
37-
return Comment::select('id','name','email')
37+
return Comment::select('id','name','email', 'status')
3838
->where('id', $id)
39-
->whereIn('status', array(1, 2))
39+
->whereIn('status', array(0, 1, 2))
4040
->first();
4141
}
4242
// Count total `new` comments for a single `post`

build/admin-production-app.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ Ember.Handlebars.helper('format-xmarkdown', function(input) {
5454
if (typeof input == 'undefined') return;
5555

5656
var markdown = new Markdown.getSanitizingConverter();
57+
58+
emoji.sheet_path = Exyht.hostnameWithProtocolPort+'/blog/libraries/js/sheet_twitter_72.png';
59+
emoji.use_sheet = true;
60+
// show the short-name as a `title` attribute for css/img emoji
61+
emoji.include_title = true;
62+
emoji.init_env();
63+
5764
return new Ember.Handlebars.SafeString(emoji.replace_colons(markdown.makeHtml(input)));
5865
});
5966
/*
@@ -89,8 +96,8 @@ model: function()
8996
editPostTrue: function(){
9097
this.transitionTo('typeblogpost');
9198
},
92-
viewComments: function(post){
93-
this.transitionTo('comment', post.id);
99+
viewComments: function(postId){
100+
this.transitionTo('comment', postId);
94101
}
95102
}
96103
});

build/admin-production-app.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Exyht",
3-
"version": "1.8.0",
3+
"version": "2.0.0",
44
"author": "Hasib Mahmud",
55
"description": "A blogging software",
66
"keywords": [

0 commit comments

Comments
 (0)