Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/release-7.002.3.0-RC2'
Browse files Browse the repository at this point in the history
Conflicts:
	catalog/includes/version.txt
  • Loading branch information
datazen committed May 8, 2014
2 parents af30818 + fdd1e3d commit 22d124c
Show file tree
Hide file tree
Showing 77 changed files with 1,433 additions and 628 deletions.
12 changes: 3 additions & 9 deletions catalog/admin/includes/applications/categories/actions/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ public function __construct() {
if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
switch ( $_GET['action'] ) {
case 'save':
/*echo '<pre>';
print_r($_POST);
echo '</pre>';
die('POST');*/

$data = array('image' => (isset($_POST['categories_image']) ? $_POST['categories_image'] : null),
'parent_id' => $_POST['parent_id'],
'sort_order' => $_POST['sort_order'],
Expand All @@ -38,10 +35,7 @@ public function __construct() {
'description' => $_POST['categories_description'],
'permalink' => $_POST['categories_permalink'],
'tags' => $_POST['categories_tags']);
/*echo '<pre>';
print_r($data);
echo '</pre>';
die('DATA');*/

/*
* Save the category information
*
Expand All @@ -50,7 +44,7 @@ public function __construct() {
* @access public
* @return boolean
*/
$id = lC_Categories_Admin::save((isset($_GET['categories']) && is_numeric($_GET['categories']) ? $_GET['categories'] : null), $data);
$id = (int)lC_Categories_Admin::save((isset($_GET['categories']) && is_numeric($_GET['categories']) ? $_GET['categories'] : null), $data);

if ( is_numeric($id) ) {
if ( empty($_POST['save_close']) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ public static function save($id = null, $data) {

$lC_Database->startTransaction();

/*echo '<pre>';
print_r($data);
echo '<pre>';
die('after action');*/

if ( is_numeric($id) ) {
$Qcat = $lC_Database->query('update :table_categories set categories_image = :categories_image, parent_id = :parent_id, sort_order = :sort_order, categories_mode = :categories_mode, categories_link_target = :categories_link_target, categories_custom_url = :categories_custom_url, categories_status = :categories_status, categories_visibility_nav = :categories_visibility_nav, categories_visibility_box = :categories_visibility_box, last_modified = now() where categories_id = :categories_id');
$Qcat->bindInt(':categories_id', $id);
Expand All @@ -273,11 +268,6 @@ public static function save($id = null, $data) {
$Qcat->setLogging($_SESSION['module'], $id);
$Qcat->execute();

//echo '<pre>';
//print_r($Qcat);
//echo '<pre>';
//die('after categories table execute');

if ( !$lC_Database->isError()) {
$category_id = (is_numeric($id)) ? $id : $lC_Database->nextID();
$lC_CategoryTree = new lC_CategoryTree_Admin();
Expand Down
13 changes: 4 additions & 9 deletions catalog/admin/includes/applications/coupons/actions/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct() {
$this->_page_contents = 'edit.php';

if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {

// validate the input
$type = (isset($_POST['type']) && $_POST['type'] != NULL) ? preg_replace('/[^A-Z\s]/', '', $_POST['type']) : 'R';
$name = (isset($_POST['name']) && $_POST['name'] != NULL) ? preg_replace('/[^A-Za-z0-9\s]/', '', $_POST['name']) : NULL;
Expand Down Expand Up @@ -72,21 +72,16 @@ public function __construct() {
$id = lC_Coupons_Admin::save((isset($_GET[$this->_module]) && is_numeric($_GET[$this->_module]) ? $_GET[$this->_module] : null), $data);

if ( is_numeric($id) && isset($id)){

if(!empty($_POST['save_close'])){

if (!empty($_POST['save_close'])) {
lc_redirect_admin(lc_href_link_admin(FILENAME_DEFAULT, $this->_module));
}else{

} else {
lc_redirect_admin(lc_href_link_admin(FILENAME_DEFAULT, $this->_module.'='.$id.'&action=save'));
}
}else{

} else {
$lC_MessageStack->add($this->_module, $lC_Language->get('ms_error_action_not_performed'), 'error');
lc_redirect_admin(lc_href_link_admin(FILENAME_DEFAULT, $this->_module));
}
}
}
}

?>
28 changes: 20 additions & 8 deletions catalog/admin/includes/applications/coupons/js/coupons.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,30 @@
$('.selectContainer').hide();
}

$("#expires_date").click(function(){
var Sdate = $("#start_date").val();
var dSplit = Sdate.split("/");
var Smonth = dSplit[0]-1;
var Sday = dSplit[1];
var Syear = dSplit[2];
$('#expires_date').glDatePicker({ startDate: new Date(Syear, Smonth, Sday), allowOld:false });
});
$("#expires_date").click(function(){
var Sdate = $("#start_date").val();
var dSplit = Sdate.split("/");
var Smonth = dSplit[0]-1;
var Sday = dSplit[1];
var Syear = dSplit[2];
$('#expires_date').glDatePicker({ startDate: new Date(Syear, Smonth, Sday), allowOld:false });
});

$('.datepicker').glDatePicker({ zIndex: 100 });
$('#start_date').glDatePicker({ startDate: new Date(), allowOld:false });

});

function setType(val) {
var v = val.search(/%/);
if (v > 0) {
var type = "T"
} else {
var type = "R"
}
$('#reward').attr('value', val);
$('#type').val(type);
}

function updateRewardField(val) {
$('#reward').val("");
Expand Down
12 changes: 3 additions & 9 deletions catalog/admin/includes/applications/coupons/pages/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
<div class="field-drop button-height black-inputs">
<div>
<label for="type_reward" class="label"><b><?php echo $lC_Language->get('label_reward'); ?></b></label>
<input type="radio" name="type" value="T" id="type_1" class="switch tiny mid-margin-right small-margin-left<?php if (isset($cInfo)) { echo ($cInfo->get('type') == 'T' || $cInfo->get('type') == 'R') ? ' checked' : null; } else { echo ' checked'; } ?>" onchange="updateRewardField($(this).val());">
<input type="text" onfocus="this.select();" name="reward" id="reward" value="<?php echo (isset($cInfo) ? $cInfo->get('reward') : null); ?>" class="input">
<input type="radio" name="type" id="type_1" class="switch tiny mid-margin-right small-margin-left<?php if (isset($cInfo)) { echo ($cInfo->get('type') == 'T' || $cInfo->get('type') == 'R') ? ' checked' : null; } else { echo ' checked'; } ?>" onchange="updateRewardField($(this).val());">
<input type="text" onblur="setType(this.value);" onfocus="this.select();" name="reward" id="reward" value="<?php echo (isset($cInfo) ? $cInfo->get('reward') : null); ?>" class="input">
<span class="input-info mid-margin-left"><?php echo $lC_Language->get('text_price_or_percent'); ?></span>
<?php echo lc_show_info_bubble($lC_Language->get('info_bubble_price_or_percent'), null, 'info-spot on-left grey margin-left'); ?>
</div>
Expand All @@ -100,15 +100,9 @@
<span class="small-margin-left upsellinfo" upselltitle="<?php echo $lC_Language->get('text_free_product_upsell_title'); ?>" upselldesc="<?php echo $lC_Language->get('text_free_product_upsell_desc'); ?>"><?php echo lc_go_pro(); ?></span>
<?php echo lc_show_info_bubble($lC_Language->get('info_bubble_free_product'), null, 'info-spot on-left grey margin-left'); ?>
</div -->
<input type="hidden" name="type" id="type" value="<?php echo $type; ?>" />
<input type="hidden" name="type" id="type" value="<?php echo (isset($cInfo) ? $cInfo->get('type') : null); ?>" />
</div>
</fieldset>
<script>
function updateReward(val) {
$('#reward').val("");
$('#type').val(val);
}
</script>
</div>
<div class="new-row-mobile twelve-columns twelve-columns-mobile" id="limits">
<fieldset class="fieldset fields-list">
Expand Down
21 changes: 18 additions & 3 deletions catalog/admin/includes/applications/file_manager/file_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class lC_Application_File_manager extends lC_Template_Admin {
* Class constructor
*/
function __construct() {
global $lC_Language;
global $lC_Language, $breadcrumb_string;

$this->_page_title = $lC_Language->get('heading_title');

Expand All @@ -40,9 +40,8 @@ function __construct() {
} elseif ( isset($_GET['goto']) ) {
$_SESSION['fm_directory'] = LC_ADMIN_FILE_MANAGER_ROOT_PATH . '/' . urldecode($_GET['goto']);
}

$_SESSION['fm_directory'] = realpath($_SESSION['fm_directory']);

if ( ( substr($_SESSION['fm_directory'], 0, strlen(LC_ADMIN_FILE_MANAGER_ROOT_PATH)) != LC_ADMIN_FILE_MANAGER_ROOT_PATH ) || !is_dir($_SESSION['fm_directory']) ) {
$_SESSION['fm_directory'] = LC_ADMIN_FILE_MANAGER_ROOT_PATH;
}
Expand Down Expand Up @@ -103,6 +102,22 @@ function __construct() {
break;
}
}

// setup the breadcrumb
$breadcrumb_array = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&goto='), $lC_Language->get('text_top')));
$path = explode("/", substr(str_replace(LC_ADMIN_FILE_MANAGER_ROOT_PATH, '', $_SESSION['fm_directory']), 1));

foreach ($path as $key => $value) {
$goto_path .= $value . '/';
$breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&goto=' . $goto_path), $value);
}

// build the breadcrumb html string
$breadcrumb_string = '<ul class="fm-breadcrumb">';
foreach ($breadcrumb_array as $key => $value) {
$breadcrumb_string .= '<li>' . $value . '</li>';
}
$breadcrumb_string .= '</ul>';
}
}
?>
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
oTable = $('#dataTable').dataTable({
"bProcessing": true,
"sAjaxSource": dataTableDataURL.replace('MEDIA', $.template.mediaQuery.name),
"sPaginationType": paginationType,
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"sPaginationType": paginationType,
"bPaginate": false,
"bSort": false,
"aoColumns": [{ "sWidth": "20%", "sClass": "dataColFiles" },
{ "sWidth": "10%", "sClass": "dataColSize hide-on-mobile-portrait" },
{ "sWidth": "10%", "sClass": "dataColPerms hide-on-mobile-portrait" },
Expand All @@ -39,10 +40,14 @@
$('.on-mobile').show();
$('.selectContainer').hide();
}

var error = '<?php echo $_SESSION['error']; ?>';
if (error) {
var errmsg = '<?php echo $_SESSION['errmsg']; ?>';
$.modal.alert(errmsg);
}

// breadcrumb last li css
$(".fm-breadcrumb li:last-child").addClass("last");
});
</script>
31 changes: 17 additions & 14 deletions catalog/admin/includes/applications/file_manager/pages/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
@version $Id: main.php v1.0 2013-08-08 datazen $
*/
?>
<!-- Main content -->
<section role="main" id="main">
<noscript class="message black-gradient simpler"><?php echo $lC_Language->get('ms_error_javascript_not_enabled_warning'); ?></noscript>
<hgroup id="main-title" class="thin">
<h1><?php echo $lC_Template->getPageTitle(); ?></h1>
</hgroup>
<style>
<style scoped="scoped">
.dataColFiles { text-align: left; }
.dataColSize { text-align: left; }
.dataColPerms { text-align: left; }
Expand All @@ -24,8 +18,21 @@
.dataColWrite { text-align: center; }
.dataColLast { text-align: left; }
.dataColAction { text-align: right; }
</style>
<div class="with-padding-no-top">
</style>
<!-- Main content -->
<section role="main" id="main">
<noscript class="message black-gradient simpler"><?php echo $lC_Language->get('ms_error_javascript_not_enabled_warning'); ?></noscript>
<hgroup id="main-title" class="thin">
<h1><?php echo $lC_Template->getPageTitle(); ?></h1>
</hgroup>
<div id="breadCrumbContainer">
<div class="breadCrumbHolder">
<div id="breadCrumb0" class="breadCrumb">
<?php echo $breadcrumb_string; ?>
</div>
</div>
</div>
<div class="with-padding">
<form name="batch" id="batch" action="#" method="post">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="table responsive-table" id="dataTable">
<thead>
Expand Down Expand Up @@ -86,9 +93,5 @@
</div>
</div>
</section>
<?php
if (isset($_SESSION['error'])) unset($_SESSION['error']);
if (isset($_SESSION['errmsg'])) unset($_SESSION['errmsg']);
$lC_Template->loadModal($lC_Template->getModule());
?>
<?php $lC_Template->loadModal($lC_Template->getModule()); ?>
<!-- End main content -->
5 changes: 4 additions & 1 deletion catalog/admin/includes/applications/login/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ class lC_Application_Login extends lC_Template_Admin {
* Class constructor
*/
public function __construct() {
global $lC_Language, $lC_Api;
global $lC_Language, $lC_Api, $ioncube_check;

$this->_page_title = $lC_Language->get('heading_title');
$this->_has_wrapper = false;
$this->_has_header = false;
$this->_has_footer = false;

// added for ioncube check
$ioncube_check = utility::ioncubeCheck();
}
}
?>
39 changes: 39 additions & 0 deletions catalog/admin/includes/applications/login/pages/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,45 @@ function _checkSerial() {
* Register
*/
$('#form-activate-pro').submit(function(event) {
// Added for iconcube check to support Pro & B2B Versions and Paid Addons
var ioncubeCheck = <?php echo json_encode($ioncube_check); ?>;
if (ioncubeCheck.installed != false) {
if (ioncubeCheck.valid != true) {
$('#activate-pro').addClass('disabled');
$('#buy-pro').removeClass('disabled');
$.modal({
title: '<?php echo $lC_Language->get('ms_error_ioncube'); ?>',
width: 320,
content: '<p class="big-message align-left">' +
' <span class="big-message-icon icon-warning icon-orange"></span>' +
' <strong><?php echo $lC_Language->get('ms_error_ioncube_invalid_title'); ?><br></strong>' +
' <p class="large-margin-top align-left with-small-padding">' +
' <?php echo $lC_Language->get('ms_error_ioncube_invalid_text'); ?>' +
' </p>' +
'</p>'
});
event.preventDefault();
return false;
}
} else {
$('#activate-pro').addClass('disabled');
$('#buy-pro').removeClass('disabled');
$.modal({
title: '<?php echo $lC_Language->get('ms_error_ioncube'); ?>',
width: 300,
content: '<p class="big-message align-left">' +
' <span class="big-message-icon icon-warning icon-orange"></span>' +
' <strong><?php echo $lC_Language->get('ms_error_ioncube_not_installed'); ?><br></strong>' +
' <p class="large-margin-top align-left with-small-padding">' +
' <?php echo $lC_Language->get('ms_error_ioncube_not_installed_text'); ?>' +
' </p>' +
'</p>'
});
event.preventDefault();
return false;
}
// END - Added for iconcube check to support Pro & B2B Versions and Paid Addons

// Values
var serial = $.trim($('#activation_serial').val());

Expand Down
Loading

0 comments on commit 22d124c

Please sign in to comment.