public function checkName($name) { if (empty($name)) { throw new Exception(Piwik::translate("General_PleaseSpecifyValue", "name")); } if (Common::mb_strlen($name) > 100) { throw new Exception(Piwik::translate("CustomAlerts_ParmeterIsTooLong", array(Piwik::translate('General_Name'), 100))); } }
/** * @param $word * @return string */ private function truncateWordIfNeeded($word) { $word = Common::unsanitizeInputValue($word); if (Common::mb_strlen($word) > $this->truncatingLimit) { return Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...'; } return $word; }
/** * @param $word * @return string */ private function truncateWordIfNeeded($word) { if (Common::mb_strlen($word) > $this->truncatingLimit) { return Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...'; } return $word; }