Changeset 7037
- Timestamp:
- 01/14/08 04:12:12 (8 months ago)
- Files:
-
- plugins/nahoWikiPlugin/branches/kupokomapa/config/schema.yml (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiContent.php (deleted)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiContentPeer.php (deleted)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiPage.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiPagePeer.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiRevision.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiRevisionI18n.php (added)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiRevisionI18nPeer.php (added)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiRevisionPeer.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiContent.php (deleted)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiContentPeer.php (deleted)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiPage.php (modified) (4 diffs)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiPagePeer.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiRevision.php (modified) (3 diffs)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiRevisionI18n.php (added)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiRevisionI18nPeer.php (added)
- plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiRevisionPeer.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/lib/BasenahoWikiActions.class.php (modified) (7 diffs)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/_page.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/_page_edit.php (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/_page_history.php (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/editSuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/historySuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/userSuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/viewSuccess.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/nahoWikiPlugin/branches/kupokomapa/config/schema.yml
r6324 r7037 6 6 id: ~ 7 7 name: { type: varchar, size: 255, index: unique } 8 latest_revision: { type: integer, required: true, default: 1 } 9 8 10 9 naho_wiki_revision: 11 10 _attributes: { phpName: nahoWikiRevision } 11 id: ~ 12 page_id: { type: integer, foreignTable: naho_wiki_page, foreignReference: id, required: true, onDelete: cascade } 13 revision: { type: integer, required: true, default: 1} 12 14 created_at: ~ 13 page_id: { type: integer, foreignTable: naho_wiki_page, foreignReference: id, required: true, onDelete: cascade, primaryKey: true } 14 revision: { type: integer, required: true, default: 1, primaryKey: true } 15 user_name: { type: varchar, size: 255, required: true } 15 _uniques: 16 naho_wiki_revision_unique: [page_id, revision] 17 18 naho_wiki_revision_i18n: 19 _attributes: { phpName: nahoWikiRevisionI18n } 20 id: ~ 21 username: { type: varchar, size: 255, required: true } 16 22 comment: { type: varchar, size: 255 } 17 content_id: { type: integer, foreignTable: naho_wiki_content, foreignReference: id, required: true, onDelete: cascade, primaryKey: true } 18 19 naho_wiki_content: 20 _attributes: { phpName: nahoWikiContent } 21 id: ~ 22 content: { type: longvarchar } # uncompressed content 23 gz_content: { type: blob } # compressed content 23 content: { type: longvarchar } 24 gz_content: { type: blob } plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiPage.php
r6324 r7037 1 1 <?php 2 3 /**4 * Subclass for representing a row from the 'sf_simple_wiki_page' table.5 *6 *7 *8 * @package plugins.nahoWikiPlugin.lib.model9 */10 2 11 3 require_once sfConfig::get('sf_plugins_dir') . '/nahoWikiPlugin/lib/model/plugin/PluginnahoWikiPage.php'; plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiPagePeer.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for performing query and update operations on the 'sf_simple_wiki_page' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 5 */ plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiRevision.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for representing a row from the 'sf_simple_wiki_revision' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 5 */ plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/nahoWikiRevisionPeer.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for performing query and update operations on the 'sf_simple_wiki_revision' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 5 */ plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiPage.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for representing a row from the 'sf_simple_wiki_page' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 */ 5 */ 6 10 7 class PluginnahoWikiPage extends BasenahoWikiPage 11 8 { 12 13 public function getRevision($revision = null) 9 public function getRevision($revision = null, $culture = 'en') 14 10 { 11 $revisions = $this->getRevisions($culture); 12 15 13 $latest_revision = null; 16 foreach ($this->getRevisions() as $rev) { 14 foreach ($revisions as $rev) 15 { 17 16 if (is_null($latest_revision) || $latest_revision->getRevision() < $rev->getRevision()) { 18 17 $latest_revision = $rev; 19 18 } 20 if ($rev->getRevision() == $revision) { 19 if ($rev->getRevision() == $revision) 20 { 21 $rev->setCulture($culture); 21 22 return $rev; 22 23 } 24 } 25 26 if ($latest_revision) { 27 $latest_revision->setCulture($culture); 23 28 } 24 29 … … 26 31 } 27 32 28 public function getRevisions($c riteria= null)33 public function getRevisions($culture = 'en') 29 34 { 30 if ($criteria === null) { 31 $criteria = new Criteria(); 32 } elseif ($criteria instanceof Criteria) { 33 $criteria = clone $criteria; 34 } 35 $criteria->addDescendingOrderByColumn(nahoWikiRevisionPeer::CREATED_AT); 36 return $this->getnahoWikiRevisions($criteria); 35 $c = new Criteria(); 36 $c->addJoin(nahoWikiRevisionPeer::ID, nahoWikiRevisionI18nPeer::ID, Criteria::RIGHT_JOIN); 37 $c->add(nahoWikiRevisionI18nPeer::CULTURE, $culture); 38 $c->addDescendingOrderByColumn(nahoWikiRevisionPeer::ID); 39 40 return $this->getnahoWikiRevisions($c); 41 } 42 43 public function getLatestRevision($culture = 'en') 44 { 45 $c = new Criteria(); 46 $c->add(nahoWikiRevisionPeer::PAGE_ID, $this->getId()); 47 $c->addJoin(nahoWikiRevisionPeer::ID, nahoWikiRevisionI18nPeer::ID, Criteria::RIGHT_JOIN); 48 $c->add(nahoWikiRevisionI18nPeer::CULTURE, $culture); 49 $c->addDescendingOrderByColumn(nahoWikiRevisionPeer::ID); 50 51 $revision = nahoWikiRevisionPeer::doSelectOne($c); 52 53 return ($revision)?$revision->getRevision():0; 37 54 } 38 55 … … 42 59 public function optimizeRevisions() 43 60 { 44 foreach ($this->getRevisions() as $revision) { 61 foreach ($this->getRevisions() as $revision) 62 { 45 63 if ($revision->isLatest()) { 46 64 $revision->unarchiveContent(); … … 50 68 } 51 69 } 52 53 70 } plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiPagePeer.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for performing query and update operations on the 'sf_simple_wiki_page' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 */ 5 */ 6 10 7 class PluginnahoWikiPagePeer extends BasenahoWikiPagePeer 11 8 { plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiRevision.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for representing a row from the 'sf_simple_wiki_revision' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 */ 5 */ 6 10 7 class PluginnahoWikiRevision extends BasenahoWikiRevision 11 8 { 12 13 /** 14 * Taken from sfIp2Country 15 * 16 * Determines the remote IP address. 17 * If called via a CLI script (batch) the local 18 * loopback address will be returned. 19 * 20 * @return string 21 * @author Sacha Telgenhof Oude Koehorst <s.telgenhof@xs4all.nl> 22 */ 23 private function getRemoteIP() 9 public function setUsername($username) 24 10 { 25 $ip = false; 26 27 // User is behind a proxy and check that we discard RFC1918 IP addresses. 28 // If these address are behind a proxy then only figure out which IP belongs to the user. 29 if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 30 // put the IP's octets into an array 31 $ips = explode(', ', $_SERVER['HTTP_X_FORWARDED_FOR']); 32 $no = count($ips); 33 34 for ($i = 0 ; $i < $no ; $i++) { 35 // Skip RFC 1918 IP's 10.0.0.0/8, 172.16.0.0/12 and 36 // 192.168.0.0/16 37 if (!eregi('^(10|172\.16|192\.168)\.', $ips[$i])) { 38 $ip = $ips[$i]; 39 break; 40 } 11 if (!is_null($username)) 12 { 13 parent::setUsername($username); 14 return; 15 } 16 17 $user = sfContext::getInstance()->getUser(); 18 if ($user->isAuthenticated()) 19 { 20 $username = $user->__toString(); 21 } 22 else 23 { 24 if (class_exists('ip2Country')) { 25 $username = ip2Country::getInstance()->getRemoteAddress(); 26 } else { 27 $username = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1'; 41 28 } 42 29 } 43 44 return ($ip ? $ip : isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1'); // Return with the found IP, the remote address or the local loopback address 45 } 46 47 public function initUserName() 48 { 49 $user = sfContext::getInstance()->getUser(); 50 if ($user->isAuthenticated()) { 51 $this->setUserName($user->__toString()); 52 } else { 53 $this->setUserName($this->getRemoteIP()); 54 } 30 31 parent::setUsername($username); 55 32 } 56 33 57 34 public function isLatest() 58 35 { 59 return $this->getRevision() == $this->getPage()->getLatestRevision();36 return $this->getRevision() >= $this->getPage()->getLatestRevision($this->getCulture()); 60 37 } 61 38 … … 64 41 return $this->getnahoWikiPage(); 65 42 } 66 43 67 44 public function getContent() 68 45 { 69 $content_storage = $this->getnahoWikiContent(); 46 $uncompressed_content = parent::getContent(); 47 $compressed_content = $this->getGzContent(); 70 48 71 if (!$content_storage) { 72 return null; 73 } 74 75 $uncompressed_content = $content_storage->getContent(); 76 $compressed_content = $content_storage->getGzContent(); 77 78 /* Check archive state : shouldn't have to be done 79 if (!$this->isLatest() && $uncompressed_content) { // Old revision has uncompressed content : do archive ! 80 $this->archiveContent(); 81 } elseif ($this->isLatest() && $compressed_content) { // Latest revision has compressed content : unarchive ! 82 $this->unarchiveContent(); 83 } 84 */ 85 86 return $uncompressed_content ? $uncompressed_content : gzinflate($compressed_content); 49 return $uncompressed_content ? $uncompressed_content : @gzuncompress($compressed_content); 87 50 } 88 51 … … 91 54 return sfMarkdown::doConvert($this->getContent()); 92 55 } 93 94 public function setContent($content) 95 { 96 $content_storage = $this->getnahoWikiContent(); 97 if (!$content_storage) { 98 $content_storage = new nahoWikiContent; 99 $this->setnahoWikiContent($content_storage); 100 } 101 $content_storage->setContent($content); 102 103 return $content_storage->save(); 104 } 105 56 106 57 public function archiveContent() 107 58 { 108 $content_storage = $this->getnahoWikiContent(); 109 110 if (!$content_storage) { 111 return false; 112 } 113 114 $uncompressed_content = $content_storage->getContent(); 115 if ($uncompressed_content) { 116 $compressed_content = gzdeflate($uncompressed_content, 9); 117 $content_storage->setGzContent($compressed_content); 118 $content_storage->setContent(null); 119 $content_storage->save(); 120 } 59 $content = $this->getContent(); 60 $this->setGzContent(@gzcompress($content)); 61 $this->setContent(null); 62 $this->save(); 121 63 122 64 return true; 123 65 } 124 125 public function unarchiveContent()126 {127 $content_storage = $this->getnahoWikiContent();128 129 if (!$content_storage) {130 return false;131 }132 133 $compressed_content = $content_storage->getGzContent();134 if ($compressed_content) {135 $uncompressed_content = gzinflate($compressed_content, 9);136 $content_storage->setGzContent(null);137 $content_storage->setContent($uncompressed_content);138 $content_storage->save();139 }140 141 return true;142 }143 144 66 } plugins/nahoWikiPlugin/branches/kupokomapa/lib/model/plugin/PluginnahoWikiRevisionPeer.php
r6324 r7037 2 2 3 3 /** 4 * Subclass for performing query and update operations on the 'sf_simple_wiki_revision' table.5 *6 *7 *8 4 * @package plugins.nahoWikiPlugin.lib.model 9 */ 5 */ 6 10 7 class PluginnahoWikiRevisionPeer extends BasenahoWikiRevisionPeer 11 8 { plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/lib/BasenahoWikiActions.class.php
r6324 r7037 17 17 class BasenahoWikiActions extends sfActions 18 18 { 19 20 19 public function preExecute() 21 20 { 22 } 23 24 protected function setPage($page_name = null) 25 { 26 if (is_null($page_name)) { 27 $page_name = ucfirst(sfInflector::camelize($this->getRequestParameter('page'))); 28 } 29 $c = new Criteria; 30 $c->add(nahoWikiPagePeer::NAME, $page_name); 31 $this->page = nahoWikiPagePeer::doSelectOne($c); 32 if (!$this->page) { 33 $this->initNewPage($page_name); 21 $this->culture = $this->getRequestParameter('sf_culture', $this->getUser()->getCulture()); 22 if (!$this->culture) { 23 $this->culture = 'en'; 34 24 } 35 25 36 $revision = $this->getRequestParameter('revision', $this->page->getLatestRevision()); 37 $this->revision = $this->page->getRevision($revision); 38 if (!$this->revision) { 39 $this->initNewRevision(); 26 $page = ucfirst(sfInflector::camelize($this->getRequestParameter('page'))); 27 28 $c = new Criteria; 29 $c->add(nahoWikiPagePeer::NAME, $page); 30 $this->page = nahoWikiPagePeer::doSelectOne($c); 31 if (!$this->page) 32 { 33 $this->page = new nahoWikiPage(); 34 $this->page->setName($page); 35 } 36 37 $revision = $this->getRequestParameter('revision', $this->page->getLatestRevision($this->culture)); 38 $this->revision = $this->page->getRevision($revision, $this->culture); 39 if (!$this->revision) 40 { 41 $this->_initNewRevision(); 40 42 } 41 43 42 44 $this->uriParams = 'page=' . urlencode($this->page->getName()); 43 if ($this->revision->getRevision() != $this->page->getLatestRevision( )) {45 if ($this->revision->getRevision() != $this->page->getLatestRevision($this->culture)) { 44 46 $this->uriParams .= '&revision=' . urlencode($this->revision->getRevision()); 45 47 } 46 48 } 47 48 protected function initNewRevision()49 {50 $this->revision = new nahoWikiRevision;51 $this->revision->setnahoWikiPage($this->page);52 $this->revision->initUserName();53 if (!$this->page->isNew()) {54 $this->revision->setRevision($this->page->getLatestRevision()+1);55 }56 }57 58 protected function initNewPage($page_name)59 {60 $this->page = new nahoWikiPage;61 $this->page->setName($page_name);62 }63 49 64 protected function forward403Unless($condition)65 {66 if ($condition) {67 return;68 }69 70 if ($this->getUser()->isAuthenticated()) {71 $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));72 } else {73 $this->forward(sfConfig::get('sf_login_module'), sfConfig::get('sf_login_action'));74 }75 }76 77 50 public function executeIndex() 78 51 { … … 87 60 public function executeView() 88 61 { 89 $this->setPage();90 91 62 return sfView::SUCCESS; 92 63 } … … 98 69 return sfView::SUCCESS; 99 70 } 71 100 72 public function executeEdit() 101 { 102 $this->setPage(); 103 104 // Generate the username (this is done by the Revision model) 105 $tmp_revision = new nahoWikiRevision; 106 $tmp_revision->initUserName(); 107 $this->userName = $tmp_revision->getUserName(); 108 73 { 109 74 // Save changes 110 if ($this->getRequest()->getMethod() == sfRequest::POST) { 111 if (!$this->page->isNew()) { 75 if ($this->getRequest()->getMethod() == sfRequest::POST) 76 { 77 if (!$this->page->isNew()) 78 { 112 79 $this->revision->archiveContent(); 113 $this->initNewRevision(); 114 } 80 $this->_initNewRevision(); 81 } 82 83 $this->revision->setCulture($this->culture); 115 84 $this->revision->setContent($this->getRequestParameter('content')); 116 85 $this->revision->setComment($this->getRequestParameter('comment')); 117 86 $this->revision->save(); 118 $this->page->setLatestRevision($this->revision->getRevision()); 87 119 88 $this->page->save(); 89 120 90 $this->redirect('nahoWiki/view?page=' . $this->page->getName()); 121 91 } … … 126 96 public function executeHistory() 127 97 { 128 $this->setPage();129 130 98 return sfView::SUCCESS; 131 99 } … … 133 101 public function executeDiff() 134 102 { 135 $this->setPage(); // $this->revision is revision2136 137 103 $this->forward404If($this->page->isNew()); 138 104 $this->forward404If($this->revision->isNew()); … … 142 108 $c->add(nahoWikiRevisionPeer::PAGE_ID, $this->page->getId()); 143 109 $c->add(nahoWikiRevisionPeer::REVISION, $this->getRequestParameter('oldRevision')); 110 $c->addJoin(nahoWikiRevisionPeer::ID, nahoWikiRevisionI18n::ID, Criteria::RIGHT_JOIN); 111 $c->add(nahoWikiRevisionI18nPeer::CULTURE, $this->culture); 144 112 $this->revision1 = nahoWikiRevisionPeer::doSelectOne($c); 145 113 $this->forward404Unless($this->revision1); … … 178 146 public function executeUser() 179 147 { 180 $this->setPage('User:' . $this->getRequestParameter('name'));181 182 148 return sfView::SUCCESS; 183 149 } 184 150 151 protected function _initNewRevision() 152 { 153 $c = new Criteria(); 154 $c->add(nahoWikiRevisionPeer::PAGE_ID, $this->page->getId()); 155 $c->add(nahoWikiRevisionPeer::REVISION, $this->page->getLatestRevision($this->culture)+1); 156 $this->revision = nahoWikiRevisionPeer::doSelectOne($c); 157 158 if (!$this->revision) 159 { 160 $this->revision = new nahoWikiRevision(); 161 $this->revision->setnahoWikiPage($this->page); 162 $this->revision->setRevision($this->page->getLatestRevision($this->culture)+1); 163 $this->revision->setCulture($this->culture); 164 $this->revision->setUsername(null); 165 } else { 166 $this->revision->setCulture($this->culture); 167 $this->revision->setUsername(null); 168 } 169 } 170 171 protected function forward403Unless($condition) 172 { 173 if ($condition) { 174 return; 175 } 176 177 if ($this->getUser()->isAuthenticated()) { 178 $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action')); 179 } else { 180 $this->forward(sfConfig::get('sf_login_module'), sfConfig::get('sf_login_action')); 181 } 182 } 185 183 } plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/_page.php
r6324 r7037 1 <?php include_partial('page_tools', array('uriParams' => $uriParams)) ?>2 3 1 <?php if (!$revision->isLatest()): ?> 4 <p class="wiki-warning"><?php echo __('You are currently viewing an old revision of this page.') ?> <?php echo link_to(__('Don\'t you want to see the latest version of this page ?'), 'nahoWiki/view?page=' . $page->getName()) ?></p> 2 <p class="wiki-warning"> 3 <?php echo __('You are currently viewing an old revision of this page.') ?> 4 <?php echo link_to(__('Don\'t you want to see the latest version of this page?'), 'nahoWiki/view?page=' . $page->getName()) ?> 5 </p> 5 6 <?php endif ?> 6 7 7 8 <div class="wiki-page"> 8 9 <?php if (has_slot('wiki_page_header')) echo get_slot('wiki_page_header') ?> 9 <?php if ( $page->isNew()): ?>10 <?php if (!$revision->getContent()): ?> 10 11 <p class="wiki-warning"><?php echo __(isset($nopage_msg) ? $nopage_msg : 'There is no article here yet. Edit this page to contribute.') ?></p> 11 12 <?php else: ?> plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/_page_edit.php
r6324 r7037 1 <?php include_partial('page_tools', array('uriParams' => $uriParams)) ?>2 3 1 <?php if (!$revision->isLatest()): ?> 4 2 <p class="wiki-warning"><?php echo __('You are currently editing an old revision of this page. If you save these changes, all changed made since this revision will be lost !!') ?> <?php echo link_to(__('Don\'t you want to edit the latest version of this page ?'), 'nahoWiki/edit?page=' . $page->getName()) ?></p> … … 8 6 9 7 <?php if (!$sf_user->isAuthenticated()): ?> 10 <p><?php echo __('You are not authenticated. Your IP address will be stored : %ip%.', array('%ip%' => '<strong>' . $ userName. '</strong>')) ?></p>8 <p><?php echo __('You are not authenticated. Your IP address will be stored : %ip%.', array('%ip%' => '<strong>' . $revision->getUsername() . '</strong>')) ?></p> 11 9 <?php else: ?> 12 <p><?php echo __('You are authenticated. Your username will be stored : %username%.', array('%username%' => '<strong>' . $ userName. '</strong>')) ?></p>10 <p><?php echo __('You are authenticated. Your username will be stored : %username%.', array('%username%' => '<strong>' . $revision->getUsername() . '</strong>')) ?></p> 13 11 <?php endif ?> 14 12 plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/_page_history.php
r7031 r7037 1 1 <?php use_helper('Date') ?> 2 3 <?php include_partial('page_tools', array('uriParams' => 'page=' . urlencode($page->getName()))) ?>4 2 5 3 <?php if (@$compare): ?> … … 20 18 </thead> 21 19 <tbody> 22 <?php $revisions = $page->getRevisions( ) ?>20 <?php $revisions = $page->getRevisions($culture) ?> 23 21 <?php $rev2 = $sf_request->getParameter('revision', @$revisions[0] ? $revisions[0]->getRevision() : null) ?> 24 22 <?php $rev1 = $sf_request->getParameter('oldRevision', @$revisions[1] ? ($rev2 == $revisions[0]->getRevision() ? $revisions[1]->getRevision() : $revisions[0]->getRevision()): null) ?> plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/editSuccess.php
r6324 r7037 1 <?php include_partial('page_edit', array('page' => $page, 'revision' => $revision, 'uriParams' => $uriParams, 'userName' => $userName)) ?> 1 <div id="wiki"> 2 <?php include_partial('page_tools', array('uriParams' => $uriParams)) ?> 3 <?php include_partial('page_edit', array('page' => $page, 'culture' => $culture, 'revision' => $revision, 'uriParams' => $uriParams)) ?> 4 </div> plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/historySuccess.php
r6324 r7037 1 <?php include_partial('page_history', array('page' => $page, 'compare' => true)) ?> 1 <div id="wiki"> 2 <?php include_partial('page_tools', array('uriParams' => 'page=' . urlencode($page->getName()))) ?> 3 <?php include_partial('page_history', array('page' => $page, 'culture' => $culture, 'compare' => true)) ?> 4 </div> plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/userSuccess.php
r6324 r7037 1 <?php slot('wiki_page_header') ?>2 coucou gamin3 <?php end_slot() ?>4 5 <?php include_partial('page', array('page' => $page, 'revision' => $revision, 'uriParams' => $uriParams)) ?>plugins/nahoWikiPlugin/branches/kupokomapa/modules/nahoWiki/templates/viewSuccess.php
r6324 r7037 1 <?php include_partial('page', array('page' => $page, 'revision' => $revision, 'uriParams' => $uriParams)) ?> 1 <div id="wiki"> 2 <?php include_partial('page_tools', array('uriParams' => $uriParams)) ?> 3 <?php include_partial('page', array('page' => $page, 'culture' => $culture, 'revision' => $revision, 'uriParams' => $uriParams)) ?> 4 </div>