Module: appdb
Branch: master
Commit: c95da59dd1823947a1e0a18e74cef0ec36d6d1d4
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=c95da59dd1823947a1e0a18e…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com>
Date: Mon Oct 8 11:43:24 2007 +0200
objectManager: Add object caching support
---
include/objectManager.php | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/include/objectManager.php b/include/objectManager.php
index 807824b..48366e5 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -15,11 +15,36 @@ class ObjectManager
private $sReturnTo;
private $oMultiPage;
private $oTableRow;
+ private $oObject; /* Store an instance of the object of the class
+ we are working with. This is useful if
+ we are calling object functions which modify
+ the object without storing it in the database,
+ and then call objectManager functions which
+ operate on the object, such as in processForm
+ where we first run the object's getOutputEditorValues()
+ and then objectManager's delete_entry(). */
// an array of common responses used when replying to
// queued entries
private $aCommonResponses;
+ /* Get an instance of the object of the class we are working with */
+ private function getObject()
+ {
+ if(!$this->oObject)
+ $this->oObject = new $this->sClass($this->iId);
+
+ return $this->oObject;
+ }
+
+ private function setId($iId)
+ {
+ $this->iId = $iId;
+
+ if($this->oObject)
+ $this->oObject = new $this->sClass($this->iId);
+ }
+
public function getClass()
{
return $this->sClass;
@@ -466,7 +491,7 @@ class ObjectManager
{
$this->checkMethods(array("delete", "canEdit"));
- $oObject = new $this->sClass($this->iId);
+ $oObject = $this->getObject();
if(!$oObject->objectGetId())
return FALSE;
@@ -933,6 +958,11 @@ class ObjectManager
break;
case "Delete":
+ /* Heere we call an objectManager function instead
+ of a function of the object's class. Thus we
+ need to store the object so changes in
+ getOutputEditorValues() are caught. */
+ $this->oObject = $oObject;
$this->delete_entry($aClean['sReplyText']);
break;
Module: website
Branch: master
Commit: 5654765a5bade702fe7eaba8aca025024d1124dc
URL: http://source.winehq.org/git/website.git/?a=commit;h=5654765a5bade702fe7eab…
Author: Jeremy Newman <jnewman(a)codeweavers.com>
Date: Sat Oct 6 08:27:21 2007 -0500
use TT instead of CODE here
---
templates/en/resources.template | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/templates/en/resources.template b/templates/en/resources.template
index 5c2c763..c11ec16 100644
--- a/templates/en/resources.template
+++ b/templates/en/resources.template
@@ -82,7 +82,7 @@
<ul>
<li><a href="http://www.accu.org/resources/public/terse/cpp.htm">C/C++ Resources</a> From the Association of C & C++ Users.
<li><a href="http://www.lysator.liu.se/c/">Programming in C</a> Standards, suggestions, and trivia.
- If you're curious about Unicode and <code><wctype.h></code>,
+ If you're curious about Unicode and <tt><wctype.h></tt>,
see <a href="http://www.lysator.liu.se/c/na1.html">Normative Addendum 1</a>.
</ul>