Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into 1.10.x

1.10.x
Angel Fernando Quiroz Campos 8 years ago
commit a69b68c5bd
  1. 5
      documentation/optimization.html
  2. 14
      main/inc/lib/pdf.lib.php
  3. 2
      main/inc/lib/template.lib.php
  4. 4
      main/template/default/mail/header.tpl

@ -351,9 +351,10 @@ alter table c_quiz_rel_question ADD INDEX idx_cqrq_qid (question_id);
alter table c_quiz_rel_question ADD INDEX idx_cqrq_cid (c_id);
alter table c_quiz_answer add index idx_qa_cidqid (c_id, question_id);
</pre>
In Chamilo 1.10.6, an additional query was confirmed to still have effect a considerable effect:
In Chamilo 1.10.6, two additional queries were confirmed to still have effect a considerable effect:
<pre>
alter table c_quiz_question_rel_category add index idx_qqrc_qid (question_id);
ALTER TABLE c_quiz_question_rel_category ADD INDEX idx_qqrc_qid (question_id);
ALTER TABLE c_lp_item_view ADD INDEX idx_clpiv_c_i_v (c_id, id, view_count);
</pre>
<hr />
<h2><a name="3.Indexes-caching"></a>3. Indexes caching</h2>

@ -87,16 +87,22 @@ class PDF
} else {
$tpl = $this->template;
}
// Assignments
$theme = api_get_visual_theme();
// Assignments
$tpl->assign('pdf_content', $content);
$organization = api_get_setting('Institution');
$img = api_get_path(SYS_CSS_PATH).'themes/'.api_get_visual_theme().'/images/header-logo.png';
$img = api_get_path(SYS_CSS_PATH).'themes/' . $theme . '/images/header-logo.png';
$customImg = api_get_path(SYS_PUBLIC_PATH).'css/themes/' . $theme . '/images/header-logo-custom.png';
// Search for classic logo
if (file_exists($img)) {
$img = api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/images/header-logo.png';
if (file_exists($customImg)) {
$img = api_get_path(WEB_CSS_PATH).'themes/' . $theme . '/images/header-logo-custom.png';
$organization = "<img src='$img'>";
} else if (file_exists($img)) {
$img = api_get_path(WEB_CSS_PATH).'themes/' . $theme . '/images/header-logo.png';
$organization = "<img src='$img'>";
} else {
// Just use the platform title.

@ -114,6 +114,7 @@ class Template
$this->twig->addFilter('get_path', new Twig_Filter_Function('api_get_path'));
$this->twig->addFilter('get_setting', new Twig_Filter_Function('api_get_setting'));
$this->twig->addFilter('var_dump', new Twig_Filter_Function('var_dump'));
$this->twig->addFilter('return_logo', new Twig_Filter_Function('return_logo'));
$this->twig->addFilter('return_message', new Twig_Filter_Function('Display::return_message_and_translate'));
$this->twig->addFilter('display_page_header', new Twig_Filter_Function('Display::page_header_and_translate'));
$this->twig->addFilter(
@ -209,6 +210,7 @@ class Template
{
return Display::return_icon($image, $name, array(), $size);
}
/**
* @param string $timestamp
* @param string $format

@ -1,9 +1,7 @@
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td width="245">
<a href="{{ _p.web }}">
<img src="{{ _p.web_css_theme ~ 'images/header-logo.png' }}" alt="{{ _s.site_name }}">
</a>
{{ css_styles | return_logo }}
</td>
<td width="100%">
&nbsp;

Loading…
Cancel
Save