From bbf05fa6fd60bac856c31d6c071e61ea62c2fd19 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 17 Feb 2015 13:27:30 +0100 Subject: [PATCH] remove smarty-remnant; remove unnecessary variable assignment Signed-off-by: Michael Kaufmann (d00p) --- admin_domains.php | 2 - install/tsmarty2c.php | 124 ------------------------------------------ 2 files changed, 126 deletions(-) delete mode 100755 install/tsmarty2c.php diff --git a/admin_domains.php b/admin_domains.php index facc63b9..06d11d24 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -1862,8 +1862,6 @@ if ($page == 'domains' $ssl_ipsandports[] = array('label' => $row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'] . '
', 'value' => $row_ssl_ipandport['id']); } - $result['specialsettings'] = $result['specialsettings']; - // create serveralias options $serveraliasoptions = ""; $_value = '2'; diff --git a/install/tsmarty2c.php b/install/tsmarty2c.php deleted file mode 100755 index 68dfe350..00000000 --- a/install/tsmarty2c.php +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/php - <..> > smarty.c - * - * If a parameter is a directory, the template files within will be parsed. - * - * @package smarty-gettext - * @version $Id: tsmarty2c.php,v 1.3 2005/07/27 17:59:39 sagi Exp $ - * @link http://smarty-gettext.sf.net/ - * @author Sagi Bashari - * @copyright 2004-2005 Sagi Bashari - */ - -// smarty open tag -$ldq = preg_quote('{'); - -// smarty close tag -$rdq = preg_quote('}'); - -// smarty command -$cmd = preg_quote('t'); - -// extensions of smarty files, used when going through a directory -$extensions = array('tpl'); - -// "fix" string - strip slashes, escape and convert new lines to \n -function fs($str) -{ - $str = stripslashes($str); - $str = str_replace('"', '\"', $str); - $str = str_replace("\n", '\n', $str); - return $str; -} - -// rips gettext strings from $file and prints them in C format -function do_file($file) -{ - $content = @file_get_contents($file); - - if (empty($content)) { - return; - } - - global $ldq, $rdq, $cmd; - - preg_match_all( - "/{$ldq}\s*({$cmd})\s*([^{$rdq}]*){$rdq}([^{$ldq}]*){$ldq}\/\\1{$rdq}/", - $content, - $matches - ); - - for ($i=0; $i < count($matches[0]); $i++) { - // TODO: add line number - echo "/* $file */\n"; // credit: Mike van Lammeren 2005-02-14 - - if (preg_match('/plural\s*=\s*["\']?\s*(.[^\"\']*)\s*["\']?/', $matches[2][$i], $match)) { - echo 'ngettext("'.fs($matches[3][$i]).'","'.fs($match[1]).'",x);'."\n"; - } else { - echo 'gettext("'.fs($matches[3][$i]).'");'."\n"; - } - - echo "\n"; - } -} - -// go through a directory -function do_dir($dir) -{ - $d = dir($dir); - - while (false !== ($entry = $d->read())) { - if ($entry == '.' || $entry == '..') { - continue; - } - - $entry = $dir.'/'.$entry; - - if (is_dir($entry)) { // if a directory, go through it - do_dir($entry); - } else { // if file, parse only if extension is matched - $pi = pathinfo($entry); - - if (isset($pi['extension']) && in_array($pi['extension'], $GLOBALS['extensions'])) { - do_file($entry); - } - } - } - - $d->close(); -} - -for ($ac=1; $ac < $_SERVER['argc']; $ac++) { - if (is_dir($_SERVER['argv'][$ac])) { // go through directory - do_dir($_SERVER['argv'][$ac]); - } else { // do file - do_file($_SERVER['argv'][$ac]); - } -} - -?>