Commit 3f4fe332 authored by Sigrid Suski's avatar Sigrid Suski

changes from master merged

parents db9c8525 c23c5411
......@@ -43,17 +43,18 @@ Legend:
-------------------
1.3.7 ()
1.3.7 (28 April 2017)
-------------------
(!) Moved Sobi Framework inclusion to the loader
(#) Wrong Ajax definition (switch to Framework) while installing applications from repository (Issue #1791)
(#) Added exception for search results in router (Issue #1783)
(#) CSS cache is trying to load CSS files over URL (Issue #1745 again and #1813)
(#) RSS feed use general settings (Issue #1802)
(#) RSS feeds use general settings (Issue #1802)
(#) Wrong condition for subject while parsing text node in administrator area (Issue #1801)
(#) Different directory separators used in path (Issue #1797)
(#) Overwritten "searchSuggest" method in image field (Issue #1828)
(!) Sobi Framework inclusion moved to the loader
(#) Switching off transparency detection for images does not work (Issue #1833)
-------------------
......
......@@ -45,7 +45,7 @@ class SPImage extends SPFile
public function setTransparency( $transparency )
{
$this->transparency = $transparency;
}
/**
......
......@@ -17,6 +17,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/
use Sobi\Input\Input;
defined( 'SOBIPRO' ) || exit( 'Restricted access' );
SPLoader::loadController( 'controller' );
......@@ -404,7 +406,7 @@ class SPEntryCtrl extends SPController
$this->_model->getRequest( $this->_type, $request );
Sobi::Trigger( $this->name(), __FUNCTION__, [ &$this->_model ] );
if ( $this->_model->get( 'id' ) && $this->_model->get( 'id' ) == SPRequest::sid() ) {
if ( $this->_model->get( 'id' ) && $this->_model->get( 'id' ) == Input::Sid() ) {
$new = false;
if ( Sobi::My( 'id' ) && Sobi::My( 'id' ) == $this->_model->get( 'owner' ) ) {
$this->authorise( 'edit', 'own' );
......
This diff is collapsed.
......@@ -15,6 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/
use Sobi\Input\Input;
defined( 'SOBIPRO' ) || exit( 'Restricted access' );
SPLoader::loadModel( 'datamodel' );
SPLoader::loadModel( 'dbobject' );
......@@ -76,6 +78,10 @@ class SPCategory extends SPDBObject implements SPDataModel
$this->approved = Sobi::Can( $this->type(), 'publish', 'own' );
$db->transaction();
$clone = Input::Task() == 'category.clone';
if ( $clone ) {
$this->id = 0;
}
parent::save();
$properties = get_class_vars( __CLASS__ );
......@@ -116,10 +122,10 @@ class SPCategory extends SPDBObject implements SPDataModel
/* @var $field SPField */
try {
if ( $field->enabled( 'form' ) ) {
$field->saveData( $this, $request );
$field->saveData( $this, $request, $clone );
}
else {
$field->finaliseSave( $this, $request );
$field->finaliseSave( $this, $request, $clone );
}
} catch ( SPException $x ) {
$db->rollback();
......
......@@ -15,6 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/
use Sobi\Input\Input;
defined( 'SOBIPRO' ) || exit( 'Restricted access' );
SPLoader::loadModel( 'datamodel' );
SPLoader::loadModel( 'dbobject' );
......@@ -658,7 +660,7 @@ class SPEntry extends SPDBObject implements SPDataModel
/* @var SPdb $db */
$db = SPFactory::db();
$db->transaction();
$clone = SPRequest::task() == 'entry.clone';
$clone = Input::Task() == 'entry.clone';
if ( !( $this->nid ) || $clone ) {
$this->nid = strtolower( SPLang::nid( SPRequest::string( $this->nameField, null, false, $request ), true ) );
......
......@@ -19,29 +19,17 @@ SPLoader::loadClass( 'models.fields.interface' );
class SPFieldType extends SPObject
{
/**
* @var SPField
*/
/*** @var SPField */
private $_field = null;
/**
* @var array
*/
/*** @var array */
protected $_attr = [];
/**
* @var string
*/
/*** @var string */
protected $_selected = null;
/**
* @var string
*/
/*** @var string */
protected $dType = 'free_single_simple_data';
/**
* @var string
*/
/*** @var string */
protected $_rdata = null;
/**
* @var string
*/
/*** @var string */
protected $cssClass = "inputbox";
/** @var bool */
protected $showLabel = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment