Skip to content

Commit

Permalink
Fixed issue: Class CHtml not found after user deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jun 23, 2022
1 parent 8c049fb commit 1857de3
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/Database.php
Expand Up @@ -768,7 +768,7 @@ private function actionUpdateSurveyLocaleSettings($iSurveyID)
if ($oSurvey->save()) {
Yii::app()->setFlashMessage(gT("Survey settings were successfully saved."));
} else {
Yii::app()->setFlashMessage(Chtml::errorSummary($oSurvey, Chtml::tag("p", array('class' => 'strong'), gT("Survey could not be updated, please fix the following error:"))), "error");
Yii::app()->setFlashMessage(CHtml::errorSummary($oSurvey, CHtml::tag("p", array('class' => 'strong'), gT("Survey could not be updated, please fix the following error:"))), "error");
}
}
$oSurvey->refresh();
Expand Down Expand Up @@ -940,7 +940,7 @@ protected function actionUpdateSurveyLocaleSettingsGeneralSettings($iSurveyID)
if ($oSurvey->save()) {
Yii::app()->setFlashMessage(gT("Survey settings were successfully saved."));
} else {
Yii::app()->setFlashMessage(Chtml::errorSummary($oSurvey, Chtml::tag("p", array('class' => 'strong'), gT("Survey could not be updated, please fix the following error:"))), "error");
Yii::app()->setFlashMessage(CHtml::errorSummary($oSurvey, CHtml::tag("p", array('class' => 'strong'), gT("Survey could not be updated, please fix the following error:"))), "error");
}
Yii::app()->end();
}
Expand Down
2 changes: 1 addition & 1 deletion application/core/LimeMailer.php
Expand Up @@ -681,7 +681,7 @@ public function doReplacements($string)
$url = $aReplacements["{$urlPlaceholder}URL"];
$string = str_replace("@@{$urlPlaceholder}URL@@", $url, $string);
if ($this->getIsHtml()) {
$aReplacements["{$urlPlaceholder}URL"] = Chtml::link($url, $url);
$aReplacements["{$urlPlaceholder}URL"] = CHtml::link($url, $url);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion application/extensions/CustomFormatter.php
Expand Up @@ -26,7 +26,7 @@ public function formatLanguageList($value) {
* @return $string
*/
public function formatLongText($value) {
$value = Chtml::encode($value);
$value = CHtml::encode($value);
if(strlen($value) > $this->maxLength) {
$truncated = substr($value, 0, $this->maxLength-3);
return trim($truncated)."...";
Expand Down
Expand Up @@ -8,7 +8,7 @@
<input
type="radio"
name="question[<?= $this->generalOption->name; ?>]"
value="<?= Chtml::encode($option->value); ?>"
value="<?= CHtml::encode($option->value); ?>"
checked="checked"
/>
<?= $option->text; ?>
Expand All @@ -18,7 +18,7 @@
<input
type="radio"
name="question[<?= $this->generalOption->name; ?>]"
value="<?= Chtml::encode($option->value); ?>"
value="<?= CHtml::encode($option->value); ?>"
/>
<?= $option->text; ?>
</label>
Expand Down
Expand Up @@ -8,9 +8,9 @@ class="form-control"
<!-- TODO: Fix weird object reference. -->
<?php foreach ($this->generalOption->formElement->options['options'] as $option) : ?>
<?php if ($this->generalOption->formElement->value == $option->value) : ?>
<option value="<?= Chtml::encode($option->value) ?>" selected="selected"><?= $option->text ?></option>
<option value="<?= CHtml::encode($option->value) ?>" selected="selected"><?= $option->text ?></option>
<?php else : ?>
<option value="<?= Chtml::encode($option->value) ?>"><?= $option->text ?></option>
<option value="<?= CHtml::encode($option->value) ?>"><?= $option->text ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
Expand Up @@ -11,9 +11,9 @@ class="form-control"
>
<?php foreach ($this->generalOption->formElement->options as $option) : ?>
<?php if ($this->generalOption->formElement->value == $option['value']) : ?>
<option value="<?= Chtml::encode($option['value']); ?>" selected="selected"><?= $option['text']; ?></option>
<option value="<?= CHtml::encode($option['value']); ?>" selected="selected"><?= $option['text']; ?></option>
<?php else : ?>
<option value="<?= Chtml::encode($option['value']); ?>"><?= $option['text']; ?></option>
<option value="<?= CHtml::encode($option['value']); ?>"><?= $option['text']; ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
Expand Down
4 changes: 2 additions & 2 deletions application/extensions/GeneralOptionWidget/views/text.php
Expand Up @@ -7,9 +7,9 @@
class="form-control"
name="question[<?= $this->generalOption->name; ?>]"
id="<?= CHtml::getIdByName($this->generalOption->name); ?>"
value="<?= Chtml::encode($this->generalOption->formElement->value); ?>"
value="<?= CHtml::encode($this->generalOption->formElement->value); ?>"
<?= ($this->generalOption->formElement->help) ? 'aria-describedby="help-' . CHtml::getIdByName($this->generalOption->name) . '"' : "" ?>
<?php foreach ($this->generalOption->formElement->options['attributes'] as $attributeName => $attributeValue) echo $attributeName . '="' . Chtml::encode($attributeValue) . '"'; ?>
<?php foreach ($this->generalOption->formElement->options['attributes'] as $attributeName => $attributeValue) echo $attributeName . '="' . CHtml::encode($attributeValue) . '"'; ?>
/>
<?php if (isset($this->generalOption->formElement->options['inputGroup']['suffix'])) : ?>
<div class="input-group-addon">
Expand Down
2 changes: 1 addition & 1 deletion application/extensions/SettingsWidget/SettingsWidget.php
Expand Up @@ -403,7 +403,7 @@ public function renderInfo($name, array $metaData, $form = null)
throw new CException('wrong type' . $name);
}
$htmlOptions = $this->htmlOptions($metaData);
return Chtml::tag('div', $htmlOptions, $value);
return CHtml::tag('div', $htmlOptions, $value);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/globalsettings/_email.php
Expand Up @@ -96,7 +96,7 @@
<div class="form-group">
<label class="control-label" for="sendingrate"><?php eT("Email sending rate:"); ?></label>
<div>
<?php echo Chtml::numberField("sendingrate", App()->getConfig('sendingrate'), array('class' => 'form-control', 'size' => 5, 'min' => 1)); ?>
<?php echo CHtml::numberField("sendingrate", App()->getConfig('sendingrate'), array('class' => 'form-control', 'size' => 5, 'min' => 1)); ?>
<span class="hint"><?php eT("Number of seconds to wait until the next email batch is sent."); ?></span>
</div>
</div>
Expand Down

1 comment on commit 1857de3

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP version ?

Please sign in to comment.