Skip to content

Commit

Permalink
version 0.3 imported
Browse files Browse the repository at this point in the history
  • Loading branch information
pinhead84 committed Nov 26, 2014
1 parent 764b076 commit 9c7e288
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 32 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OpenEstate-PHP-Wrapper for CMSms 0.2
OpenEstate-PHP-Wrapper for CMSms 0.3
====================================

This module integrates [OpenEstate-PHP-Export](https://github.com/OpenEstate/OpenEstate-PHP-Export)
Expand Down Expand Up @@ -74,6 +74,10 @@ Webseite integriert werden.
Changelog
---------

### 0.3

- Some smaller improvements.

### 0.2

- First public release
Expand Down
6 changes: 3 additions & 3 deletions src/OpenEstatePhpWrapper.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* PHP-Wrapper für CMSms.
* Modul-Klasse, siehe http://www.cmsmadesimple.org/api/class_cms_module.html
* $Id: OpenEstatePhpWrapper.module.php 50 2010-03-25 02:44:21Z andy $
* $Id: OpenEstatePhpWrapper.module.php 594 2010-12-12 01:37:49Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
Expand All @@ -13,7 +13,7 @@
* Modul.
*
* @author Andreas Rudolph & Walter Wagner
* @version 0.2
* @version 0.3
* @license GPL3
**/
class OpenEstatePhpWrapper extends CMSModule {
Expand Down Expand Up @@ -61,7 +61,7 @@ function GetFriendlyName() {
* @return string version number (can be something like 1.4rc1)
*/
function GetVersion() {
return '0.2';
return '0.3';
}

/**
Expand Down
33 changes: 7 additions & 26 deletions src/action.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* PHP-Wrapper für CMSms.
* Darstellung der Wrapper-Ausgabe auf der Webseite.
* $Id: action.default.php 50 2010-03-25 02:44:21Z andy $
* $Id: action.default.php 594 2010-12-12 01:37:49Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
Expand Down Expand Up @@ -143,30 +143,11 @@
$stylesheets[] = $setup->AdditionalStylesheet;

// Ausgabe erzeugen
$scriptName = $_SERVER['SCRIPT_NAME'];
$output = immotool_functions::wrap_page( $page, $wrap, $scriptName, IMMOTOOL_BASE_URL, $stylesheets );

// 'page'-Parameter von CMSms einfügen
if (isset($_REQUEST['page']) && is_string($_REQUEST['page'])) {
//die(preg_quote( $scriptName ));

$newLink = $scriptName.'?page='.$_REQUEST['page'];
$replacements = array(

// page-Parameter in Direktlinks übernehmen
'/<a([^>]*)href="'.preg_quote( $scriptName, '/' ).'\?([^"]*)"/is' => '<a\1href="'.$newLink.'&amp;\2"',
'/<a([^>]*)href="'.preg_quote( $scriptName, '/' ).'"/is' => '<a\1href="'.$newLink.'"',

// page-Parameter in Formulare übernehmen (muss als GET-Parameter übermittelt werden)
'/<form([^>]*)method="get"([^>]*)>/is' => '<form\1method="get"\2><input type="hidden" name="page" value="'.$_REQUEST['page'].'"/>',
'/<form([^>]*)action="'.preg_quote( $scriptName, '/' ).'\?([^"]*)"([^>]*)method="post"([^>]*)>/is' => '<form\1action="'.$newLink.'&amp;\2"\3method="post"\4>',
'/<form([^>]*)action="'.preg_quote( $scriptName, '/' ).'(#[^"]*)?"([^>]*)method="post"([^>]*)>/is' => '<form\1action="'.$newLink.'\2"\3method="post"\4>',
);

//echo '<pre>'; print_r($replacements); echo '</pre>';
$output = preg_replace( array_keys($replacements), array_values($replacements), $output );
$baseUrl = $_SERVER['SCRIPT_NAME'];
$hiddenParams = array();
if (isset($_REQUEST['page'])) {
$baseUrl .= '?page='.$_REQUEST['page'];
$hiddenParams['page'] = $_REQUEST['page'];
}

// Ausgabe schreiben
echo $output;
echo immotool_functions::wrap_page( $page, $wrap, $baseUrl, IMMOTOOL_BASE_URL, $stylesheets, $hiddenParams );
?>
3 changes: 2 additions & 1 deletion src/lang/de_DE.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* PHP-Wrapper für CMSms.
* Sprachdatei, deutsch
* $Id: de_DE.php 50 2010-03-25 02:44:21Z andy $
* $Id: de_DE.php 595 2010-12-12 01:40:46Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
Expand All @@ -12,6 +12,7 @@
$lang['friendlyname'] = 'OpenEstate PHP-Wrapper';
$lang['moddescription'] = 'Dieses Modul integriert PHP-Immobilienexporte aus dem OpenEstate-ImmoTool in CMSms.';
$lang['changelog'] = '<ul>
<li>Version 0.3. Detail-Korrekturen.</li>
<li>Version 0.2. Erstes öffentliches Release.</li>
<li>Version 0.1. Internes Release.</li>
</ul>';
Expand Down
3 changes: 2 additions & 1 deletion src/lang/en_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* PHP-Wrapper für CMSms.
* Sprachdatei, englisch
* $Id: en_US.php 50 2010-03-25 02:44:21Z andy $
* $Id: en_US.php 595 2010-12-12 01:40:46Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
Expand All @@ -12,6 +12,7 @@
$lang['friendlyname'] = 'OpenEstate PHP-Wrapper';
$lang['moddescription'] = 'This module integrates PHP-exported properties from OpenEstate-ImmoTool into CMSms.';
$lang['changelog'] = '<ul>
<li>Version 0.3. Some smaller improvements.</li>
<li>Version 0.2. First public release.</li>
<li>Version 0.1. Internal release.</li>
</ul>';
Expand Down

0 comments on commit 9c7e288

Please sign in to comment.