[geeklog-hg] geeklog: Fixed the part lacking the versatility of the GLText cl...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Jul 22 09:12:33 EDT 2013


changeset 9223:e5ef8e5641f2
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e5ef8e5641f2
user: dengen <taharaxp at gmail.com>
date: Sat Jul 20 15:48:04 2013 +0900
description:
Fixed the part lacking the versatility of the GLText class.

diffstat:

 system/classes/gltext.class.php |  11 ++++++-----
 system/classes/story.class.php  |   8 ++++++--
 2 files changed, 12 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r 01abccabaae6 -r e5ef8e5641f2 system/classes/gltext.class.php
--- a/system/classes/gltext.class.php	Sat Jul 20 14:19:41 2013 +0900
+++ b/system/classes/gltext.class.php	Sat Jul 20 15:48:04 2013 +0900
@@ -90,14 +90,15 @@
     /**
      * Returns text ready for display.
      *
-     * @param   string  $text      Text to prepare for display
-     * @param   string  $postmode  Indicates if text is html, wikitext or plaintext
-     * @param   int     $version   version of GLText engine
+     * @param   string  $text         Text to prepare for display
+     * @param   string  $postmode     Indicates if text is html, wikitext or plaintext
+     * @param   string  $permissions  comma-separated list of rights which identify the current user as an "Admin"
+     * @param   int     $version      version of GLText engine
      * @return  string  Escaped String
      * @access  public
      *
      */
-    public static function getDisplayText($text, $postmode, $version)
+    public static function getDisplayText($text, $postmode, $permissions, $version)
     {
         if ($version == GLTEXT_FIRST_VERSION) {
 
@@ -117,7 +118,7 @@
             // latest version
 
             if ($postmode == 'html') {
-                $text = self::checkHTML($text, 'story.edit');
+                $text = self::checkHTML($text, $permissions);
             }
 
             if ($postmode == 'plaintext') {
diff -r 01abccabaae6 -r e5ef8e5641f2 system/classes/story.class.php
--- a/system/classes/story.class.php	Sat Jul 20 14:19:41 2013 +0900
+++ b/system/classes/story.class.php	Sat Jul 20 15:48:04 2013 +0900
@@ -1708,13 +1708,17 @@
         {
         case 'introtext':
             $return = GLText::getDisplayText($this->_introtext,
-                          $this->_postmode, $this->_text_version);
+                          $this->_postmode,
+                          'story.edit',
+                          $this->_text_version);
             break;
 
         case 'bodytext':
             if (empty($this->_bodytext)) break;
             $return = GLText::getDisplayText($this->_bodytext,
-                          $this->_postmode, $this->_text_version);
+                          $this->_postmode,
+                          'story.edit',
+                          $this->_text_version);
 
             break;
 



More information about the geeklog-cvs mailing list