From fb951546d0e88063b8bb4cfb986bd12bea33f58b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 29 Oct 2015 10:30:15 -0200 Subject: Custom common methods --- template.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'template.php') diff --git a/template.php b/template.php index 35c4f64..96cf2f6 100644 --- a/template.php +++ b/template.php @@ -3,7 +3,7 @@ require_once("common_methods.php"); -switch (get_drupal_version()) { +switch (nuvemdario_get_drupal_version()) { case 5: require_once("drupal5_theme_methods.php"); break; @@ -19,22 +19,20 @@ switch (get_drupal_version()) { /* Common methods */ -/* -function get_drupal_version() { +function nuvemdario_get_drupal_version() { $tok = strtok(VERSION, '.'); //return first part of version number return (int)$tok[0]; } -function get_page_language($language) { +function nuvemdario_get_page_language($language) { if (get_drupal_version() >= 6) return $language->language; return $language; } -function get_full_path_to_theme() { +function nuvemdario_get_full_path_to_theme() { return base_path().path_to_theme(); } -*/ function get_nuvemdario_drupal_view() { if (get_drupal_version() == 7) @@ -55,7 +53,7 @@ class nuvemdario_view_drupal56 { $$name = & $vars[$name]; ?> -dir)) { echo 'dir="'.$language->dir.'"'; }?> > +dir)) { echo 'dir="'.$language->dir.'"'; }?> > <?php if (isset($head_title )) { echo $head_title; } ?> -- cgit v1.2.3