mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-24 11:11:10 +00:00
new functions to get logo
This commit is contained in:
@@ -49,4 +49,23 @@ class Themes_model extends CI_Model {
|
||||
$this->db->where('id', $id);
|
||||
$this->db->update('themes', $data);
|
||||
}
|
||||
|
||||
function get_logo_from_theme($theme, $logo_location) {
|
||||
$clean_theme = $this->security->xss_clean($theme);
|
||||
$clean_location = $this->security->xss_clean($logo_location);
|
||||
|
||||
$sql = "SELECT " . $clean_location . " FROM themes WHERE foldername = '" . $clean_theme . "'";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
if ($query) {
|
||||
$result = $query->row();
|
||||
$value = isset($result->$clean_location) ? $result->$clean_location : null;
|
||||
|
||||
return ($value !== null) ? (string) $value : null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user