[pLog-svn] r1217 - in plog/trunk: class/view/admin templates/admin
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sat Feb 26 21:50:34 GMT 2005
Author: oscar
Date: 2005-02-26 21:50:33 +0000 (Sat, 26 Feb 2005)
New Revision: 1217
Modified:
plog/trunk/class/view/admin/adminglobalsettingslistview.class.php
plog/trunk/templates/admin/globalsettings_general.template
Log:
solved issue 268. Now admin users need to know the real blog id, instead of easily finding it via the drop-down list. The best way would of course be to show a chooser in a pop-up window but I have no time for that. This will have to do.
Modified: plog/trunk/class/view/admin/adminglobalsettingslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminglobalsettingslistview.class.php 2005-02-26 21:47:05 UTC (rev 1216)
+++ plog/trunk/class/view/admin/adminglobalsettingslistview.class.php 2005-02-26 21:50:33 UTC (rev 1217)
@@ -1,53 +1,48 @@
-<?php
-
- include_once( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
- include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-
- /**
- * shows a list with all the global parameters
- */
- class AdminGlobalSettingsListView extends AdminTemplatedView
- {
- var $_section;
-
- // list with the defined sections
-
- function AdminGlobalSettingsListView( $blogInfo, $section = "all" )
- {
- $this->AdminTemplatedView( $blogInfo, "globalsettings" );
-
- $this->_section = $section;
-
- // array with the defined sections
- $this->_sections = Array( "general", "summary", "templates", "url", "email",
- "uploads", "helpers", "interfaces", "security",
- "bayesian", "resources", "search" );
- }
-
- function render()
- {
- // if the section is not correct, then use the default "general"
- if( !in_array( $this->_section, $this->_sections ))
- $this->_section = "general";
-
- // export all the config parameters
- $config =& Config::getConfig();
- $settings = $config->getAsArray();
- $this->setValue( "settings", $settings );
- foreach( $settings as $key => $value ) {
- $this->setValue( $key, $value );
- }
-
- // list with all the blogs
- $blogs = new Blogs();
- $siteBlogs = $blogs->getAllBlogs();
- $this->setValue( "siteblogs", $siteBlogs );
-
- // set the section too
- $this->setValue( "section", $this->_section );
-
- parent::render();
- }
- }
+<?php
+
+ include_once( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+ include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+
+ /**
+ * shows a list with all the global parameters
+ */
+ class AdminGlobalSettingsListView extends AdminTemplatedView
+ {
+ var $_section;
+
+ // list with the defined sections
+
+ function AdminGlobalSettingsListView( $blogInfo, $section = "all" )
+ {
+ $this->AdminTemplatedView( $blogInfo, "globalsettings" );
+
+ $this->_section = $section;
+
+ // array with the defined sections
+ $this->_sections = Array( "general", "summary", "templates", "url", "email",
+ "uploads", "helpers", "interfaces", "security",
+ "bayesian", "resources", "search" );
+ }
+
+ function render()
+ {
+ // if the section is not correct, then use the default "general"
+ if( !in_array( $this->_section, $this->_sections ))
+ $this->_section = "general";
+
+ // export all the config parameters
+ $config =& Config::getConfig();
+ $settings = $config->getAsArray();
+ $this->setValue( "settings", $settings );
+ foreach( $settings as $key => $value ) {
+ $this->setValue( $key, $value );
+ }
+
+ // set the section too
+ $this->setValue( "section", $this->_section );
+
+ parent::render();
+ }
+ }
?>
\ No newline at end of file
Modified: plog/trunk/templates/admin/globalsettings_general.template
===================================================================
--- plog/trunk/templates/admin/globalsettings_general.template 2005-02-26 21:47:05 UTC (rev 1216)
+++ plog/trunk/templates/admin/globalsettings_general.template 2005-02-26 21:50:33 UTC (rev 1217)
@@ -93,11 +93,7 @@
<div class="field">
<label for="config[default_blog_id]">default_blog_id</label>
<div class="formHelp">{$locale->tr("help_default_blog_id")}</div>
- <select name="config[default_blog_id]" id="config[default_blog_id]">
- {foreach from=$siteblogs item=siteblog}
- <option value="{$siteblog->getId()}" {if $default_blog_id == $siteblog->getId()} selected="selected" {/if} />{$siteblog->getBlog()}</option>
- {/foreach}
- </select>
+ <input type="text" class="text" value="{$default_blog_id}" />
</div>
<!-- default_time_offset -->
<div class="field">
More information about the pLog-svn
mailing list