Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 10 commits
  • 9 files changed
  • 2 commit comments
  • 2 contributors
View
2 .gitattributes
@@ -2,7 +2,7 @@
* text=auto
-# Explicitly declare text files we want to always be normalized and converted
+# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.conf text
View
4 modules/page/inc/page.functions.php
@@ -435,13 +435,13 @@ function cot_page_import($source = 'POST', $rpage = array(), $auth = array())
$rpublish = cot_import('rpublish', $source, 'ALP'); // For backwards compatibility
$rpage['page_state'] = ($rpublish == 'OK') ? 0 : cot_import('rpagestate', $source, 'INT');
- if ($auth['isadmin'])
+ if ($auth['isadmin'] && isset($rpage['page_ownerid']))
{
$rpage['page_count'] = cot_import('rpagecount', $source, 'INT');
$rpage['page_ownerid'] = cot_import('rpageownerid', $source, 'INT');
$rpage['page_filecount'] = cot_import('rpagefilecount', $source, 'INT');
}
- elseif (!isset($rpage['page_ownerid']))
+ else
{
$rpage['page_ownerid'] = $usr['id'];
}
View
2 modules/page/tpl/page.add.tpl
@@ -75,7 +75,7 @@
</tr>
<tr>
<td>{PHP.L.URL}:<br />{PHP.L.page_urlhint}</td>
- <td>{PAGEADD_FORM_URL}<br />{PAGEADD_FORM_PFS_URL_USER} &nbsp; {PAGEADD_FORM_PFS_URL_SITE}</td>
+ <td>{PAGEADD_FORM_URL}<br />{PAGEADD_FORM_URL_PFS} &nbsp; {PAGEADD_FORM_URL_SFS}</td>
</tr>
<tr>
<td>{PHP.L.Filesize}:<br />{PHP.L.page_filesizehint}</td>
View
2 modules/page/tpl/page.edit.tpl
@@ -87,7 +87,7 @@
</tr>
<tr>
<td>{PHP.L.URL}:<br />{PHP.L.page_urlhint}</td>
- <td>{PAGEEDIT_FORM_URL}<br />{PAGEEDIT_FORM_PFS_URL_USER} &nbsp; {PAGEEDIT_FORM_PFS_URL_SITE}</td>
+ <td>{PAGEEDIT_FORM_URL}<br />{PAGEEDIT_FORM_URL_PFS} &nbsp; {PAGEEDIT_FORM_URL_SFS}</td>
</tr>
<tr>
<td>{PHP.L.page_filesize}:<br />{PHP.L.page_filesizehint}</td>
View
24 modules/pfs/inc/pfs.main.php
@@ -201,7 +201,7 @@
'pfs_size' => (int)$u_size,
'pfs_count' => 0
));
-
+
$db->update($db_pfs_folders, array('pff_updated' => $sys['now']), 'pff_id="'.$folderid.'"');
$disp_errors .= $L['Yes'];
@@ -294,7 +294,7 @@
'pff_isgallery' => (int)$nisgallery,
'pff_count' => 0
));
-
+
cot_redirect(cot_url('pfs', $more, '', true));
}
elseif ($a=='deletefolder')
@@ -355,7 +355,7 @@
{
$sql_pfs_files = $db->query("SELECT * FROM $db_pfs WHERE pfs_userid=$userid AND pfs_folderid=0 ORDER BY pfs_file ASC");
$sql_pfs = $db->query("SELECT * FROM $db_pfs WHERE pfs_userid=$userid AND pfs_folderid=0 ORDER BY pfs_file ASC LIMIT $d, ".$cfg['pfs']['maxpfsperpage']);
-
+
$sql_pfs_filesinfo = $db->query("SELECT pfs_folderid, COUNT(*), SUM(pfs_size) FROM $db_pfs WHERE pfs_userid=$userid GROUP BY pfs_folderid");
while ($pfs_filesinfo = $sql_pfs_filesinfo->fetch())
{
@@ -601,24 +601,26 @@
if ($standalone)
{
- if($c1 == 'newpage' && $c2 == 'newpageurl' || $c1 == 'update' && $c2 == 'rpageurl')
+ if ($c1 == 'pageform' && $c2 == 'rpageurl')
{
- $addthumb = "'".$thumbs_dir_user."' + gfile";
- $addpix = 'gfile';
- $addfile = "'".$pfs_dir_user."' + gfile";
+ $addthumb = $thumbs_dir_user."' + gfile + '";
+ $addpix = "' + gfile + '";
+ $addfile = $pfs_dir_user."' + gfile + '";
+ $pfs_code_addfile = $addfile;
+ $pfs_code_addthumb = $addthumb;
+ $pfs_code_addpix = $addpix;
}
else
{
$addthumb = $R['pfs_code_addthumb'];
$addpix = $R['pfs_code_addpix'];
$addfile = $R['pfs_code_addfile'];
+ $pfs_code_addfile = cot_rc('pfs_code_addfile');
+ $pfs_code_addthumb = cot_rc('pfs_code_addthumb');
+ $pfs_code_addpix = cot_rc('pfs_code_addpix');
}
$winclose = $cfg['pfs']['pfs_winclose'] ? "\nwindow.close();" : '';
- $pfs_code_addfile = cot_rc('pfs_code_addfile');
- $pfs_code_addthumb = cot_rc('pfs_code_addthumb');
- $pfs_code_addpix = cot_rc('pfs_code_addpix');
-
cot_sendheaders();
cot_rc_output();
View
2 system/admin/admin.structure.php
@@ -413,7 +413,7 @@
'ADMIN_STRUCTURE_PATH' => cot_inputbox('text', 'rstructurepath['.$structure_id.']', $row['structure_path'], 'size="12" maxlength="255"'),
'ADMIN_STRUCTURE_TPL_SYM' => $structure_tpl_sym,
'ADMIN_STRUCTURE_TPLMODE' => cot_radiobox($check_tpl, 'rstructuretplmode['.$structure_id.']', array('1', '2', '3'), array($L['adm_tpl_empty'], $L['adm_tpl_parent'], $L['adm_tpl_forced']), '', '<br />'),
- 'ADMIN_STRUCTURE_TPLQUICK' => cot_inputbox('text', 'rstructuretplquick['.$structure_id.']', $id > 0 ? '' : $row['structure_tpl'], 'size="10" maxlength="255"'),
+ 'ADMIN_STRUCTURE_TPLQUICK' => cot_inputbox('text', 'rstructuretplquick['.$structure_id.']', $id > 0 && array_key_exists($row['structure_tpl'], $cat_path) ? '' : $row['structure_tpl'], 'size="10" maxlength="255"'),
'ADMIN_STRUCTURE_TITLE' => cot_inputbox('text', 'rstructuretitle['.$structure_id.']', $row['structure_title'], 'size="32" maxlength="255"'),
'ADMIN_STRUCTURE_DESC' => cot_inputbox('text', 'rstructuredesc['.$structure_id.']', $row['structure_desc'], 'size="64" maxlength="255"'),
'ADMIN_STRUCTURE_ICON' => cot_inputbox('text', 'rstructureicon['.$structure_id.']', $row['structure_icon'], 'size="64" maxlength="128"'),
View
4 system/functions.php
@@ -37,7 +37,7 @@
$i = explode(' ', microtime());
$sys['starttime'] = $i[1] + $i[0];
-$cfg['version'] = '0.9.12';
+$cfg['version'] = '0.9.12.1';
$cfg['dbversion'] = '0.9.12';
// Set default file permissions if not present in config
@@ -5185,7 +5185,7 @@ function cot_declension($digit, $expr, $onlyword = false, $canfrac = false)
$is_frac = false;
if ($canfrac)
{
- if (is_float($digit) || mb_strpos($digit, '.') !== false)
+ if ((is_float($digit) && $digit!=floor($digit)) || mb_strpos($digit, '.') !== false)
{
$i = floatval($digit);
$is_frac = true;
View
6 themes/symisun-03/page.add.tpl
@@ -2,7 +2,7 @@
<div id="content">
<div class="padding20 whitee">
-
+
<h1>{PAGEADD_PAGETITLE}</h1>
<p class="details">{PAGEADD_SUBTITLE}</p>
@@ -82,7 +82,7 @@
</div>
<div>
<label>{PHP.L.URL}</label>
- {PAGEADD_FORM_URL} &nbsp; {PAGEADD_FORM_PFS_URL_USER} &nbsp; {PAGEADD_FORM_PFS_URL_SITE} &nbsp; <span class="hint">{PHP.L.page_urlhint}</span>
+ {PAGEADD_FORM_URL} &nbsp; {PAGEADD_FORM_URL_PFS} &nbsp; {PAGEADD_FORM_URL_SFS} &nbsp; <span class="hint">{PHP.L.page_urlhint}</span>
</div>
<div>
<label>{PHP.L.Filesize}</label>
@@ -99,7 +99,7 @@
<!-- ELSE -->
<input type="submit" value="{PHP.L.Submit}" class="submit" />
<!-- ENDIF -->
-
+
</form>
</div>
View
4 themes/symisun-03/page.edit.tpl
@@ -2,7 +2,7 @@
<div id="content">
<div class="padding20 whitee">
-
+
<h1>{PAGEEDIT_PAGETITLE}</h1>
<p class="details">{PAGEEDIT_SUBTITLE}</p>
@@ -96,7 +96,7 @@
</div>
<div>
<label>{PHP.L.URL}</label>
- {PAGEEDIT_FORM_URL} &nbsp; {PAGEEDIT_FORM_PFS_URL_USER} &nbsp; {PAGEEDIT_FORM_PFS_URL_SITE} &nbsp; <span class="hint">{PHP.L.page_urlhint}</span>
+ {PAGEEDIT_FORM_URL} &nbsp; {PAGEEDIT_FORM_URL_PFS} &nbsp; {PAGEEDIT_FORM_URL_SFS} &nbsp; <span class="hint">{PHP.L.page_urlhint}</span>
</div>
<div>
<label>{PHP.L.page_filesize}</label>

Showing you all comments on commits in this comparison.

@trustmaster
Cotonti member

This fix is not very correct, because if an administrator edits somebody else's page it will change the page owner. The original owner should be preserved in this case.

@trustmaster
Cotonti member

My bad, this fix is fine.

Something went wrong with that request. Please try again.