Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
philippK-de committed Oct 10, 2016
1 parent 1f24fe2 commit 072e14a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
26 changes: 14 additions & 12 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
//default to utf8
ini_set("default_charset", "utf-8");
//allow larger and more file uploads than default
ini_set("post_max_size", "128M");
ini_set("upload_max_filesize", "128M");
ini_set("max_file_uploads", "50");
ini_set("post_max_size", "256M");
ini_set("upload_max_filesize", "256M");
ini_set("max_file_uploads", "100");

// Set content security policy header. This instructs the browser to block various unsafe behaviours.
header("Content-Security-Policy:style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval';frame-src 'self'");
header("Content-Security-Policy:style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval';");
// Start output buffering with gzip compression and start the session
ob_start('ob_gzhandler');
session_start();
Expand Down Expand Up @@ -66,6 +66,10 @@
// set the version number for display
$template->assign("myversion", "3.0");
$template->assign("cl_config", CL_CONFIG);
// get current year and month
$template->assign("theM", date("n"));
$template->assign("theY", date("Y"));

// Assign globals to all templates
if (isset($_SESSION["userid"])) {
// unique ID of the user
Expand Down Expand Up @@ -143,10 +147,13 @@
}
// Set locale directory
$template->setConfigDir(CL_ROOT . "/language/$locale/");
// Smarty 3 seems to have a problem with re-compiling the config if the user config is different than the system config.
// this forces a compile of the config.
// uncomment this if you have issues with language switching

/* Smarty 3 seems to have a problem with re-compiling the config if the user config is different than the system config.
* this forces a compile of the config.
* uncomment this if you have issues with language switching
*/
// $template->compileAllConfig('.config',true);

// read language file into PHP array
$langfile = readLangfile($locale);
$template->assign("langfile", $langfile);
Expand All @@ -158,11 +165,6 @@
"admin" => "admin"
);
$template->assign("mainclasses", $mainclasses);
// get current year and month
$they = date("Y");
$them = date("n");
$template->assign("theM", $them);
$template->assign("theY", $they);
// if user is logged in
if (isset($userid)) {
$project = new project();
Expand Down
7 changes: 1 addition & 6 deletions templates/standard/projectPrivateMessages.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@
{/literal}
<td class="rightmen" valign="top">
<div class="inmenue">
{if $userpermissions.files.del}
{literal}
<a class="del" href="javascript:confirmfunction
('{/literal}{$langfile.confirmdel}{literal}','deleteElement(\'fli_{{file.ID}}\',\'managefile.php?action=delete&id={{*message.project}}&file={{file.ID}}\')');" title="{/literal}{#delete#}"></a>
{/if}
</div>
</td>
</tr>
Expand All @@ -140,7 +136,6 @@
</a>
</span>
</td>
<tr/>
</table>
</div>
<!-- itemwrapper End -->
Expand Down
8 changes: 1 addition & 7 deletions templates/standard/projectPublicMessages.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,11 @@
{/literal}
<img src="templates/{$settings.template}/theme/{$settings.theme}/images/files/{literal}{{*file.type}}.png"
alt=""/>
</a>
</td>
{/literal}
<td class="rightmen" valign="top">
<div class="inmenue">
{if $userpermissions.files.del}
{literal}
<a class="del" href="javascript:confirmfunction
('{/literal}{$langfile.confirmdel}{literal}','deleteElement(\'fli_{{file.ID}}\',\'managefile.php?action=delete&id={{*message.project}}&file={{file.ID}}\')');" title="{/literal}{#delete#}"></a>
{/if}
</div>
</td>
</tr>
Expand All @@ -149,7 +144,6 @@
</a>
</span>
</td>
<tr/>
</table>
</div>
<!-- itemwrapper End -->
Expand Down

0 comments on commit 072e14a

Please sign in to comment.