Changeset 18506 for plugins/nahoWikiPlugin
- Timestamp:
- 05/21/09 14:45:08 (10 months ago)
- Files:
-
- plugins/nahoWikiPlugin/branches/1.2/README (modified) (19 diffs)
- plugins/nahoWikiPlugin/branches/1.2/config/app.yml (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/1.2/config/search.yml (added)
- plugins/nahoWikiPlugin/branches/1.2/lib/actions/BasenahoWikiActions.php (modified) (10 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/actions/BasenahoWikiComponents.php (modified) (6 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/config/nahoWikiConfiguration.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/lib/forms/nahoWikiEditForm.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/lib/forms/nahoWikiHistoryForm.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/lib/forms/nahoWikiRevisionsWidget.php (modified) (5 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/forms/plugin/PluginnahoWikiEditForm.php (modified) (10 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/forms/plugin/PluginnahoWikiHistoryForm.php (modified) (8 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/helper/nahoWikiHelper.php (modified) (7 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiContent.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiPage.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiPagePeer.php (modified) (11 diffs)
- plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiRevision.php (modified) (14 diffs)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_breadcrumbs.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_content.php (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_diff.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_index.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page.php (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_actions.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_edit.php (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_history.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_tools.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_searchResult.php (added)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_toc.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/browseSuccess.php (modified) (2 diffs)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/diffSuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/editSuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/userSuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/viewSuccess.php (modified) (1 diff)
- plugins/nahoWikiPlugin/branches/1.2/package.xml (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/nahoWikiPlugin/branches/1.2/README
r18496 r18506 3 3 == Overview == 4 4 5 This plugin allows you to embed a wiki within your symfony application with 5 This plugin allows you to embed a wiki within your symfony application with 6 6 the following features: 7 7 - Create/edit pages with full versionning … … 19 19 - A bunch of helpers to provide total integration in your application 20 20 21 Most features have been inspired from 22 [http://www.splitbrain.org/projects/dokuwiki DokuWiki] (e.g. namespaces and 21 Most features have been inspired from 22 [http://www.splitbrain.org/projects/dokuwiki DokuWiki] (e.g. namespaces and 23 23 Interwiki work the same way). 24 24 25 It is not aimed at replacing full-featured wiki packages, but offers a 26 lightweight alternative for when you build a website that has to contain a 27 simple wiki. It is very easy to configure and adapt, so it should fulfill most 25 It is not aimed at replacing full-featured wiki packages, but offers a 26 lightweight alternative for when you build a website that has to contain a 27 simple wiki. It is very easy to configure and adapt, so it should fulfill most 28 28 basic wiki requirements. 29 29 30 Please note that this plugin is in active development. If you want to help and 30 Please note that this plugin is in active development. If you want to help and 31 31 improve it, please contact Nicolas Chambrier (naholyr at yahoo dot fr). 32 32 33 33 == Screenshots == 34 34 35 [[Image(nahoWikiplugin_1.png, 30%)]] 36 [[Image(nahoWikiplugin_2.png, 30%)]] 37 [[Image(nahoWikiplugin_3.png, 30%)]] 35 [[Image(nahoWikiplugin_1.png, 30%)]] 36 [[Image(nahoWikiplugin_2.png, 30%)]] 37 [[Image(nahoWikiplugin_3.png, 30%)]] 38 38 39 39 == Requirements == 40 40 41 41 The prerequisites for using the `nahoWiki` plugin are: 42 - As the plugin doesn't contain a user management module, the project where 43 you install it must have a table managing authors, or users (whatever the 44 name), and the related Propel class must have a `__toString()` method. Both 45 these conditions are satisfied by the 46 [http://trac.symfony-project.com/trac/wiki/sfGuardPlugin sfGuardPlugin], so 42 - As the plugin doesn't contain a user management module, the project where 43 you install it must have a table managing authors, or users (whatever the 44 name), and the related Propel class must have a `__toString()` method. Both 45 these conditions are satisfied by the 46 [http://trac.symfony-project.com/trac/wiki/sfGuardPlugin sfGuardPlugin], so 47 47 installing this plugin is a good choice. 48 - You need the [http://trac.symfony-project.com/trac/wiki/sfMarkdownPlugin 49 sfMarkdownPlugin] which will provide the ability to convert from wiki syntax 48 - You need the [http://trac.symfony-project.com/trac/wiki/sfMarkdownPlugin 49 sfMarkdownPlugin] which will provide the ability to convert from wiki syntax 50 50 to XHTML contents. 51 51 … … 54 54 === PEAR Install === 55 55 56 To install the plugin for a symfony project, the usual process is to use the 56 To install the plugin for a symfony project, the usual process is to use the 57 57 symfony command line: 58 58 {{{ … … 62 62 === SVN Install === 63 63 64 If your project is not under subversion yet, you can simply checkout the 64 If your project is not under subversion yet, you can simply checkout the 65 65 plugin in your plugins directory: 66 66 {{{ … … 68 68 }}} 69 69 70 If your project is under version control, you can use the svn:externals 70 If your project is under version control, you can use the svn:externals 71 71 property: 72 72 {{{ … … 78 78 }}} 79 79 80 After you installed `nahoWikiPlugin` this way, you must copy (or symlink) 80 After you installed `nahoWikiPlugin` this way, you must copy (or symlink) 81 81 `plugins/nahoWikiPlugin/web` to `web/nahoWikiPlugin`. 82 82 83 83 == General instructions == 84 84 85 Rebuild the model as you are used to, to create the new tables needed by the 85 Rebuild the model as you are used to, to create the new tables needed by the 86 86 plugin. 87 87 {{{ … … 114 114 == Slots == 115 115 116 The templates of the `nahoWiki` module define some slots that you can use 116 The templates of the `nahoWiki` module define some slots that you can use 117 117 inside your layout: 118 118 - wiki_page_actions : For the current page actions … … 120 120 - wiki_breadcrumbs : For the wiki breadcrumbs 121 121 122 If you want to insert the actions menu or the breadcrumbs in your layout at 123 the place you exactly want, simply disable the auto-inclusion of it (see 122 If you want to insert the actions menu or the breadcrumbs in your layout at 123 the place you exactly want, simply disable the auto-inclusion of it (see 124 124 app.yml configuration) and include the corresponding slot in your layout. 125 125 126 Here is an example layout (in this example, options `include_page_actions` and 126 Here is an example layout (in this example, options `include_page_actions` and 127 127 `include_page_name` have been disabled in app.yml): 128 128 … … 143 143 }}} 144 144 145 == Search with sfLucene == 146 147 If you install `sfLucenePlugin`, you will be able to search through your wiki pages without any effort ;) 148 149 === Installing search feature === 150 151 * Case 1 : You did not have `sfLucenePlugin` installed before. 152 In this case, it will be extremely simple, just follow these instructions : 153 - Install [http://www.symfony-project.org/plugins/sfLucenePlugin sfLucenePlugin] 154 - In your app.yml, add {{{ lucene: { index: wiki } }}} to use the search configuration defined by `nahoWikiPlugin` 155 156 * Case 2 : You already use `sfLucenePlugin`. 157 In this case, you already have an index you use, and want to integrate wiki pages in those results. 158 For this, you have two solutions : 159 - Use index {{{ wiki }}} in a custom search form (how to do this is a question for sfLucene). 160 - Or copy configuration under `wiki` in `plugins/nahoWikiPlugin/config/search.yml` to your own `search.yml`. 161 162 Once you integrated nahoWikiPlugin and sfLucenePlugin, you just have to rebuild your index 163 with {{{ $ symfony lucene:rebuild application }}}, then go to `http://mysite/sfLucene/search` 164 and check if your wiki pages appear in your search results. 165 166 Note that only the last revision of a page is indexed. 167 145 168 == Configuration == 146 169 147 170 === Schema customization === 148 171 149 If you install the `sfPropelAlternativeSchemaPlugin`, you can customize this 150 plugin's schema by creating a `nahoWikiPlugin_schema.custom.yml` file under 151 your project's `config/` directory. This allows you to customize the 152 connection name, table names, etc… Refer to the 172 If you install the `sfPropelAlternativeSchemaPlugin`, you can customize this 173 plugin's schema by creating a `nahoWikiPlugin_schema.custom.yml` file under 174 your project's `config/` directory. This allows you to customize the 175 connection name, table names, etc… Refer to the 153 176 [http://trac.symfony-project.com/wiki/sfPropelAlternativeSchemaPluginsfPropelAlternativeSchemaPlugin README file] for more information. 154 177 155 178 === Extending model, actions, or templates === 156 179 157 If you want to extend a class of the model, just create an empty file 180 If you want to extend a class of the model, just create an empty file 158 181 `lib/model/nahoWikiClass.php`, which will contain: 159 182 {{{ … … 167 190 }}} 168 191 169 If you want to extend the actions, the process is similar: create a file named 192 If you want to extend the actions, the process is similar: create a file named 170 193 `modules/nahoWiki/actions/actions.class.php` in your app's directory: 171 194 {{{ … … 183 206 }}} 184 207 185 To override a template file named 186 `plugins/nahoWikiplugin/modules/nahoWiki/templates/theTemplate.php`, just copy 187 it to `modules/nahoWiki/templates/theTemplate.php` in your app's folder, and 188 then edit the copied file: it will be the one used by Symfony to render the 208 To override a template file named 209 `plugins/nahoWikiplugin/modules/nahoWiki/templates/theTemplate.php`, just copy 210 it to `modules/nahoWiki/templates/theTemplate.php` in your app's folder, and 211 then edit the copied file: it will be the one used by Symfony to render the 189 212 pages. 190 In most cases, you will want to override `_page_actions.php` or 191 `_breadcrumbs.php`, or `_toc.php`. Templates have been smartly exploded, you 213 In most cases, you will want to override `_page_actions.php` or 214 `_breadcrumbs.php`, or `_toc.php`. Templates have been smartly exploded, you 192 215 should be able to customize the rendering with a few efforts. 193 216 194 217 === Using another Wiki renderer === 195 218 196 The default engine is [http://daringfireball.net/projects/markdown Markdown] 197 (if `sfMarkdownPlugin` is not installed, no conversion at all is done). If you 198 want to use another engine, just override the method 219 The default engine is [http://daringfireball.net/projects/markdown Markdown] 220 (if `sfMarkdownPlugin` is not installed, no conversion at all is done). If you 221 want to use another engine, just override the method 199 222 `nahoWikiContentPeer::doConvert($content)`. 200 223 … … 216 239 === app.yml === 217 240 218 Some of the features of the plugin can be altered by configuration. To do so, 241 Some of the features of the plugin can be altered by configuration. To do so, 219 242 add some of the following lines to your application's `app.yml`: 220 243 … … 234 257 routes_register: on # Enable embedded routing rules ? 235 258 wrap_class: nahoWiki # All pages are wrapped into a <div class="..."> tag. This is its class name. 259 compress_old_revisions: on # With this option enabled, old revisions are stored as gzip-compressed (saves space) 236 260 237 261 # Rendering for internal links, you may need to customize the *_model options if you change rendering engine … … 265 289 === Routing rules === 266 290 267 The plugin comes with the following default rules. You can prevent those 268 routes to be added by disabling the option `routes_register`, and add 291 The plugin comes with the following default rules. You can prevent those 292 routes to be added by disabling the option `routes_register`, and add 269 293 your own routing rules. 270 294 … … 306 330 === Look and Feel === 307 331 308 The `nahoWiki` module comes with a default stylesheet. You can choose to use 309 your own stylesheet instead of the default one. To do so, you must create an 310 empty `nahoWiki` module inside your application with just one 332 The `nahoWiki` module comes with a default stylesheet. You can choose to use 333 your own stylesheet instead of the default one. To do so, you must create an 334 empty `nahoWiki` module inside your application with just one 311 335 `config/view.yml` file in it, with the following content: 312 336 … … 320 344 === Helpers === 321 345 322 nahoWiki provides a bunch of helpers to help you integrate the wiki in your 346 nahoWiki provides a bunch of helpers to help you integrate the wiki in your 323 347 application. 324 348 … … 346 370 347 371 Note that the namespaces will be passed through __(). 348 Example : translate_namespaces('ns1:ns2:page', ' ') could return 372 Example : translate_namespaces('ns1:ns2:page', ' ') could return 349 373 "My first namespace My second namespace page" depending on your app.yml. 350 374 … … 353 377 nahoWiki provides basic support for Interwiki. 354 378 355 The main syntax is `[[Key>PageName Title]]`, and it outputs a link to the page 356 "PageName" of the wiki named "Key", preceded by a nice icon telling the user 379 The main syntax is `[[Key>PageName Title]]`, and it outputs a link to the page 380 "PageName" of the wiki named "Key", preceded by a nice icon telling the user 357 381 this is an Interwiki link. 358 382 359 If the file named `web/nahoWikiPlugin/images/interwiki/key.gif` exists (or 360 `.png` or `.jpg`) it will be used, else we use the generic `interwiki.png` 361 [[Image(source:plugins/nahoWikiPlugin/trunk/web/images/interwiki.png, 383 If the file named `web/nahoWikiPlugin/images/interwiki/key.gif` exists (or 384 `.png` or `.jpg`) it will be used, else we use the generic `interwiki.png` 385 [[Image(source:plugins/nahoWikiPlugin/trunk/web/images/interwiki.png, 362 386 image/x-trac-wiki)]] 363 387 364 To add a new Interwiki, just create a file named `interwiki.yml` in your app's 388 To add a new Interwiki, just create a file named `interwiki.yml` in your app's 365 389 folder, and add the key you want : 366 390 … … 378 402 Page names support namespaces. 379 403 380 If an internal link points to a unexisting page, it's show to the user, using 381 different models : `internal_link_model` for links to existing pages, 404 If an internal link points to a unexisting page, it's show to the user, using 405 different models : `internal_link_model` for links to existing pages, 382 406 `internal_link_broken_model` for links to unexisting pages. 383 407 384 408 ==== Namespaces ==== 385 409 386 Namespaces work just the same way than 410 Namespaces work just the same way than 387 411 [http://www.splitbrain.org/projects/dokuwiki DokuWiki] 388 412 389 == TODO == 413 Not that you can "expand" namespaces by adding expanded name in app.yml's `namespaces` 414 option. This will work with `translate_namespaces` helper. 415 416 == Ideas for the future == 390 417 391 418 * User manual for advanced features (mainly namespaces and interwiki) plugins/nahoWikiPlugin/branches/1.2/config/app.yml
r18496 r18506 13 13 # routes_register: on # Enable embedded routing rules ? 14 14 # wrap_class: nahoWiki # All pages are wrapped in a <div class="..."> tag. This is its class name. 15 # compress_old_revisions: on # With this option enabled, old revisions are stored as gzip-compressed (saves space) 15 16 # 16 17 # # Rendering for internal links, you may need to customize the *_model options if you change rendering engine … … 41 42 # # Put here "human" names for your namespaces, example : 42 43 # # ns: NameSpace 44 # 45 # # Form names 46 # # You cannot change form names directly in the configure method : it would not impact the actions and forms wouldn't work anymore 47 # edit_form_name: wiki_edit 48 # diff_form_name: wiki_diff plugins/nahoWikiPlugin/branches/1.2/lib/actions/BasenahoWikiActions.php
r18496 r18506 17 17 class BasenahoWikiActions extends sfActions 18 18 { 19 19 20 20 public function preExecute() 21 21 { … … 23 23 $this->startPage = sfConfig::get('app_nahoWikiPlugin_start_page', 'index'); 24 24 $this->credentialsEdit = sfConfig::get('app_nahoWikiPlugin_credentials_edit', array()); 25 } 26 27 protected function setPage(sfWebRequest $request, $page_name = null) 28 { 25 $this->formName = null; 26 27 // Disable escaping 28 sfOutputEscaper::markClassesAsSafe(array( 29 'nahoWikiContent', 30 'nahoWikiPage', 31 'nahoWikiRevision', 32 'nahoWikiContentPeer', 33 'nahoWikiPagePeer', 34 'nahoWikiRevisionPeer', 35 )); 36 } 37 38 protected function setPage(sfWebRequest $request, $page_name = null, $formType = null) 39 { 40 if ($request->getMethod() == sfRequest::GET || is_null($formType)) 41 { 42 $params = $request->extractParameters(array('page', 'revision_old', 'revision_new', 'revision')); 43 } 44 else 45 { 46 $this->formName = sfConfig::get('app_nahoWikiPlugin_'.$formType.'_form_name', 'wiki_'.$formType); 47 $params = $request->getParameter($this->formName); 48 } 49 29 50 // Get page from request if not given as parameter (default behaviour) 30 if (is_null($page_name)) 31 { 32 $page_name = $request->getParameter('page', $this->startPage);33 } 34 51 if (is_null($page_name)) 52 { 53 $page_name = isset($params['page']) ? $params['page'] : $this->startPage; 54 } 55 35 56 // Handle case insensitivity 36 57 $page_name = strtolower($page_name); 37 58 38 59 // Support default page if not specified in namespace 39 if (substr($page_name, -1) == ':') 60 if (substr($page_name, -1) == ':') 40 61 { 41 62 $page_name .= $this->startPage; 42 63 } 43 64 44 65 // Retrieve the page, or start a new one if cannot be found 45 66 $this->page = nahoWikiPagePeer::retrieveByName($page_name); 46 if (!$this->page) 67 if (!$this->page) 47 68 { 48 69 $this->initNewPage($page_name); 49 70 } 50 71 51 72 // Retrieve the revision 52 73 // Supports revision_old & revision_new, transformed into revision[old] & revision[new] 53 if (!is_null($request->getParameter('revision_old')) && !is_null($request->getParameter('revision_new'))) 54 { 55 $request->addRequestParameters(array('revision' => array( 56 'old' => $request->getParameter('revision_old'), 57 'new' => $request->getParameter('revision_new'), 58 ))); 59 $request->getParameterHolder()->remove('revision_old'); 60 $request->getParameterHolder()->remove('revision_new'); 74 // This trick is required because of sfRouting not recognizing [] in urls 75 if (isset($params['revision_old']) && isset($params['revision_new'])) 76 { 77 $params['revision'] = array('old' => $params['revision_old'], 'new' => $params['revision_new']); 78 // Cleans request 79 if (is_null($this->formName)) 80 { 81 $request->setParameter('revision', $params['revision']); 82 } 83 else 84 { 85 $request->addRequestParameters(array($this->formName => array('revision' => $params['revision']))); 86 } 61 87 } 62 88 // Can be "revision", "revision[new]", depending on how parameters are passed 63 $revision = $request->getParameter('revision', $this->page->getLatestRevision());89 $revision = isset($params['revision']) ? $params['revision'] : $this->page->getLatestRevision(); 64 90 if (is_array($revision)) 65 91 { … … 67 93 } 68 94 $this->revision = $this->page->getRevision($revision); 69 if (!$this->revision) 95 if (!$this->revision) 70 96 { 71 97 $this->initNewRevision(); 72 98 } 73 99 74 100 // Generate the URI parameters to keep trace of the requested page 75 101 $this->uriParams = 'page=' . $this->page->getName(); 76 if ($this->revision->getRevision() != $this->page->getLatestRevision()) 102 if ($this->revision->getRevision() != $this->page->getLatestRevision()) 77 103 { 78 104 $this->uriParams .= '&revision=' . $this->revision->getRevision(); 79 105 } 80 106 81 107 // Permissions management 82 108 $this->canView = $this->page->canView($this->getUser()); 83 109 $this->canEdit = $this->page->canEdit($this->getUser()); 84 110 } 85 111 86 112 protected function initNewRevision() 87 113 { … … 89 115 $this->revision->setnahoWikiPage($this->page); 90 116 $this->revision->initUserName(); 91 92 if (!$this->page->isNew()) 117 118 if (!$this->page->isNew()) 93 119 { 94 120 $this->revision->setRevision($this->page->getLatestRevision()+1); 95 121 } 96 122 } 97 123 98 124 protected function initNewPage($page_name) 99 125 { … … 102 128 } 103 129 130 protected function checkFormName(sfForm $form) 131 { 132 if ($form->getName() != $this->formName) 133 { 134 throw new Exception('nahoWikiPlugin configuration error - You changed form name without changing value of corresponding *_form_name option'); 135 } 136 } 137 104 138 protected function forward403Unless($condition) 105 139 { 106 if ($condition) 107 { 108 140 if ($condition) 141 { 142 109 143 return; 110 144 } 111 145 112 if ($this->getUser()->isAuthenticated()) 146 if ($this->getUser()->isAuthenticated()) 113 147 { 114 148 return $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action')); 115 } 116 else 149 } 150 else 117 151 { 118 152 return $this->forward(sfConfig::get('sf_login_module'), sfConfig::get('sf_login_action')); 119 153 } 120 154 } 121 122 155 156 123 157 protected function updateBreadcrumbs() 124 158 { 125 if (!$this->page->isNew()) 159 if (!$this->page->isNew()) 126 160 { 127 161 $breadcrumbs = $this->getUser()->getAttribute('breadcrumbs', array(), 'nahoWiki'); 128 if (!in_array($this->page->getName(), $breadcrumbs)) 162 if (!in_array($this->page->getName(), $breadcrumbs)) 129 163 { 130 164 $breadcrumbs[] = $this->page->getName(); 131 165 } 132 if (count($breadcrumbs) > sfConfig::get('app_nahoWikiPlugin_max_breadcrumbs', 5)) 166 if (count($breadcrumbs) > sfConfig::get('app_nahoWikiPlugin_max_breadcrumbs', 5)) 133 167 { 134 168 array_shift($breadcrumbs); … … 137 171 } 138 172 } 139 140 173 174 141 175 public function executeIndex(sfWebRequest $request) 142 176 { 143 177 144 178 return $this->forward('nahoWiki', 'view'); 145 179 } 146 180 147 181 public function executeView(sfWebRequest $request) 148 182 { 149 183 $this->setPage($request); 150 184 $this->forward403Unless($this->canView); 151 185 152 186 $this->updateBreadcrumbs(); 153 154 return sfView::SUCCESS; 155 } 156 187 188 return sfView::SUCCESS; 189 } 190 157 191 public function executeEdit(sfWebRequest $request) 158 192 { 159 $this->setPage($request );193 $this->setPage($request, null, 'edit'); 160 194 $this->form = new nahoWikiEditForm($this->revision, array(), array('can-edit' => $this->canEdit)); 161 195 162 196 // Do not reject here if not canEdit, cause it then fallbacks on "view source" feature 163 $this->forward403Unless($this->canView); 164 197 $this->forward403Unless($this->canView); 198 165 199 // Generate the username (this is done by the Revision model) 166 200 $tmp_revision = new nahoWikiRevision; 167 201 $tmp_revision->initUserName(); 168 202 $this->userName = $tmp_revision->getUserName(); 169 203 170 204 // Save changes 171 if ($request->isMethod(sfRequest::POST)) 172 { 205 $this->showPreview = false; 206 if ($request->isMethod(sfRequest::POST)) 207 { 208 // To prevent nahoWiki administrators to change form name without touching app.yml, force the behavior ! 209 $this->checkFormName($this->form); 210 173 211 // Here we must be able to edit 174 212 $this->forward403Unless($this->canEdit); 175 $this->form->bind($request->getP ostParameters());176 213 $this->form->bind($request->getParameter($this->form->getName())); 214 177 215 if ($this->form->isValid()) 178 216 { 179 if ($this->form->save()) 217 $this->showPreview = $this->form->getValue('request-preview'); 218 if ($this->form->save()) 180 219 { 181 220 $this->redirect('nahoWiki/view?page=' . $this->page->getName()); … … 183 222 } 184 223 } 185 224 186 225 return sfView::SUCCESS; 187 226 } … … 189 228 public function executeHistory(sfWebRequest $request) 190 229 { 191 $this->setPage($request );192 $this->forward403Unless($this->canView); 193 230 $this->setPage($request, null, 'diff'); 231 $this->forward403Unless($this->canView); 232 194 233 $this->form = new nahoWikiHistoryForm($this->page); 195 234 196 235 return sfView::SUCCESS; 197 236 } … … 199 238 public function executeDiff(sfWebRequest $request) 200 239 { 201 $this->setPage($request ); // $this->revision is revision2202 $this->forward403Unless($this->canView); 203 240 $this->setPage($request, null, 'diff'); // $this->revision is revision2 241 $this->forward403Unless($this->canView); 242 204 243 $this->forward404If($this->page->isNew()); 205 244 $this->forward404If($this->revision->isNew()); 206 245 207 246 $this->form = new nahoWikiHistoryForm($this->page); 208 $this->form->bindToRequest($request); 247 248 if ($request->getMethod() == sfRequest::POST) 249 { 250 $this->form->bind($request->getParameter($this->form->getName())); 251 // To prevent nahoWiki administrators to change form name without touching app.yml, force the behavior ! 252 // Note : this has not to be done with GET method, as it must work with routing 253 $this->checkFormName($this->form); // Okay, it should ne be necessary as we should come from history, but still... 254 } 255 else 256 { 257 $this->form->bind($request->extractParameters($this->form->getWidgetSchema()->getPositions())); 258 } 259 209 260 $this->forward404Unless($this->form->isValid()); 210 261 211 262 $this->revision1 = $this->form->getRevision('old'); 212 263 $this->forward404Unless($this->revision1); 213 264 214 265 $this->revision2 = $this->form->getRevision('new'); 215 266 $this->forward404Unless($this->revision2); 216 217 $this->diff = $this->form->renderDiff($ request->getParameter('mode', 'inline'));218 267 268 $this->diff = $this->form->renderDiff($this->form->getValue('mode')); 269 219 270 // Direct download 220 if ($request->getParameter('raw')) 271 if ($request->getParameter('raw')) 221 272 { 222 273 $this->getResponse()->setContentType('text/plain'); 223 274 $this->renderText($this->diff); 224 275 225 276 return sfView::NONE; 226 277 } 227 228 return sfView::SUCCESS; 229 } 230 278 279 return sfView::SUCCESS; 280 } 281 231 282 public function executeUser(sfWebRequest $request) 232 283 { 233 284 $this->setPage($request, 'User:' . $request->getParameter('name')); 234 285 $this->forward403Unless($this->canView); 235 236 return sfView::SUCCESS; 237 } 238 286 287 return sfView::SUCCESS; 288 } 289 239 290 protected function buildIndexTree(&$tree, $path, $fullpath, $expanded) 240 291 { 241 if (count($path) == 1) 292 if (count($path) == 1) 242 293 { 243 294 $tree[$path[0]] = $fullpath; 244 } 245 else 295 } 296 else 246 297 { 247 298 $category = array_shift($path) . ':'; 248 if (!isset($tree[$category])) 299 if (!isset($tree[$category])) 249 300 { 250 301 $tree[$category] = array(); 251 302 } 252 if (count($expanded) && $category == $expanded[0] . ':') 303 if (count($expanded) && $category == $expanded[0] . ':') 253 304 { 254 305 array_shift($expanded); … … 257 308 } 258 309 } 259 310 260 311 public function executeBrowse(sfWebRequest $request) 261 312 { 262 313 $this->setPage($request); 263 314 264 315 $path = $request->getParameter('path'); 265 316 $tree = array(); 266 317 267 318 $c = new Criteria; 268 319 $c->addAscendingOrderByColumn(nahoWikiPagePeer::NAME); 269 320 $pages = nahoWikiPagePeer::doSelect($c); 270 271 foreach ($pages as $page) 321 322 foreach ($pages as $page) 272 323 { 273 324 $this->buildIndexTree($tree, explode(':', $page->getName()), $page->getName(), explode(':', $path)); 274 325 } 275 326 276 327 $this->tree = $tree; 277 328 $this->uriParams = 'page=' . urlencode($request->getParameter('page')); 278 279 return sfView::SUCCESS; 280 } 281 329 330 return sfView::SUCCESS; 331 } 332 282 333 } plugins/nahoWikiPlugin/branches/1.2/lib/actions/BasenahoWikiComponents.php
r17862 r18506 4 4 * 5 5 * @package symfony 6 * @subpackage plugin 6 * @subpackage plugin 7 7 * @version SVN: $Id$ 8 8 */ … … 10 10 class BasenahoWikiComponents extends sfComponents 11 11 { 12 12 13 public function preExecute() 14 { 15 // Disable escaping 16 sfOutputEscaper::markClassesAsSafe(array( 17 'nahoWikiContent', 18 'nahoWikiPage', 19 'nahoWikiRevision' 20 )); 21 } 22 13 23 public function executeContent() 14 24 { … … 16 26 $this->hide_toc = !sfConfig::get('app_nahoWikiPlugin_include_toc', true); 17 27 } 18 28 19 29 $start = sfConfig::get('app_nahoWikiPlugin_start_page', 'index'); 20 30 if (!($page_name = $this->pagename)) { 21 31 $page_name = $start; 22 32 } 23 33 24 34 // Support default page if not specified in namespace 25 35 if (substr($page_name, -1) == ':') { 26 36 $page_name .= $start; 27 37 } 28 38 29 39 // Retrieve the page, or start a new one if cannot be found 30 40 $this->page = nahoWikiPagePeer::retrieveByName($page_name); 31 41 32 42 // Build page object 33 43 if (!$this->page) { … … 41 51 $this->revision = $this->page->getRevision($revision); 42 52 } 43 53 44 54 // Buil revision object 45 55 if (!$this->revision) { … … 47 57 $this->revision->setnahoWikiPage($this->page); 48 58 } 49 59 50 60 // Generate the URI parameters to keep trace of the requested page 51 61 $this->uriParams = 'page=' . urlencode($this->page->getName()); … … 53 63 $this->uriParams .= '&revision=' . urlencode($this->revision->getRevision()); 54 64 } 55 65 56 66 // Permissions 57 67 $this->canView = $this->page->canView($this->getUser()); 58 68 $this->canEdit = $this->page->canEdit($this->getUser()); 59 69 } 60 70 61 71 } plugins/nahoWikiPlugin/branches/1.2/lib/config/nahoWikiConfiguration.php
r17862 r18506 34 34 $r->prependRoute('wiki_diff_full', new sfRoute('/wiki/diff.:mode/:page/:revision_old/:revision_new', array('module' => 'nahoWiki', 'action' => 'diff', 'raw' => '0'))); 35 35 $r->prependRoute('wiki_diff_raw', new sfRoute('/wiki/diff.:mode.txt/:page/:revision_old/:revision_new', array('module' => 'nahoWiki', 'action' => 'diff', 'raw' => '1'))); 36 37 // Lucene route 38 $r->prependRoute('wiki_lucene', new sfRoute('/wiki/view-result/:sf_highlight/:page', array('module' => 'nahoWiki', 'action' => 'view'))); 36 39 } 37 40 plugins/nahoWikiPlugin/branches/1.2/lib/forms/nahoWikiEditForm.php
r17862 r18506 1 <?php 1 <?php 2 2 3 3 class nahoWikiEditForm extends PluginnahoWikiEditForm 4 4 { 5 5 6 /** 7 * Default available options : 8 * 'form-name' => Name of the form, defines name format (default is 'wiki_edit') 9 * 'can-edit' => Can the user edit the form, or just view it (default depends on user's permissions) 10 */ 6 11 public function configure() 7 12 { 8 13 9 14 } 10 15 11 16 } plugins/nahoWikiPlugin/branches/1.2/lib/forms/nahoWikiHistoryForm.php
r17862 r18506 3 3 class nahoWikiHistoryForm extends PluginnahoWikiHistoryForm 4 4 { 5 5 6 /** 7 * Default available options : 8 * 'form-name' => Name of the form, defines name format (default is 'wiki_diff') 9 */ 6 10 public function configure() 7 11 { 8 12 9 13 } 10 14 11 15 } plugins/nahoWikiPlugin/branches/1.2/lib/forms/nahoWikiRevisionsWidget.php
r17862 r18506 3 3 class nahoWikiRevisionsWidget extends sfWidgetForm 4 4 { 5 5 6 6 protected function configure($options = array(), $attributes = array()) 7 7 { 8 8 $this->addRequiredOption('page'); 9 9 } 10 10 11 11 public function render($name, $value = null, $attributes = array(), $errors = array()) 12 12 { … … 16 16 throw new Exception('Option "page" must be instance of nahoWikiPage'); 17 17 } 18 18 19 19 sfApplicationConfiguration::getActive()->loadHelpers(array('Date', 'I18n', 'nahoWiki')); 20 21 $head = $this->renderContentTag('thead', 22 $this->renderContentTag('tr', 20 21 $head = $this->renderContentTag('thead', 22 $this->renderContentTag('tr', 23 23 $this->renderContentTag('th', __('Compare'), array('colspan' => 2)). 24 24 $this->renderContentTag('th', __('Revision')). … … 28 28 ) 29 29 ); 30 30 31 31 $content = ''; 32 32 foreach ($page->getRevisions() as $revision) … … 42 42 $attrNew['checked'] = 'checked'; 43 43 } 44 $content .= $this->renderContentTag('tr', 44 $content .= $this->renderContentTag('tr', 45 45 $this->renderContentTag('td', $this->renderTag('input', $attrOld)). 46 46 $this->renderContentTag('td', $this->renderTag('input', $attrNew)). … … 48 48 $this->renderContentTag('td', format_datetime($revision->getCreatedAt('U'))). 49 49 $this->renderContentTag('td', link_to_wiki_user(null, $revision->getUserName())). 50 $this->renderContentTag('td', $this->renderContentTag('em', $revision->getComment()))50 $this->renderContentTag('td', $this->renderContentTag('em', sfOutputEscaper::escape(ESC_SPECIALCHARS, $revision->getComment()))) 51 51 ); 52 52 } 53 53 $body = $this->renderContentTag('tbody', $content); 54 54 55 55 return $this->renderContentTag('table', $head.$body, array('class' => 'wiki-history')); 56 56 } 57 57 58 58 } plugins/nahoWikiPlugin/branches/1.2/lib/forms/plugin/PluginnahoWikiEditForm.php
r18496 r18506 3 3 class PluginnahoWikiEditForm extends sfForm 4 4 { 5 5 6 6 /** 7 * 7 * 8 8 * @var nahoWikiRevision 9 9 */ 10 10 protected $object; 11 11 12 12 /** 13 * 13 * 14 14 * @param $revision 15 15 * @param $options … … 19 19 public function __construct(nahoWikiRevision $revision, $defaults = array(), $options = array(), $CSRFSecret = null) 20 20 { 21 var_dump($revision->getContent()); 21 22 $this->object = $revision; 22 23 23 24 parent::__construct($defaults, $options, $CSRFSecret); 24 25 } 25 26 26 27 /** 27 28 * (non-PHPdoc) … … 31 32 { 32 33 sfApplicationConfiguration::getActive()->loadHelpers('I18N'); 33 34 34 35 $this->setWidgets(array( 36 'page' => new sfWidgetFormInputHidden(array('default' => $this->object->getnahoWikiPage()->getName())), 37 'revision' => new sfWidgetFormInputHidden(array('default' => $this->object->getRevision())), 35 38 'content' => new sfWidgetFormTextarea(array('default' => strval($this->object->getContent())), array('rows' => 20, 'cols' => 80)), 36 39 'comment' => new sfWidgetFormInput(array('default' => $this->object->isNew() ? __('Creation') : $this->object->getComment()), array('size' => 80)), … … 38 41 'request-preview' => new sfWidgetFormInput(array('type' => 'submit', 'label' => __('Preview')), array('class' => 'preview-button', 'value' => __('Preview'))), 39 42 )); 40 43 41 44 $this->setValidators(array( 45 'page' => new sfValidatorPass(), 46 'revision' => new sfValidatorPass(), 42 47 'content' => new sfValidatorString(array('required' => true), array('required' => __('The content cannot be left blank. Please enter some text...'))), 43 48 'comment' => new sfValidatorString(array('required' => true), array('required' => __('Please enter a comment describing your changes shortly.'))), … … 45 50 'request-preview' => new sfValidatorPass(), 46 51 )); 47 48 if (!$this->getOption('can-edit')) 52 53 if (!$this->getOption('can-edit')) 49 54 { 50 55 unset($this['submit'], $this['request-preview']); … … 56 61 $this->setDefault('comment', ''); 57 62 } 63 64 $this->widgetSchema->setNameFormat(sfConfig::get('app_nahoWikiPlugin_edit_form_name', 'wiki_edit').'[%s]'); 58 65 } 59 66 60 67 /** 61 * 68 * 62 69 * @return unknown_type 63 70 */ … … 66 73 $revision = $this->object; 67 74 $page = $revision->getnahoWikiPage(); 68 75 69 76 if (!$page->isNew()) 70 77 { 71 78 $revision->archiveContent(); 72 79 73 80 $revision = new nahoWikiRevision(); 74 81 $revision->initUserName(); … … 76 83 $page->addnahoWikiRevision($revision); 77 84 } 78 85 79 86 $revision->setContent($this->getValue('content')); 80 87 $revision->setComment($this->getValue('comment')); 81 82 if (!$this->getValue('request-preview')) 88 89 if (!$this->getValue('request-preview')) 83 90 { 84 91 $page->setLatestRevision($revision->getRevision()); 85 92 $page->save(); 86 93 87 94 return true; 88 95 } 89 96 90 97 return false; 91 98 } 92 99 93 100 /** 94 101 * Checks that the value has not changed 95 * 102 * 96 103 * @param $value 97 104 * @param $name … … 101 108 { 102 109 $objectValue = call_user_func($this->object, 'get'.ucfirst($name)); 103 110 104 111 if (strval($value) != strval($objectValue)) 105 112 { … … 107 114 } 108 115 } 109 116 110 117 } plugins/nahoWikiPlugin/branches/1.2/lib/forms/plugin/PluginnahoWikiHistoryForm.php
r18496 r18506 3 3 class PluginnahoWikiHistoryForm extends sfForm 4 4 { 5 5 6 6 /** 7 * 7 * 8 8 * @var nahoWikiPage 9 9 */ 10 10 protected $object; 11 11 12 12 /** 13 * 13 * 14 14 * @param $revision 15 15 * @param $options … … 20 20 { 21 21 sfApplicationConfiguration::getActive()->loadHelpers('I18N'); 22 22 23 23 $this->object = $page; 24 24 25 25 parent::__construct($defaults, $options, $CSRFSecret); 26 26 } 27 27 28 28 /** 29 29 * (non-PHPdoc) … … 33 33 { 34 34 $revisions = array('new' => $this->object->getLatestRevision(), 'old' => $this->object->getLatestRevision()-1); 35 36 35 $this->setWidgets(array( 37 36 'page' => new sfWidgetFormInputHidden(array('default' => $this->object->getName())), 37 'mode' => new sfWidgetFormInputHidden(array('default' => 'inline')), 38 38 'revision' => new nahoWikiRevisionsWidget(array('default' => $revisions, 'page' => $this->object, 'label' => __('History'))), 39 39 'submit' => new sfWidgetFormInput(array('type' => 'submit', 'label' => ' '), array('class' => 'submit-button', 'value' => __('View changes between selected versions'))), 40 40 )); 41 41 42 42 $this->setValidators(array( 43 43 'page' => new sfValidatorPass(), 44 'mode' => new sfValidatorPass(), 44 45 'revision' => new sfValidatorPass(), 45 46 'submit' => new sfValidatorPass(), 46 47 )); 48 49 $this->widgetSchema->setNameFormat(sfConfig::get('app_nahoWikiPlugin_diff_form_name', 'wiki_diff').'[%s]'); 47 50 } 48 51 49 52 /** 50 * 53 * 51 54 * @var array of nahoWikiRevision 52 55 */ 53 56 protected $revisions = array(); 54 57 55 58 /** 56 * 59 * 57 60 * @return nahoWikiRevision 58 61 */ … … 64 67 throw new Exception('Revision "'.$type.'" is not defined'); 65 68 } 66 69 67 70 if (isset($this->revisions[$type])) 68 71 { 69 72 return $this->revisions[$type]; 70 73 } 71 74 72 75 // Note : we do not make a query here, we just ask to page all its revisions (cached), as the history widget will retrieve them anyway 73 76 $page_revisions = $this->object->getRevisions(); … … 79 82 } 80 83 } 81 84 82 85 throw new Exception('Revision "'.$type.'" cannot be found'); 83 86 } 84 87 85 88 /** 86 * 89 * 87 90 * @var Text_Diff 88 91 */ 89 92 protected $diff = null; 90 93 91 94 /** 92 * 95 * 93 96 * @return Text_Diff 94 97 */ … … 99 102 return $this->diff; 100 103 } 101 104 102 105 $lines1 = explode("\n", $this->getRevision('old')->getContent()); 103 106 $lines2 = explode("\n", $this->getRevision('new')->getContent()); 104 107 105 108 return $this->diff = new Text_Diff('auto', array($lines1, $lines2)); 106 109 } 107 110 108 111 /** 109 112 * Renders diff 110 * 113 * 111 114 * @param $mode e.g. "inline", "context", or "unified" 112 115 * @return string … … 115 118 { 116 119 $diff = $this->getDiff(); 117 120 118 121 $class = 'Text_Diff_Renderer_' . $mode; 119 122 if (!class_exists($class)) … … 121 124 throw new Exception('Invalid diff renderer "'.$mode.'" (class "'.$class.'" not found)'); 122 125 } 123 126 124 127 $renderer = new $class(); 125 128 126 129 return $renderer->render($diff); 127 130 } 128 129 /** 130 * Binds the request to form, filtering extra values 131 * 132 * @param $request 133 */ 134 public function bindToRequest(sfRequest $request) 135 { 136 $this->bind($request->extractParameters($this->getWidgetSchema()->getPositions())); 137 } 138 131 139 132 } plugins/nahoWikiPlugin/branches/1.2/lib/helper/nahoWikiHelper.php
r18496 r18506 11 11 function link_to_diff($text, $page_name, $rev1, $rev2, $mode = 'inline') 12 12 { 13 $url = nahoWikiPagePeer::url($page_name, null, 'diff'); 14 15 return link_to($text, $url . '&revision_old=' . $rev1 . '&revision_new=' . $rev2 . '&mode=' . $mode . '&raw=0'); 13 $url = nahoWikiPagePeer::url($page_name, null, 'diff', array( 14 'revision_old' => $rev1, 15 'revision_new' => $rev2, 16 'mode' => $mode, 17 'raw' => 0, 18 )); 19 20 return link_to($text, $url); 16 21 } 17 22 … … 27 32 function link_to_raw_diff($text, $page_name, $rev1, $rev2, $mode = 'unified') 28 33 { 29 $url = nahoWikiPagePeer::url($page_name, null, 'diff'); 30 31 return link_to($text, $url . '&revision_old=' . $rev1 . '&revision_new=' . $rev2 . '&mode=' . $mode . '&raw=1'); 34 $url = nahoWikiPagePeer::url($page_name, null, 'diff', array( 35 'revision_old' => $rev1, 36 'revision_new' => $rev2, 37 'mode' => $mode, 38 'raw' => 1, 39 )); 40 41 return link_to($text, $url); 32 42 } 33 43 … … 41 51 * @return string 42 52 */ 43 function url_for_wiki($page_name, $revision = null, $absolute = false) 44 { 45 $url = nahoWikiPagePeer::url($page_name); 46 if (!is_null($revision)) { 47 $url .= '&revision=' . $revision; 48 } 49 53 function url_for_wiki($page_name, $revision = null, $absolute = false, array $params = array()) 54 { 55 if (!is_null($revision)) 56 { 57 $params['revision'] = $revision; 58 } 59 60 $url = nahoWikiPagePeer::url($page_name, null, 'view', $params); 61 50 62 return url_for($url, $absolute); 51 63 } … … 66 78 $options = sfToolkit::stringToArray($options); 67 79 } 68 69 $url = nahoWikiPagePeer::url($page_name); 70 if (isset($options['revision'])) 71 { 72 $url .= '&revision=' . $options['revision']; 73 } 74 if (is_null($text)) 80 81 $params = array(); 82 if (isset($options['revision'])) 83 { 84 $params['revision'] = $options['revision']; 85 } 86 $url = nahoWikiPagePeer::url($page_name, null, 'view', $params); 87 88 if (is_null($text)) 75 89 { 76 90 $text = htmlspecialchars(nahoWikiPagePeer::getBasename($page_name)); 77 if (isset($options['revision'])) 91 if (isset($options['revision'])) 78 92 { 79 93 $text .= ' rev. ' . $options['revision']; 80 94 } 81 95 } 82 96 83 97 return link_to($text, $url, $options); 84 98 } … … 157 171 $options['pagename'] = $page_name; 158 172 $options['revision'] = $revision; 159 173 160 174 include_component('nahoWiki', 'content', $options); 161 175 } … … 176 190 $options['pagename'] = $page_name; 177 191 $options['revision'] = $revision; 178 192 179 193 return get_component('nahoWiki', 'content', $options); 180 194 } … … 193 207 function translate_namespaces($page_name, $new_separator = ':') { 194 208 use_helper('I18N'); 195 196 if ($namespaces = sfConfig::get('app_nahoWikiPlugin_namespaces')) 197 { 198 $parts = explode(':', $page_name); 199 $page_name = array_pop($parts); // exclude page name 200 foreach ($parts as $ns) 209 210 $namespaces = sfConfig::get('app_nahoWikiPlugin_namespaces', array()); 211 212 $parts = explode(':', $page_name); 213 $page_name = array_pop($parts); // exclude page name 214 foreach ($parts as $ns) 215 { 216 if (isset($namespaces[$ns])) 201 217 { 202 if (isset($namespaces[$ns])) 203 { 204 $ns = __($namespaces[$ns]); 205 } 206 $page_name = $ns . $new_separator . $page_name; 218 $ns = __($namespaces[$ns]); 207 219 } 208 } 209 220 $page_name = $ns . $new_separator . $page_name; 221 } 222 210 223 return $page_name; 211 224 } plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiContent.php
r17844 r18506 4 4 * Subclass for representing a row from the 'sf_simple_wiki_content' table. 5 5 * 6 * 6 * 7 7 * 8 8 * @package plugins.nahoWikiPlugin.lib.model 9 */ 9 */ 10 10 class PluginnahoWikiContent extends BasenahoWikiContent 11 11 { 12 12 13 protected $gz_content_unstreamed = null; 14 13 15 public function getGzContent() 14 16 { 15 $v = parent::getGzContent();16 17 if (is_resource($v)) {18 $str = ''; 19 while ($part = fread($v, 1024))17 if (is_null($this->gz_content_unstreamed)) 18 { 19 $v = parent::getGzContent(); 20 21 if (is_resource($v)) 20 22 { 21 $str .= $part; 23 $str = ''; 24 while ($part = fread($v, 1024)) 25 { 26 $str .= $part; 27 } 28 $this->gz_content_unstreamed = $str; 22 29 } 23 24 return $str;25 } else { // it's alreadya stream26 27 return strval($v);30 else 31 { 32 // it's not a stream 33 $this->gz_content_unstreamed = strval($v); 34 } 28 35 } 36 37 return $this->gz_content_unstreamed; 29 38 } 30 39 31 40 } plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiPage.php
r8377 r18506 168 168 } 169 169 170 /** 171 * Shortcut to get content 172 * 173 * @param $revision 174 * @return string 175 */ 176 public function getContent($revision = null) 177 { 178 return $this->getRevision($revision)->getContent(); 179 } 180 170 181 } 182 183 // Lucene integration 184 if (class_exists('sfLucene', true)) 185 { 186 sfLucenePropelBehavior::getInitializer()->setup('nahoWikiPage'); 187 } plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiPagePeer.php
r17862 r18506 4 4 * Subclass for performing query and update operations on the 'sf_simple_wiki_page' table. 5 5 * 6 * 6 * 7 7 * 8 8 * @package plugins.nahoWikiPlugin.lib.model 9 */ 9 */ 10 10 class PluginnahoWikiPagePeer extends BasenahoWikiPagePeer 11 11 { 12 12 13 13 /** 14 14 * Returns the URL to page named $page_name (from $page) … … 18 18 * @return string 19 19 */ 20 public static function url($page_name, $page = null, $action = 'view' )20 public static function url($page_name, $page = null, $action = 'view', array $additionalParameters = array()) 21 21 { 22 return 'nahoWiki/'.$action.'?page=' . $page_name; 22 $params = $additionalParameters + array('page' => $page_name); 23 24 if ($action == 'edit' || $action == 'diff') { 25 // Those actions are attached to corresponding forms 26 //$params = array(sfConfig::get('app_nahoWikiPlugin_'.$action.'_form_name', 'wiki_'.$action) => $params); 27 } 28 29 return 'nahoWiki/'.$action.'?'.http_build_query($params); 23 30 } 24 31 25 32 /** 26 33 * Returns the PCRE mask that validates page names … … 38 45 } 39 46 $mask .= ']+'; 40 47 41 48 return $mask; 42 49 } 43 50 44 51 /** 45 52 * Gets basename from full pagename … … 52 59 $ns_separator = sfConfig::get('app_nahoWikiPlugin_ns_separator', ':'); 53 60 $parts = explode($ns_separator, $page_name); 54 61 55 62 return array_pop($parts); 56 63 } 57 64 58 65 /** 59 66 * Gets namespace from full pagename … … 62 69 * @return string 63 70 */ 64 71 65 72 public static function getNamespace($page_name) 66 73 { … … 68 75 $parts = explode($ns_separator, $page_name); 69 76 array_pop($parts); 70 77 71 78 return implode($ns_separator, $parts); 72 79 } 73 80 74 81 /** 75 82 * Retrieve a page from its name … … 78 85 * @return nahoWikiPage 79 86 */ 80 87 81 88 public static function retrieveByName($name) 82 89 { 83 90 $c = new Criteria; 84 91 $c->add(self::NAME, $name); 85 92 86 93 return self::doSelectOne($c); 87 94 } 88 95 89 96 /** 90 97 * Retrieve pages from their names … … 93 100 * @return array 94 101 */ 95 102 96 103 public static function retrieveByNames($names) 97 104 { 98 105 $c = new Criteria; 99 106 $c->add(self::NAME, $names, Criteria::IN); 100 107 101 108 return self::doSelect($c); 102 109 } 103 110 104 111 /** 105 112 * Retrieve a page from its name … … 108 115 * @return nahoWikiPage 109 116 */ 110 117 111 118 public static function retrieveByNameJoinAll($name) 112 119 { 113 120 $result = self::retrieveByNamesJoinAll(array($name)); 114 121 115 122 if (is_array($result) && count($result)) { 116 123 return $result[0]; … … 119 126 } 120 127 } 121 128 122 129 /** 123 130 * Retrieve pages from their names … … 126 133 * @return array 127 134 */ 128 135 129 136 public static function retrieveByNamesJoinAll($names) 130 137 { 131 138 $c = new Criteria; 132 139 $c->add(self::NAME, $names, Criteria::IN); 133 140 134 141 return nahoWikiRevisionPeer::doSelectJoinAll($c); 135 142 } 136 137 143 144 138 145 } plugins/nahoWikiPlugin/branches/1.2/lib/model/plugin/PluginnahoWikiRevision.php
r17847 r18506 4 4 * Subclass for representing a row from the 'sf_simple_wiki_revision' table. 5 5 * 6 * 6 * 7 7 * 8 8 * @package plugins.nahoWikiPlugin.lib.model 9 */ 9 */ 10 10 class PluginnahoWikiRevision extends BasenahoWikiRevision 11 11 { 12 12 13 13 /** 14 14 * Taken from sfIp2Country … … 44 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 45 } 46 46 47 47 /** 48 48 * Initializes username from context … … 58 58 } 59 59 } 60 60 61 61 /** 62 62 * Is current revision the latest for its page ? … … 68 68 return $this->getRevision() == $this->getPage()->getLatestRevision(); 69 69 } 70 70 71 71 /** 72 72 * Returns the attached page … … 74 74 * @return nahoWikiPage 75 75 */ 76 76 77 77 public function getPage() 78 78 { 79 79 return $this->getnahoWikiPage(); 80 80 } 81 81 82 82 /** 83 83 * Gets content … … 85 85 * @return string 86 86 */ 87 87 88 88 public function getContent() 89 89 { 90 90 $content_storage = $this->getnahoWikiContent(); 91 91 92 92 if (!$content_storage) { 93 93 return null; 94 94 } 95 95 96 96 $uncompressed_content = $content_storage->getContent(); 97 97 $compressed_content = $content_storage->getGzContent(); 98 99 /* Check archive state : shouldn't have to be done 100 if (!$this->isLatest() && $uncompressed_content) { // Old revision has uncompressed content : do archive ! 101 $this->archiveContent(); 102 } elseif ($this->isLatest() && $compressed_content) { // Latest revision has compressed content : unarchive ! 103 $this->unarchiveContent(); 104 } 105 */ 106 107 return $uncompressed_content ? $uncompressed_content : gzinflate($compressed_content); 98 99 return $uncompressed_content ? $uncompressed_content : ($compressed_content ? gzinflate($compressed_content) : ''); 108 100 } 109 101 110 102 /** 111 103 * Gets converted content … … 113 105 * @return string 114 106 */ 115 107 116 108 public function getXHTMLContent() 117 109 { … … 120 112 $content = nahoWikiContentPeer::doConvert($content); 121 113 $content = nahoWikiContentPeer::postConvert($this->getPage(), $content); 122 114 123 115 return $content; 124 116 } 125 117 126 118 /** 127 119 * Defines content … … 129 121 * @param string $content 130 122 */ 131 123 132 124 public function setContent($content) 133 125 { … … 139 131 $content_storage->setContent($content); 140 132 } 141 133 142 134 /** 143 135 * Compress current content to save space … … 145 137 * @return boolean 146 138 */ 147 139 148 140 public function archiveContent() 149 141 { 150 $content_storage = $this->getnahoWikiContent(); 151 152 if (!$content_storage) { 142 if (!sfConfig::get('app_nahoWikiPlugin_compress_old_revisions', true)) 143 { 153 144 return false; 154 145 } 155 146 147 $content_storage = $this->getnahoWikiContent(); 148 149 if (!$content_storage) 150 { 151 return false; 152 } 153 156 154 $uncompressed_content = $content_storage->getContent(); 157 if ($uncompressed_content) { 155 if ($uncompressed_content) 156 { 158 157 $compressed_content = gzdeflate($uncompressed_content, 9); 159 158 $content_storage->setGzContent($compressed_content); … … 161 160 $content_storage->save(); 162 161 } 163 162 164 163 return true; 165 164 } 166 165 167 166 /** 168 167 * Uncompress content … … 170 169 * @return boolean 171 170 */ 172 171 173 172 public function unarchiveContent() 174 173 { 175 174 $content_storage = $this->getnahoWikiContent(); 176 177 if (!$content_storage) { 175 176 if (!$content_storage) 177 { 178 178 return false; 179 179 } 180 180 181 181 $compressed_content = $content_storage->getGzContent(); 182 if ($compressed_content) { 182 if ($compressed_content) 183 { 183 184 $uncompressed_content = gzinflate($compressed_content, 9); 184 185 $content_storage->setGzContent(null); … … 186 187 $content_storage->save(); 187 188 } 188 189 189 190 return true; 190 191 } 191 192 192 193 193 194 } plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_breadcrumbs.php
r18496 r18506 1 1 <?php use_helper('nahoWiki') ?> 2 3 <?php if ($breadcrumbs instanceof sfOutputEscaper) $breadcrumbs = $breadcrumbs->getRawValue() ?> 2 4 3 5 <div class="wiki-breadcrumbs"> 4 6 <?php $first = true; foreach ($breadcrumbs as $breadcrumb): ?> 5 7 <?php if (!$first): ?><span class="wiki-breadcrumbs-separator"><?php echo $breadcrumbs_separator ?></span><?php endif ?> 6 <?php echo link_to_wiki( translate_namespaces($breadcrumb), $breadcrumb) ?>8 <?php echo link_to_wiki(sfOutputEscaper::escape(ESC_SPECIALCHARS, translate_namespaces($breadcrumb)), $breadcrumb) ?> 7 9 <?php $first = false; endforeach ?> 8 10 </div> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_content.php
r7057 r18506 7 7 <h1 class="wiki-title"> 8 8 <?php if (@$preview): ?><em><?php echo __('Preview') ?></em> : <?php endif ?> 9 <?php echo $revision->getPage()->getName() ?>9 <?php echo htmlspecialchars($revision->getPage()->getName()) ?> 10 10 </h1> 11 11 <?php end_slot() ?> … … 17 17 <p class="wiki-warning"> 18 18 <?php echo __('There is no article here yet.') ?> 19 <?php echo link_to(__('Edit this page to contribute.'), 'nahoWiki/edit?' . $ uriParams) ?>19 <?php echo link_to(__('Edit this page to contribute.'), 'nahoWiki/edit?' . $sf_data->getRaw('uriParams')) ?> 20 20 </p> 21 21 <?php else: ?> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_diff.php
r17850 r18506 9 9 <p class="wiki-diff-intro wiki-warning"><?php echo __('There is no difference between the selected revisions.') ?></p> 10 10 <?php else: ?> 11 <pre class="wiki-diff"><?php echo $ diff?></pre>11 <pre class="wiki-diff"><?php echo $sf_data->getRaw('diff') ?></pre> 12 12 <ul class="wiki-diff-links"> 13 13 <li><?php echo link_to_diff(__('View reverse diff'), $page->getName(), $revision2->getRevision(), $revision1->getRevision()) ?></li> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_index.php
r7062 r18506 1 1 <ul> 2 <?php foreach ($ treeas $name => $elements): ?>2 <?php foreach ($sf_data->getRaw('tree') as $name => $elements): ?> 3 3 <li> 4 4 <?php 5 $name = sfOutputEscaper::escape(ESC_SPECIALCHARS, $name); 6 5 7 if (is_array($elements)) { 6 8 $fullpath = ($base ? $base . ':' : '') . substr($name, 0, -1); 7 9 $class = 'wiki-link-category wiki-link-category-' . (count($elements) ? 'open' : 'closed'); 8 10 echo link_to($name, 'nahoWiki/browse?path=' . urlencode($fullpath) . '&' . $uriParams, 'class=' . $class); 9 include_partial('index', array('tree' => $elements, 'base' => $fullpath, 'uriParams' => $ uriParams));11 include_partial('index', array('tree' => $elements, 'base' => $fullpath, 'uriParams' => $sf_data->getRaw('uriParams'))); 10 12 } else { 11 13 echo link_to_wiki($name, $elements, 'class=wiki-link-page'); plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page.php
r7057 r18506 1 1 <?php use_helper('I18N') ?> 2 2 3 <?php include_partial('page_tools', array('uriParams' => $ uriParams, 'canView' => $canView, 'canEdit' => $canEdit)) ?>3 <?php include_partial('page_tools', array('uriParams' => $sf_data->getRaw('uriParams'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 4 4 5 5 <?php if (!$canView): ?> … … 11 11 <?php endif ?> 12 12 13 <?php include_partial('content', array('preview' => false, 'revision' => $revision, 'no_article' => $page->isNew(), 'uriParams' => $ uriParams, 'hide_toc' => !sfConfig::get('app_nahoWikiPlugin_include_toc', true))) ?>13 <?php include_partial('content', array('preview' => false, 'revision' => $revision, 'no_article' => $page->isNew(), 'uriParams' => $sf_data->getRaw('uriParams'), 'hide_toc' => !sfConfig::get('app_nahoWikiPlugin_include_toc', true))) ?> 14 14 15 15 <?php endif ?> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_actions.php
r7062 r18506 1 1 <ul class="wiki-actions"> 2 2 <?php if ($canView): ?> 3 <li class="wiki-action-view<?php echo $action == 'view' ? ' active' : '' ?>"><?php 4 echo link_to(__('View'), 'nahoWiki/view?' . $ uriParams) ?></li>5 <li class="wiki-action-edit<?php echo $action == 'edit' ? ' active' : '' ?>"><?php 6 echo link_to(__($canEdit ? 'Edit' : 'View source'), 'nahoWiki/edit?' . $ uriParams) ?></li>7 <li class="wiki-action-history<?php echo $action == 'history' || $action == 'diff' ? ' active' : '' ?>"><?php 8 echo link_to(__('History'), 'nahoWiki/history?' . $ uriParams) ?></li>3 <li class="wiki-action-view<?php echo $action == 'view' ? ' active' : '' ?>"><?php 4 echo link_to(__('View'), 'nahoWiki/view?' . $sf_data->getRaw('uriParams')) ?></li> 5 <li class="wiki-action-edit<?php echo $action == 'edit' ? ' active' : '' ?>"><?php 6 echo link_to(__($canEdit ? 'Edit' : 'View source'), 'nahoWiki/edit?' . $sf_data->getRaw('uriParams')) ?></li> 7 <li class="wiki-action-history<?php echo $action == 'history' || $action == 'diff' ? ' active' : '' ?>"><?php 8 echo link_to(__('History'), 'nahoWiki/history?' . $sf_data->getRaw('uriParams')) ?></li> 9 9 <?php endif ?> 10 <li class="wiki-action-index<?php echo $action == 'browse' ? ' active' : '' ?>"><?php 11 echo link_to(__('Index'), 'nahoWiki/browse?' . $ uriParams) ?></li>10 <li class="wiki-action-index<?php echo $action == 'browse' ? ' active' : '' ?>"><?php 11 echo link_to(__('Index'), 'nahoWiki/browse?' . $sf_data->getRaw('uriParams')) ?></li> 12 12 </ul> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_edit.php
r18496 r18506 11 11 <?php endif ?> 12 12 13 <form method="post" action="<?php echo url_for('nahoWiki/edit ?' . $uriParams) ?>" name="edit_page" id="edit_page" class="wiki-form">14 13 <form method="post" action="<?php echo url_for('nahoWiki/edit') ?>" name="edit_page" id="edit_page" class="wiki-form"> 14 15 15 <?php if ($canEdit): ?> 16 16 <?php if (!$sf_user->isAuthenticated()): ?> … … 20 20 <?php endif ?> 21 21 <?php endif ?> 22 22 23 23 <ul> 24 24 <?php echo $form->renderUsing('list') ?> 25 25 </ul> 26 26 27 27 </form> 28 28 29 <?php if ($s f_request->getParameter('request-preview')): ?>29 <?php if ($showPreview): ?> 30 30 <p class="wiki-warning"><?php echo __('This is a preview of how your text will look like. Remember: <strong>It is not saved yet</strong> !') ?></p> 31 <?php include_partial('content', array('preview' => true, 'revision' => $ revision, 'uriParams' => $uriParams)) ?>31 <?php include_partial('content', array('preview' => true, 'revision' => $page->getRevision(), 'uriParams' => $uriParams)) ?> 32 32 <?php endif ?> 33 33 plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_history.php
r17862 r18506 8 8 9 9 <?php if (@$revision1 && @$revision2): ?> 10 <?php include_partial('diff', array('page' => $page, 'revision1' => $revision1, 'revision2' => $revision2, 'diff' => $ diff)) ?>10 <?php include_partial('diff', array('page' => $page, 'revision1' => $revision1, 'revision2' => $revision2, 'diff' => $sf_data->getRaw('diff'))) ?> 11 11 <?php endif ?> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_page_tools.php
r7057 r18506 12 12 <?php slot('wiki_page_actions') ?> 13 13 <?php $action = sfContext::getInstance()->getActionName() ?> 14 <?php include_partial('page_actions', array('action' => $action, 'uriParams' => $ uriParams, 'canView' => $canView, 'canEdit' => $canEdit)) ?>14 <?php include_partial('page_actions', array('action' => $action, 'uriParams' => $sf_data->getRaw('uriParams'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 15 15 <?php end_slot() ?> 16 16 <?php if ($include_actions_slot) include_slot('wiki_page_actions') ?> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/_toc.php
r7057 r18506 2 2 3 3 <ul class="wiki-toc-level<?php echo $i ?>"> 4 <?php foreach ($ tocas $title): ?>4 <?php foreach ($sf_data->getRaw('toc') as $title): ?> 5 5 <li class="wiki-toc-level<?php echo $i ?>"> 6 6 <?php if (@$title['title']): ?> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/browseSuccess.php
r7057 r18506 2 2 <div class="<?php echo sfConfig::get('app_nahoWikiPlugin_wrap_class', 'nahoWiki') ?>"> 3 3 4 <?php include_partial('page_tools', array('uriParams' => $ uriParams, 'canView' => $canView, 'canEdit' => $canEdit)) ?>4 <?php include_partial('page_tools', array('uriParams' => $sf_data->getRaw('uriParams'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 5 5 6 6 <h1 class="wiki-title"><?php echo __('Index by title') ?></h1> … … 8 8 <div class="wiki-index"> 9 9 <p><?php echo __('All the pages of the wiki are listed here, sorted by category and name.') ?></p> 10 <?php include_partial('index', array('tree' => $ tree, 'base' => '', 'uriParams' => $uriParams)) ?>10 <?php include_partial('index', array('tree' => $sf_data->getRaw('tree'), 'base' => '', 'uriParams' => $sf_data->getRaw('uriParams'))) ?> 11 11 </div> 12 12 plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/diffSuccess.php
r17862 r18506 3 3 <?php include_partial('page_tools', array('uriParams' => 'page=' . urlencode($page->getName()), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 4 4 5 <?php include_partial('page_history', array('form' => $form, 'page' => $page, 'revision1' => $revision1, 'revision2' => $revision2, 'diff' => $ diff, 'canView' => $canView, 'canEdit' => $canEdit)) ?>5 <?php include_partial('page_history', array('form' => $form, 'page' => $page, 'revision1' => $revision1, 'revision2' => $revision2, 'diff' => $sf_data->getRaw('diff'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 6 6 7 7 </div> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/editSuccess.php
r17844 r18506 1 1 <div class="<?php echo sfConfig::get('app_nahoWikiPlugin_wrap_class', 'nahoWiki') ?>"> 2 2 3 <?php include_partial('page_tools', array('uriParams' => $ uriParams, 'canView' => $canView, 'canEdit' => $canEdit)) ?>3 <?php include_partial('page_tools', array('uriParams' => $sf_data->getRaw('uriParams'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 4 4 5 <?php include_partial('page_edit', array('form' => $form, 'page' => $page, 'revision' => $revision, 'uriParams' => $ uriParams, 'userName' => $userName, 'canView' => $canView, 'canEdit' => $canEdit)) ?>5 <?php include_partial('page_edit', array('form' => $form, 'page' => $page, 'revision' => $revision, 'uriParams' => $sf_data->getRaw('uriParams'), 'userName' => $sf_data->getRaw('userName'), 'canView' => $canView, 'canEdit' => $canEdit, 'showPreview' => $showPreview)) ?> 6 6 7 7 </div> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/userSuccess.php
r7057 r18506 6 6 <?php end_slot() ?> 7 7 8 <?php include_partial('page', array('page' => $page, 'revision' => $revision, 'uriParams' => $ uriParams, 'canView' => $canView, 'canEdit' => $canEdit)) ?>8 <?php include_partial('page', array('page' => $page, 'revision' => $revision, 'uriParams' => $sf_data->getRaw('uriParams'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 9 9 10 10 </div> plugins/nahoWikiPlugin/branches/1.2/modules/nahoWiki/templates/viewSuccess.php
r7057 r18506 1 1 <div class="<?php echo sfConfig::get('app_nahoWikiPlugin_wrap_class', 'nahoWiki') ?>"> 2 2 3 <?php include_partial('page', array('page' => $page, 'revision' => $revision, 'uriParams' => $ uriParams, 'canView' => $canView, 'canEdit' => $canEdit)) ?>3 <?php include_partial('page', array('page' => $page, 'revision' => $revision, 'uriParams' => $sf_data->getRaw('uriParams'), 'canView' => $canView, 'canEdit' => $canEdit)) ?> 4 4 5 5 </div> plugins/nahoWikiPlugin/branches/1.2/package.xml
r17862 r18506 3 3 xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" 4 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd 5 xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd 6 6 http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> 7 7 <name>nahoWikiPlugin</name> … … 9 9 <summary>Simple Wiki system plugin.</summary> 10 10 <description>A simple, but full-featured, Wiki system for Symfony applications. Provides following main features : 11 * I18n-ready (Embedded languages : en, fr). 12 * Full versionning of all changes. 13 * Pages can be contributed by anonymous or requires registered users. 14 * Support for InterWiki standard. 15 * Table of contents for each page. 16 * Support for page categories. 17 * Full index. 18 * External syntax engine : you can choose your engine freely (works well with sfMarkdownPlugin)</description> 11 12 * Search engine with sfLucene. 13 * I18n-ready (Embedded languages : en, fr). 14 * Full versionning of all changes. 15 * Pages can be contributed by anonymous or requires registered users. 16 * Support for InterWiki standard. 17 * Table of contents for each page. 18 * Support for page categories. 19 * Full index. 20 * External syntax engine : you can choose your engine freely (works well with sfMarkdownPlugin)</description> 19 21 <lead> 20 22 <name>Nicolas Chambrier (naholyr)</name> … … 23 25 <active>yes</active> 24 26 </lead> 25 <date>2009-05- 02</date>27 <date>2009-05-21</date> 26 28 <version> 27 <release>1.2. 0</release>28 <api>1.2. 0</api>29 <release>1.2.1</release> 30 <api>1.2.1</api> 29 31 </version> 30 32 <stability> … … 72 74 <dir name="nahoWiki"> 73 75 <dir name="templates"> 74 <file role="data" name="_page_actions.php" /> 75 <file role="data" name="_toc.php" /> 76 <file role="data" name="_page_edit.php" /> 77 <file role="data" name="_page.php" /> 78 <file role="data" name="editSuccess.php" /> 79 <file role="data" name="_index.php" /> 76 <file role="data" name="_breadcrumbs.php" /> 80 77 <file role="data" name="_content.php" /> 81 78 <file role="data" name="_diff.php" /> 79 <file role="data" name="_index.php" /> 80 <file role="data" name="_page_actions.php" /> 81 <file role="data" name="_page_edit.php" /> 82 <file role="data" name="_page_history.php" /> 82 83 <file role="data" name="_page_tools.php" /> 84 <file role="data" name="_page.php" /> 85 <file role="data" name="_searchResult.php" /> 86 <file role="data" name="_toc.php" /> 83 87 <file role="data" name="browseSuccess.php" /> 88 <file role="data" name="diffSuccess.php" /> 89 <file role="data" name="editSuccess.php" /> 84 90 <file role="data" name="historySuccess.php" /> 85 91 <file role="data" name="userSuccess.php" /> 86 <file role="data" name="_page_history.php" />87 <file role="data" name="diffSuccess.php" />88 <file role="data" name="_breadcrumbs.php" />89 92 <file role="data" name="viewSuccess.php" /> 90 93 </dir> … … 194 197 <file role="data" name="config_handlers.yml" /> 195 198 <file role="data" name="interwiki.yml" /> 199 <file role="data" name="search.yml" /> 196 200 </dir> 197 201 <!-- Embedded languages files --> 198 202 <dir name="i18n"> 203 <file role="data" name="messages.de.xml" /> 199 204 <file role="data" name="messages.en.xml" /> 200 205 <file role="data" name="messages.fr.xml" /> … … 227 232 <release> 228 233 <version> 234 <release>1.2.1</release> 235 <api>1.2.1</api> 236 </version> 237 <stability> 238 <release>stable</release> 239 <api>stable</api> 240 </stability> 241 <date>2009-05-21</date> 242 <license uri="http://www.opensource.org/licenses/mit-license.html">MIT</license> 243 <notes> * naholyr : integration of sfLucene, add option to disable gzip compression. 244 * naholyr (thanks to Jens Schulze) : bugfixes and Deutsch translation. 245 * naholyr (thanks to Julien Muetton) : added a name to forms, fixed output escaping.</notes> 246 </release> 247 <release> 248 <version> 229 249 <release>1.2.0</release> 230 250 <api>1.2.0</api> … … 236 256 <date>2009-05-02</date> 237 257 <license uri="http://www.opensource.org/licenses/mit-license.html">MIT</license> 238 <notes> * naholyr : first release for Symfony 1.2, based on version 1.0.0.</notes>258 <notes> * naholyr : first release for Symfony 1.2, based on version 1.0.0.</notes> 239 259 </release> 240 260 </changelog>

