[pLog-svn] r4697 - in plog/trunk/class: action/admin dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Feb 8 04:47:00 EST 2007
Author: oscar
Date: 2007-02-08 04:47:00 -0500 (Thu, 08 Feb 2007)
New Revision: 4697
Modified:
plog/trunk/class/action/admin/adminaddpostaction.class.php
plog/trunk/class/action/admin/adminaddresourceaction.class.php
plog/trunk/class/dao/locations.class.php
Log:
fixed a few issues that prevented the location feature from working correctly
Modified: plog/trunk/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddpostaction.class.php 2007-02-07 23:27:37 UTC (rev 4696)
+++ plog/trunk/class/action/admin/adminaddpostaction.class.php 2007-02-08 09:47:00 UTC (rev 4697)
@@ -87,7 +87,7 @@
if( $config->getValue( "location_data_enabled", false )) {
if ($this->_request->getValue( "locationId") == "0" ) {
// no location set
- $this->_blogInfo->setLocationId( 0 );
+ $article->setLocationId( 0 );
}
else {
// otherwise check the location data
@@ -95,7 +95,7 @@
$locations = new Locations();
$coords = split(",", $this->_request->getValue( "locationId" ));
$location = $locations->getLocationAddIfNotFound( $coords[0], $coords[1], $this->_blogInfo->getId(), $this->_request->getValue( "locationDesc" ));
- $this->_blogInfo->setLocation( $location );
+ $article->setLocation( $location );
}
}
Modified: plog/trunk/class/action/admin/adminaddresourceaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddresourceaction.class.php 2007-02-07 23:27:37 UTC (rev 4696)
+++ plog/trunk/class/action/admin/adminaddresourceaction.class.php 2007-02-08 09:47:00 UTC (rev 4697)
@@ -115,7 +115,7 @@
if( $config->getValue( "location_data_enabled", false )) {
if ($this->_request->getValue( "locationId") == "0" ) {
// no location set
- $this->_blogInfo->setLocationId( 0 );
+ $resource->setLocationId( 0 );
}
else {
// otherwise check the location data
@@ -123,7 +123,8 @@
$locations = new Locations();
$coords = split(",", $this->_request->getValue( "locationId" ));
$location = $locations->getLocationAddIfNotFound( $coords[0], $coords[1], $this->_blogInfo->getId(), $this->_request->getValue( "locationDesc" ));
- $this->_blogInfo->setLocation( $location );
+ $resource->setLocation( $location );
+ $resources->updateResource( $resource );
}
}
Modified: plog/trunk/class/dao/locations.class.php
===================================================================
--- plog/trunk/class/dao/locations.class.php 2007-02-07 23:27:37 UTC (rev 4696)
+++ plog/trunk/class/dao/locations.class.php 2007-02-08 09:47:00 UTC (rev 4697)
@@ -80,7 +80,7 @@
/**
* @param loc
*/
- function addLocation( $loc )
+ function addLocation( &$loc )
{
if(( $result = $this->add( $loc ))) {
$this->_cache->removeData( $loc->getBlogId(), CACHE_LOCATIONS_BY_BLOG );
More information about the pLog-svn
mailing list