~ubuntu-branches/ubuntu/quantal/gallery2/quantal

« back to all changes in this revision

Viewing changes to modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class

  • Committer: Bazaar Package Importer
  • Author(s): Michael C. Schultheiss
  • Date: 2007-09-10 20:22:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070910202219-0jsuntvqge4ade6b
Tags: 2.2.3-2
Add Slovak translation of Debconf templates.  (Thanks to 
Ivan Masá.  Closes: #441671)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * along with this program; if not, write to the Free Software
18
18
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
19
19
 */
20
 
/**
21
 
 * @package Rewrite
22
 
 * @version $Revision: 15513 $
23
 
 * @author Douglas Cau <douglas@cau.se>
24
 
 */
25
20
 
26
 
/**
27
 
 * Required class
28
 
 */
29
21
GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteUrlGenerator.class');
30
22
 
31
23
/**
33
25
 *
34
26
 * @package Rewrite
35
27
 * @subpackage Parsers
 
28
 * @author Douglas Cau <douglas@cau.se>
 
29
 * @version $Revision: 16474 $
36
30
 */
37
31
class ModRewriteUrlGenerator extends RewriteUrlGenerator {
38
32
 
81
75
                    return parent::getCurrentUrl($forceDirect);
82
76
                }
83
77
            }
84
 
            
 
78
 
85
79
            $tmp = $path . $this->_file[$forceDirect];
86
80
            $queryString = GalleryUtilities::getServerVar('QUERY_STRING');
87
81
            if (!empty($queryString)) {
88
82
                GalleryUtilities::unsanitizeInputValues($queryString, false);
89
 
                $tmp .= '?' . $queryString;
 
83
                $tmp .= ((strpos($tmp, '?') === false) ? '?' : '&') . $queryString;
90
84
            }
91
85
 
92
86
            $this->_currentUrl[$forceDirect] = $this->makeUrl($tmp);
102
96
        if (GalleryUtilities::isEmbedded()) {
103
97
            $options['forceServerRelativeUrl'] = 1;
104
98
        }
105
 
        
 
99
 
106
100
        return parent::generateUrl($params, $options);
107
101
    }
108
102
}