mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#4527 SEO optimise for openclassify.com (ahrefs.com)
This commit is contained in:
parent
b3a715c7dd
commit
e8533fc309
@ -436,13 +436,6 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function authControl()
|
|
||||||
{
|
|
||||||
if (!Auth::user()) {
|
|
||||||
redirect('/login?redirect=' . url()->current())->send();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function currentAds() {
|
public function currentAds() {
|
||||||
return $this->whereDate('finish_at', '>=', date("Y-m-d H:i:s"))
|
return $this->whereDate('finish_at', '>=', date("Y-m-d H:i:s"))
|
||||||
->where('status', '=', 'approved')
|
->where('status', '=', 'approved')
|
||||||
|
|||||||
@ -70,8 +70,6 @@ interface AdvInterface extends EntryInterface
|
|||||||
|
|
||||||
public function getRecommended($id);
|
public function getRecommended($id);
|
||||||
|
|
||||||
public function authControl();
|
|
||||||
|
|
||||||
public function inStock();
|
public function inStock();
|
||||||
|
|
||||||
public function getCity();
|
public function getCity();
|
||||||
|
|||||||
@ -711,9 +711,7 @@ class AdvsController extends PublicController
|
|||||||
public function deleteAd(AdvRepositoryInterface $advs, $id)
|
public function deleteAd(AdvRepositoryInterface $advs, $id)
|
||||||
{
|
{
|
||||||
$ad = $this->adv_model->find($id);
|
$ad = $this->adv_model->find($id);
|
||||||
if (!Auth::user()) {
|
$this->middleware('auth');
|
||||||
redirect('/login?redirect=' . url()->current())->send();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ad->created_by_id != Auth::id()) {
|
if ($ad->created_by_id != Auth::id()) {
|
||||||
$this->messages->error(trans('visiosoft.module.advs::message.delete_author_error'));
|
$this->messages->error(trans('visiosoft.module.advs::message.delete_author_error'));
|
||||||
@ -745,9 +743,7 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
public function create(AdvFormBuilder $formBuilder, CategoryRepositoryInterface $repository)
|
public function create(AdvFormBuilder $formBuilder, CategoryRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
if (!Auth::user()) {
|
$this->middleware('auth');
|
||||||
redirect('/login?redirect=' . url()->current())->send();
|
|
||||||
}
|
|
||||||
|
|
||||||
$isActive = new AdvModel();
|
$isActive = new AdvModel();
|
||||||
$cats = $this->request->toArray();
|
$cats = $this->request->toArray();
|
||||||
@ -1059,9 +1055,7 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
public function cats()
|
public function cats()
|
||||||
{
|
{
|
||||||
if (!Auth::user()) {
|
$this->middleware('auth');
|
||||||
redirect('/login?redirect=' . url()->current())->send();
|
|
||||||
}
|
|
||||||
$main_cats = $this->category_repository->getMainCategories();
|
$main_cats = $this->category_repository->getMainCategories();
|
||||||
|
|
||||||
return $this->view->make('visiosoft.module.advs::new-ad/post-cat', compact('main_cats'));
|
return $this->view->make('visiosoft.module.advs::new-ad/post-cat', compact('main_cats'));
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
$('.categories-list .show-all').on('click', function () {
|
$('.categories-list .show-all').on('click', function () {
|
||||||
$(this).siblings('.hidden-category').toggleClass('hidden')
|
$(this).siblings('.hidden-category').toggleClass('hidden')
|
||||||
$(this).find('a span').toggleClass('hidden')
|
$(this).find('a span').toggleClass('hidden')
|
||||||
})
|
});
|
||||||
|
|||||||
@ -34,10 +34,7 @@ class MyProfileController extends PublicController
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
if (!Auth::user()) {
|
$this->middleware('auth');
|
||||||
redirect('/login?redirect=' . url()->current())->send();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->adressRepository = $adressRepository;
|
$this->adressRepository = $adressRepository;
|
||||||
$this->userRepository = $userRepository;
|
$this->userRepository = $userRepository;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user