Skip to content

Commit cfa222b

Browse files
committed
important bug fix
1 parent 1f0ff53 commit cfa222b

File tree

13 files changed

+30
-27
lines changed

13 files changed

+30
-27
lines changed

app/Controller/ArticlesController.php

+17-14
Original file line numberDiff line numberDiff line change
@@ -443,26 +443,29 @@ public function admin_ajax_related_add()
443443
*/
444444
public function view($slug = null, $id = null)
445445
{
446-
if (empty($slug) && !empty($this->params['slug']))
447-
{
448-
$slug = $this->params['slug'];
449-
}
450-
451-
if (empty($id) && !empty($this->params['id']))
452-
{
453-
$id = $this->params['id'];
454-
}
455-
456-
$this->request->data = $this->Article->find('first', array(
446+
$conditions = array(
457447
'conditions' => array(
458-
'Article.slug' => $slug,
459448
'Article.deleted_time' => '0000-00-00 00:00:00',
460449
'Article.publish_time <=' => date('Y-m-d H:i:s'),
461450
'Article.status' => 1
462451
)
463-
));
452+
);
464453

465-
if (empty($this->request->data))
454+
if (empty($slug) && !empty($this->params['slug']))
455+
{
456+
$slug = $this->params['slug'];
457+
$conditions['conditions']['Article.slug'] = $slug;
458+
}
459+
460+
if (empty($id) && !empty($this->params['id']))
461+
{
462+
$id = $this->params['id'];
463+
$conditions['conditions']['Article.id'] = $id;
464+
}
465+
466+
$this->request->data = $this->Article->find('first', $conditions);
467+
468+
if (empty($slug) || empty($id) || empty($this->request->data))
466469
{
467470
$this->Session->setFlash('Invalid Article', 'flash_error');
468471
$this->redirect(array(

app/Model/Article.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ public function getAllRelatedArticles($data = array(), $loop = false, $categorie
209209
)
210210
));
211211

212-
if (!empty($row['Article']['related_articles']) && empty($loop))
212+
if (empty($loop))
213213
{
214214
$data[$key]['RelatedArticles'] = $this->getRelatedArticles(
215215
$row['Article']['id'],
216-
$row['Article']['related_articles'],
216+
!empty($row['Article']['related_articles']) ? $row['Article']['related_articles'] : array(),
217217
$categories,
218218
$users,
219219
$fields,

app/Old_Plugins/Disqus/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Disqus plugin provides an easy to use helpers so users that use the commenti
44

55
## Installation
66

7-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
7+
To install, first download the zip and unpack the folder 'Disqus' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
88
Simply click that and click continue on the install and enter in your Disqus short name by going to - Admin > Manage Plugins > Disqus Settings.
99

1010
Insert this code where you want comments to appear:

app/Old_Plugins/Facebook/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Facebook Plugin is a cakePHP Plugin made by Nick Baker converted into use wi
44

55
## Installation
66

7-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
7+
To install, first download the zip and unpack the folder 'Facebook' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
88
Simply click that and click continue on the install and everything should be done!
99

1010
In order for it to be used at all, simply create a facebook app [here](https://developers.facebook.com/apps) and copy/paste the credentials into the plugin settings which can be accessed at - Admin > Plugins > Facebook Settings

app/Old_Plugins/GoogleAnalytics/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ After that, you'll have website statistics from the comfort of your site's admin
66

77
## Installation
88

9-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'.
9+
To install, first download the zip and unpack the folder 'GoogleAnalytics' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'.
1010
You should see this plugin listed and an option to install on the right side. Simply click that and click continue on the install and then go to plugins - from there you will need to go to the Google Analytics plugin settings and enter in your credentials and you're all set!
1111

1212
### More Resources

app/Old_Plugins/SupportTicket/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Support Tickets let you use a simple system for users to submit issues on your s
44

55
## Installation
66

7-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
7+
To install, first download the zip and unpack the folder 'SupportTicket' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
88
Simply click that and click continue on the install and everything should be done!
99

1010
### More Resources

app/Plugin/Adaptbb/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AdaptBB is a continuation of the original script, now converted to a plugin. Thi
66

77
The AdaptBB plugin is included and installed by default, but if you delete it manually or picked the no-plugin install, then read below:
88

9-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
9+
To install, first download the zip and unpack the folder 'AdaptBB' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
1010
Simply click that and click continue on the install and everything should be done!
1111

1212
### More Resources

app/Plugin/GoogleMaps/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Google Maps is a powerful feature that lets users easily create highly customiza
66

77
The Google Maps plugin is included and installed by default, but if you delete it manually or picked the no-plugin install, then read below:
88

9-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
9+
To install, first download the zip and unpack the folder 'GoogleMaps' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
1010
Simply click that and click continue on the install and everything should be done! You can access the admin area for maps under the plugins sidebar.
1111

1212
### More Resources

app/Plugin/Links/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Links Plugin, featuring a full admin interface with ability to use t
66

77
The Links plugin is included and installed by default, but if you delete it manually or picked the no-plugin install, then read below:
88

9-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
9+
To install, first download the zip and unpack the folder 'Links' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
1010
Simply click that and click continue on the install and everything should be done!
1111

1212
### More Resources

app/Plugin/Polls/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Polls Plugin, feature a full admin interface and AJAX powered voting
66

77
The Polls plugin is included and installed by default, but if you delete it manually or picked the no-plugin install, then read below:
88

9-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
9+
To install, first download the zip and unpack the folder 'Polls' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
1010
Simply click that and click continue on the install and everything should be done!
1111

1212
### More Resources

app/Plugin/SitemapGenerator/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Sitemap Generator returns from AdaptCMS 2.0, writing links to all public are
66

77
The Sitemap Generator plugin is included and installed by default, but if you delete it manually or picked the no-plugin install, then read below:
88

9-
To install, first download the zip and unpack the folder inside into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
9+
To install, first download the zip and unpack the folder 'SitemapGenerator' into your 'app/Old_Plugins' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Manage Plugins'. You should see this plugin listed and an option to install on the right side.
1010
Simply click that and click continue on the install and everything should be done!
1111

1212
### More Resources

app/View/Old_Themed/Gaming/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ One of the starter themes, this gaming theme allows webmasters to get their gami
66

77
The Gaming theme is included, but if you delete it manually, then read below:
88

9-
To install, first download the zip and unpack the folder inside into your 'app/View/Old_Themed' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Appearance'. You should see this theme listed and an option to install on the right side.
9+
To install, first download the zip and unpack the folder 'Gaming' into your 'app/View/Old_Themed' folder - be sure to chmod this new folder to 755. Then login into your admin panel and click on 'Appearance'. You should see this theme listed and an option to install on the right side.
1010
Simply click that and click continue on the install and everything should be done!
1111

1212
### More Resources

app/webroot/installer/View/finish.ctp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</li>
1313
</ul>
1414

15-
<p>For security purposes, please chmod the following files to <strong>644</strong>:</p>
15+
<p>Please login to your admin panel and then afterwards, for security purposes, please chmod the following files to <strong>644</strong>:</p>
1616

1717
<p>
1818
<div class="alert alert-info">

0 commit comments

Comments
 (0)