Explorar el Código

[DOCUMENTATION] Japanese sync 19030, 19074

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19079 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp hace 16 años
padre
commit
9306316b9a

+ 2 - 2
documentation/manual/ja/module_specs/Zend_Application-AvailableResources-Layout.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 18621 -->
+<!-- EN-Revision: 19030 -->
 <sect2 id="zend.application.available-resources.layout">
     <title>Zend_Application_Resource_Layout</title>
 
@@ -22,7 +22,7 @@
 
         <programlisting language="ini"><![CDATA[
 resources.layout.layout = "NameOfDefaultLayout"
-resources.layout.Path = "/path/to/layouts"
+resources.layout.layoutPath = "/path/to/layouts"
 ]]></programlisting>
     </example>
 </sect2>

+ 42 - 25
documentation/manual/ja/module_specs/Zend_OpenId-Consumer.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 17407 -->
+<!-- EN-Revision: 19074 -->
 <sect1 id="zend.openid.consumer">
     <title>Zend_OpenId_Consumer の基本</title>
     <para>
@@ -375,11 +375,13 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
     {
         $table = $this->_association_table;
         $secret = base64_encode($secret);
-        $this->_db
-             ->query('insert into ' .
-                     $table (url, handle, macFunc, secret, expires) " .
-                     "values ('$url', '$handle', '$macFunc', " .
-                     "'$secret', $expires)");
+        $this->_db->insert($table, array(
+            'url'     => $url,
+            'handle'  => $handle,
+            'macFunc' => $macFunc,
+            'secret'  => $secret,
+            'expires' => $expires,
+        ));
         return true;
     }
 
@@ -390,9 +392,14 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
                                    &$expires)
     {
         $table = $this->_association_table;
-        $this->_db->query("delete from $table where expires < " . time());
-        $res = $this->_db->fetchRow('select handle, macFunc, secret, expires ' .
-                                    "from $table where url = '$url'");
+        $this->_db->delete(
+            $table, $this->_db->quoteInto('expires < ?', time())
+        );
+        $select = $this-_db->select()
+                ->from($table, array('handle', 'macFunc', 'secret', 'expires'))
+                ->where('url = ?', $url);
+        $res = $this->_db->fetchRow($select);
+
         if (is_array($res)) {
             $handle  = $res['handle'];
             $macFunc = $res['macFunc'];
@@ -410,10 +417,14 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
                                            &$expires)
     {
         $table = $this->_association_table;
-        $this->_db->query("delete from $table where expires < " . time());
-        $res = $this->_db
-                    ->fetchRow('select url, macFunc, secret, expires ' .
-                               "from $table where handle = '$handle'");
+        $this->_db->delete(
+            $table, $this->_db->quoteInto('expires < ', time())
+        );
+        $select = $this->_db->select()
+                ->from($table, array('url', 'macFunc', 'secret', 'expires')
+                ->where('handle = ?', $handle);
+        $res = $select->fetchRow($select);
+
         if (is_array($res)) {
             $url     = $res['url'];
             $macFunc = $res['macFunc'];
@@ -438,11 +449,14 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
                                      $expires)
     {
         $table = $this->_discovery_table;
-        $this->_db
-             ->query("insert into $table " .
-                     "(id, realId, server, version, expires) " .
-                     "values " .
-                     "('$id', '$realId', '$server', $version, $expires)");
+        $this->_db->insert($table, array(
+            'id'      => $id,
+            'realId'  => $realId,
+            'server'  => $server,
+            'version' => $version,
+            'expires' => $expires,
+        ));
+
         return true;
     }
 
@@ -453,10 +467,12 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
                                      &$expires)
     {
         $table = $this->_discovery_table;
-        $this->_db->query("delete from $table where expires < " . time());
-        $res = $this->_db
-                    ->fetchRow('select realId, server, version, expires ' .
-                               "from $table where id = '$id'");
+        $this->_db->delete($table, $this->quoteInto('expires < ?', time()));
+        $select = $this->_db->select()
+                ->from($table, array('realId', 'server', 'version', 'expires'))
+                ->where('id = ?', $id);
+        $res = $this->_db->fetchRow($select);
+
         if (is_array($res)) {
             $realId  = $res['realId'];
             $server  = $res['server'];
@@ -470,7 +486,7 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
     public function delDiscoveryInfo($id)
     {
         $table = $this->_discovery_table;
-        $this->_db->query("delete from $table where id = '$id'");
+        $this->_db->delete($table, $this->_db->quoteInto('id = ?', $id));
         return true;
     }
 
@@ -478,8 +494,9 @@ class DbStorage extends Zend_OpenId_Consumer_Storage
     {
         $table = $this->_nonce_table;
         try {
-            $ret = $this->_db
-                        ->query("insert into $table (nonce) values ('$nonce')");
+            $ret = $this->_db->insert($table, array(
+                'nonce' => $nonce,
+            ));
         } catch (Zend_Db_Statement_Exception $e) {
             return false;
         }