diff --git a/src/common.php b/src/common.php index 2a17453..fdace77 100644 --- a/src/common.php +++ b/src/common.php @@ -66,6 +66,7 @@ class Config 'mysql.db' => array('default'=>'mytinytodo', 'type'=>'s'), 'mysql.user' => array('default'=>'user', 'type'=>'s'), 'mysql.password' => array('default'=>'', 'type'=>'s'), + 'title' => array('default'=>'', 'type'=>'s'), 'lang' => array('default'=>'en', 'type'=>'s'), 'password' => array('default'=>'', 'type'=>'s'), 'allowread' => array('default'=>0, 'type'=>'i'), diff --git a/src/index.php b/src/index.php index e888f19..6ab3a49 100644 --- a/src/index.php +++ b/src/index.php @@ -23,6 +23,10 @@ else $duedateformat = 'yy-mm-dd'; if(!isset($config['firstdayofweek']) || !is_int($config['firstdayofweek']) || $config['firstdayofweek']<0 || $config['firstdayofweek']>6) $config['firstdayofweek'] = 1; +if(isset($config['title']) && $config['title'] != '') $title = htmlarray($config['title']); +else $title = $lang->get('My Tiny Todolist'); + + function __($s) { global $lang; @@ -33,7 +37,7 @@ function __($s) -<?php __('My Tiny Todolist');?> +<?php echo $title; ?> @@ -87,7 +91,7 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
-

+

diff --git a/src/settings.php b/src/settings.php index a9cb936..6a8c66a 100644 --- a/src/settings.php +++ b/src/settings.php @@ -32,6 +32,7 @@ if(isset($_POST['save'])) $config['clock'] = (int)_post('clock'); $config['dateformat'] = _post('dateformat'); $config['dateformatshort'] = _post('dateformatshort'); + $config['title'] = trim(_post('title')); Config::save($config); $t['saved'] = 1; echo json_encode($t); @@ -80,6 +81,11 @@ function selectOptions($a, $value, $default=null) + + + + +
Title:
(specify if you want to change default title)
Language: