Errors of the version 1.35.0

Write about issues that you have found.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

Errors of the version 1.35.0

Postby support » 30 Aug 2021, 15:11

Errors of the version 1.35.0
support
Citizen
Citizen
 
Posts: 131
Joined: 28 Dec 2011, 13:14
Reputation point: 0

Re: Errors of the version 1.35.0

Postby rogerbr9999 » 15 Sep 2021, 21:46

sorry for my english ...

I have error - in property show video (youtube) 5 times

And I need to disable the LOAN CALCULATOR
in property . (anyone can help ?)

thanks
rogerbr9999
Stranger
 
Posts: 1
Joined: 15 Sep 2021, 21:37
Reputation point: 0

Re: Errors of the version 1.35.0

Postby andipas » 20 Sep 2021, 11:01

rogerbr9999 wrote:sorry for my english ...

I have error - in property show video (youtube) 5 times

And I need to disable the LOAN CALCULATOR
in property . (anyone can help ?)

thanks


Thanks for the bug found.
To fix in the file - protected\modules\apartments\models\ApartmentVideo.php
replace the code
Code: Select all

        
if (isset($_POST[$className]['video_html']) && $_POST[$className]['video_html']) {
            
$ad->video_html $_POST[$className]['video_html'];
            
$ad->scenario 'video_html';
            if (
$ad->validate(['video_html'])) {
                
$sql 'INSERT INTO {{apartment_video}} (apartment_id, video_file,     video_html, date_updated)
                                VALUES ("' 
$ad->id '", "", "' CHtml::encode($ad->video_html) . '", NOW())';
                
Yii::app()->db->createCommand($sql)->execute();

                if (
issetModule('historyChanges')) {
                    
HistoryChanges::addApartmentInfoToHistory('add_video'$ad->id'create');
                }
                
$ad->video_html '';
            } else {
                return 
false;
            }
        }
 


to this code:
Code: Select all

        
if (isset($_POST[$className]['video_html']) && $_POST[$className]['video_html']) {
            
$ad->video_html $_POST[$className]['video_html'];
            
$ad->scenario 'video_html';
            if (
$ad->validate(['video_html'])) {

                
$isAutoSave Yii::app()->request->getPost('is_auto_save');
                
$keyAutoSave md5($ad->video_html.$ad->id);
                if(
$isAutoSave && Yii::app()->cache->get($keyAutoSave)){
                     return 
true;
                }

                
$sql 'INSERT INTO {{apartment_video}} (apartment_id, video_file,     video_html, date_updated)
                                VALUES ("' 
$ad->id '", "", "' CHtml::encode($ad->video_html) . '", NOW())';
                
Yii::app()->db->createCommand($sql)->execute();

                if (
issetModule('historyChanges')) {
                    
HistoryChanges::addApartmentInfoToHistory('add_video'$ad->id'create');
                }

                if(
$isAutoSave){
                    
Yii::app()->cache->set($keyAutoSave110800);
                }

                
$ad->video_html '';
            } else {
                return 
false;
            }
        }
 


LOAN CALCULATOR can be disabled in the site settings
andipas
Web Developer
Web Developer
 
Posts: 139
Joined: 28 Dec 2011, 22:37
Reputation point: 1


Return to Issues

Who is online

Users browsing this forum: Bing [Bot] and 1 guest