Merge pull request #30 from openclassify/vedat

Class Package model does not exist fix
This commit is contained in:
Fatih Alp 2019-07-08 14:26:27 +03:00 committed by GitHub
commit b0f7313ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -314,8 +314,7 @@ class AdvsController extends PublicController
CategoryRepositoryInterface $categoryRepository,
Dispatcher $events,
AdvModel $advModel,
CategoryModel $categoryModel,
AdModel $StoreAdModel
CategoryModel $categoryModel
)
{
if (!Auth::user()) {
@ -341,6 +340,7 @@ class AdvsController extends PublicController
}
if ($advModel->is_enabled('store') and $adv->slug == "") {
$StoreAdModel = new AdModel();
if ($request->store != "0" and $request->store != null) {
$StoreAdModel->createStoreAdLoggedInUser($request->store, $request->update_id);
}
@ -499,8 +499,7 @@ class AdvsController extends PublicController
AdvFormBuilder $advFormBuilder,
AdvRepositoryInterface $advRepository,
CategoryRepositoryInterface $categoryRepository,
AdvModel $advModel,
UserModel $StoreUserModel
AdvModel $advModel
)
{
$nameField = HTMLDomParser::str_get_html($advFormBuilder->render($id)->getContent());

View File

@ -238,7 +238,7 @@ class MyProfileController extends PublicController
}
}
public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel, PackageModel $packageModel)
public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel)
{
$ad = $advModel->getAdv($id);
$auto_approved = $settings->value('visiosoft.module.advs::auto_approve');
@ -252,6 +252,7 @@ class MyProfileController extends PublicController
$advModel->publish_at_Ads($id);
if ($ad->finish_at == NULL AND $type == "approved") {
if ($advModel->is_enabled('packages')) {
$packageModel = new PackageModel();
$published_time = $packageModel->reduceTimeLimit($ad->cat1);
if($published_time != null)
{