[geeklog-cvs] geeklog: Changed sort_order for the search options and added the...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Feb 3 05:13:56 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/237435f67e18
changeset: 6760:237435f67e18
user:      Dirk Haun <dirk at haun-online.de>
date:      Tue Feb 03 11:11:23 2009 +0100
description:
Changed sort_order for the search options and added them to the update

diffstat:

3 files changed, 67 insertions(+), 18 deletions(-)
public_html/admin/install/config-install.php |   29 +++++++++++++-------------
sql/updates/mssql_1.5.2_to_1.6.0.php         |   28 +++++++++++++++++++++++--
sql/updates/mysql_1.5.2_to_1.6.0.php         |   28 +++++++++++++++++++++++--

diffs (137 lines):

diff -r 4a25081c5db9 -r 237435f67e18 public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php	Tue Feb 03 10:00:40 2009 +0100
+++ b/public_html/admin/install/config-install.php	Tue Feb 03 11:11:23 2009 +0100
@@ -82,20 +82,21 @@
     $c->add('mysqldump_path','/usr/bin/mysqldump','text',0,5,NULL,175,TRUE);
     $c->add('mysqldump_options','-Q','text',0,5,NULL,180,TRUE);
 
+    // squeeze search options between 640 (lastlogin) and 680 (loginrequired)
     $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE);
-    $c->add('search_style','google','select',0,6,19,650,TRUE);
-    $c->add('search_limits','10,15,25,30','text',0,6,NULL,660,TRUE);
-    $c->add('num_search_results',30,'text',0,6,NULL,670,TRUE);
-    $c->add('search_show_limit',TRUE,'select',0,6,1,680,TRUE);
-    $c->add('search_show_sort',TRUE,'select',0,6,1,690,TRUE);
-    $c->add('search_show_num',TRUE,'select',0,6,1,700,TRUE);
-    $c->add('search_show_type',TRUE,'select',0,6,1,710,TRUE);
-    $c->add('search_show_user',TRUE,'select',0,6,1,720,TRUE);
-    $c->add('search_show_hits',TRUE,'select',0,6,1,730,TRUE);
-    $c->add('search_no_data','<i>Not available...</i>','text',0,6,NULL,740,TRUE);
-    $c->add('search_separator',' > ','text',0,6,NULL,750,TRUE);
-    $c->add('search_def_keytype','phrase','select',0,6,20,760,TRUE);
-    $c->add('search_use_fulltext',FALSE,'hidden',0,6);
+    $c->add('search_style','google','select',0,6,19,642,TRUE);
+    $c->add('search_limits','10,15,25,30','text',0,6,NULL,645,TRUE);
+    $c->add('num_search_results',30,'text',0,6,NULL,648,TRUE);
+    $c->add('search_show_limit',TRUE,'select',0,6,1,651,TRUE);
+    $c->add('search_show_sort',TRUE,'select',0,6,1,654,TRUE);
+    $c->add('search_show_num',TRUE,'select',0,6,1,657,TRUE);
+    $c->add('search_show_type',TRUE,'select',0,6,1,660,TRUE);
+    $c->add('search_show_user',TRUE,'select',0,6,1,663,TRUE);
+    $c->add('search_show_hits',TRUE,'select',0,6,1,666,TRUE);
+    $c->add('search_no_data','<i>Not available...</i>','text',0,6,NULL,669,TRUE);
+    $c->add('search_separator',' > ','text',0,6,NULL,672,TRUE);
+    $c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE);
+    $c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678
 
     // Subgroup: Stories and Trackback
     $c->add('sg_stories', NULL, 'subgroup', 1, 0, NULL, 0, TRUE);
@@ -302,7 +303,7 @@
     $c->add('cookiesecure',FALSE,'select',7,30,1,630,TRUE);
 
     $c->add('fs_misc', NULL, 'fieldset', 7, 31, NULL, 0, TRUE);
-    $c->add('pdf_enabled',0,'select',7,31,0,660,TRUE);
+    $c->add('pdf_enabled',0,'select',7,31,0,795,TRUE);
     $c->add('notification',array(),'%text',7,31,NULL,800,TRUE);
     $c->add('cron_schedule_interval',86400,'text',7,31,NULL,860,TRUE);
     $c->add('disable_autolinks',0,'select',7,31,0,1750,TRUE);
diff -r 4a25081c5db9 -r 237435f67e18 sql/updates/mssql_1.5.2_to_1.6.0.php
--- a/sql/updates/mssql_1.5.2_to_1.6.0.php	Tue Feb 03 10:00:40 2009 +0100
+++ b/sql/updates/mssql_1.5.2_to_1.6.0.php	Tue Feb 03 11:11:23 2009 +0100
@@ -14,15 +14,39 @@
  */
 function update_ConfValues()
 {
-    global $_CONF;
+    global $_CONF, $_TABLES;
 
     require_once $_CONF['path_system'] . 'classes/config.class.php';
 
+    // move pdf_enabled option to make room for new search options
+    DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 795 WHERE sort_order = 660");
+    // move num_search_results options
+    DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 648 WHERE sort_order = 670");
+    // change default for num_search_results
+    $thirty = addslashes(serialize(30));
+    DB_query("UPDATE {$_TABLES['conf_values']} SET value = '$thirty', default_value = '$thirty' WHERE name = 'num_search_results'");
+
     $c = config::get_instance();
 
-    // new option
+    // new options
     $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE);
     $c->add('advanced_html',array ('img' => array('width' => 1, 'height' => 1, 'src' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'alt' => 1)),'**placeholder',7,34,NULL,1721,TRUE);
+
+    // squeeze search options between 640 (lastlogin) and 680 (loginrequired)
+    $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE);
+    $c->add('search_style','google','select',0,6,19,642,TRUE);
+    $c->add('search_limits','10,15,25,30','text',0,6,NULL,645,TRUE);
+    // see above: $c->add('num_search_results',30,'text',0,6,NULL,648,TRUE);
+    $c->add('search_show_limit',TRUE,'select',0,6,1,651,TRUE);
+    $c->add('search_show_sort',TRUE,'select',0,6,1,654,TRUE);
+    $c->add('search_show_num',TRUE,'select',0,6,1,657,TRUE);
+    $c->add('search_show_type',TRUE,'select',0,6,1,660,TRUE);
+    $c->add('search_show_user',TRUE,'select',0,6,1,663,TRUE);
+    $c->add('search_show_hits',TRUE,'select',0,6,1,666,TRUE);
+    $c->add('search_no_data','<i>Not available...</i>','text',0,6,NULL,669,TRUE);
+    $c->add('search_separator',' > ','text',0,6,NULL,672,TRUE);
+    $c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE);
+    $c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678
 
     return true;
 }
diff -r 4a25081c5db9 -r 237435f67e18 sql/updates/mysql_1.5.2_to_1.6.0.php
--- a/sql/updates/mysql_1.5.2_to_1.6.0.php	Tue Feb 03 10:00:40 2009 +0100
+++ b/sql/updates/mysql_1.5.2_to_1.6.0.php	Tue Feb 03 11:11:23 2009 +0100
@@ -15,15 +15,39 @@
  */
 function update_ConfValues()
 {
-    global $_CONF;
+    global $_CONF, $_TABLES;
 
     require_once $_CONF['path_system'] . 'classes/config.class.php';
 
+    // move pdf_enabled option to make room for new search options
+    DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 795 WHERE sort_order = 660");
+    // move num_search_results options
+    DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 648 WHERE sort_order = 670");
+    // change default for num_search_results
+    $thirty = addslashes(serialize(30));
+    DB_query("UPDATE {$_TABLES['conf_values']} SET value = '$thirty', default_value = '$thirty' WHERE name = 'num_search_results'");
+
     $c = config::get_instance();
 
-    // new option
+    // new options
     $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE);
     $c->add('advanced_html',array ('img' => array('width' => 1, 'height' => 1, 'src' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'alt' => 1)),'**placeholder',7,34,NULL,1721,TRUE);
+
+    // squeeze search options between 640 (lastlogin) and 680 (loginrequired)
+    $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE);
+    $c->add('search_style','google','select',0,6,19,642,TRUE);
+    $c->add('search_limits','10,15,25,30','text',0,6,NULL,645,TRUE);
+    // see above: $c->add('num_search_results',30,'text',0,6,NULL,648,TRUE);
+    $c->add('search_show_limit',TRUE,'select',0,6,1,651,TRUE);
+    $c->add('search_show_sort',TRUE,'select',0,6,1,654,TRUE);
+    $c->add('search_show_num',TRUE,'select',0,6,1,657,TRUE);
+    $c->add('search_show_type',TRUE,'select',0,6,1,660,TRUE);
+    $c->add('search_show_user',TRUE,'select',0,6,1,663,TRUE);
+    $c->add('search_show_hits',TRUE,'select',0,6,1,666,TRUE);
+    $c->add('search_no_data','<i>Not available...</i>','text',0,6,NULL,669,TRUE);
+    $c->add('search_separator',' > ','text',0,6,NULL,672,TRUE);
+    $c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE);
+    $c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678
 
     return true;
 }



More information about the geeklog-cvs mailing list