private static function loadContent($key) { $content = self::loadModel("OpenSms_Model_Content", array(0 => $key)); if (self::$contentLoaded) { return $content; } $theme = self::getCurrentTheme(); if ($theme->cms) { foreach ($theme->cms->content as $c) { $con = self::loadModel("OpenSms_Model_Content"); $con->Key = (string) $c->key; $con->Type = (string) $c->type; $con->Host = (string) $c->host; $con->Body = (string) $c->body; $con->Save(); if ($con->Key == $key) { $content = $con; } } } self::$contentLoaded = true; return $content; }