|
From: <luc...@us...> - 2013-12-22 14:33:15
|
Revision: 12243
http://sourceforge.net/p/xoops/svn/12243
Author: luciorota
Date: 2013-12-22 14:33:11 +0000 (Sun, 22 Dec 2013)
Log Message:
-----------
fixed typo header errors
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/session.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/wfdownloads.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-12-22 14:31:57 UTC (rev 12242)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-12-22 14:33:11 UTC (rev 12243)
@@ -629,6 +629,7 @@
$sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot4', 0), false);
}
}
+
// download: notifypub
$option_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_OPTIONS, '<br />');
$notify_checkbox = new XoopsFormCheckBox('', 'notifypub');
@@ -967,6 +968,7 @@
}
$sform->addElement($indeximage_tray4);
$sform->insertBreak(sprintf(_AM_WFDOWNLOADS_FILE_MUSTBEVALID, "<b>" . $this->wfdownloads->getConfig('screenshots') . "</b>"), "even");
+
// download: published
$publishtext = ($this->isNew() || $this->getVar('published') == 0) ? _AM_WFDOWNLOADS_FILE_SETPUBLISHDATE
: _AM_WFDOWNLOADS_FILE_SETNEWPUBLISHDATE;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php 2013-12-22 14:31:57 UTC (rev 12242)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php 2013-12-22 14:33:11 UTC (rev 12243)
@@ -9,7 +9,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * Wfdownloads class
+ * WfdownloadsRequest class
*
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
@@ -19,7 +19,7 @@
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
* @package Wfdownloads
- * @since 1.0
+ * @since 3.23
* @author trabis <lus...@gm...>
* @version $Id: request.php 10374 2012-12-12 23:39:48Z trabis $
*/
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/session.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/session.php 2013-12-22 14:31:57 UTC (rev 12242)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/session.php 2013-12-22 14:33:11 UTC (rev 12243)
@@ -1,103 +1,103 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * Wfdownloads class
- *
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Wfdownloads
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @author Harry Fuecks (PHP Anthology Volume II)
- * @version $Id: session.php 10283 2012-11-28 13:39:36Z trabis $
- */
-defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-
-class WfdownloadsSession
-{
- /**
- * Session constructor<br />
- * Starts the session with session_start()
- * <strong>Note:</strong> that if the session has already started,
- * session_start() does nothing
- */
- protected function __construct()
- {
- @session_start();
- }
-
- /**
- * Sets a session variable
- *
- * @param string $name name of variable
- * @param mixed $value value of variable
- *
- * @return void
- * @access public
- */
- public function set($name, $value)
- {
- $_SESSION[$name] = $value;
- }
-
- /**
- * Fetches a session variable
- *
- * @param string $name name of variable
- *
- * @return mixed value of session variable
- * @access public
- */
- public function get($name)
- {
- if (isset($_SESSION[$name])) {
- return $_SESSION[$name];
- } else {
- return false;
- }
- }
-
- /**
- * Deletes a session variable
- *
- * @param string $name name of variable
- *
- * @return void
- * @access public
- */
- public function del($name)
- {
- unset($_SESSION[$name]);
- }
-
- /**
- * Destroys the whole session
- *
- * @return void
- * @access public
- */
- public function destroy()
- {
- $_SESSION = array();
- session_destroy();
- }
-
- public static function &getInstance()
- {
- static $_sess;
- if (!isset($_sess)) {
- $_sess = new WfdownloadsSession();
- }
- return $_sess;
- }
-}
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * WfdownloadsSession class
+ *
+ * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Wfdownloads
+ * @since 3.23
+ * @author trabis <lus...@gm...>
+ * @author Harry Fuecks (PHP Anthology Volume II)
+ * @version $Id: session.php 10283 2012-11-28 13:39:36Z trabis $
+ */
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+
+class WfdownloadsSession
+{
+ /**
+ * Session constructor<br />
+ * Starts the session with session_start()
+ * <strong>Note:</strong> that if the session has already started,
+ * session_start() does nothing
+ */
+ protected function __construct()
+ {
+ @session_start();
+ }
+
+ /**
+ * Sets a session variable
+ *
+ * @param string $name name of variable
+ * @param mixed $value value of variable
+ *
+ * @return void
+ * @access public
+ */
+ public function set($name, $value)
+ {
+ $_SESSION[$name] = $value;
+ }
+
+ /**
+ * Fetches a session variable
+ *
+ * @param string $name name of variable
+ *
+ * @return mixed value of session variable
+ * @access public
+ */
+ public function get($name)
+ {
+ if (isset($_SESSION[$name])) {
+ return $_SESSION[$name];
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Deletes a session variable
+ *
+ * @param string $name name of variable
+ *
+ * @return void
+ * @access public
+ */
+ public function del($name)
+ {
+ unset($_SESSION[$name]);
+ }
+
+ /**
+ * Destroys the whole session
+ *
+ * @return void
+ * @access public
+ */
+ public function destroy()
+ {
+ $_SESSION = array();
+ session_destroy();
+ }
+
+ public static function &getInstance()
+ {
+ static $_sess;
+ if (!isset($_sess)) {
+ $_sess = new WfdownloadsSession();
+ }
+ return $_sess;
+ }
+}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/wfdownloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/wfdownloads.php 2013-12-22 14:31:57 UTC (rev 12242)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/wfdownloads.php 2013-12-22 14:33:11 UTC (rev 12243)
@@ -1,128 +1,128 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * Publisher class
- *
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Class
- * @subpackage Utils
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @version $Id:$
- */
-defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-
-class WfdownloadsWfdownloads
-{
- var $dirname;
- var $module;
- var $handler;
- var $config;
- var $debug;
- var $debugArray = array();
-
- protected function __construct($debug)
- {
- $this->debug = $debug;
- $this->dirname = basename(dirname(dirname(__FILE__)));
- }
-
- static function &getInstance($debug = false)
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self($debug);
- }
-//error_log("istance: [" . print_r($istance,true) . "]");
-//phpinfo();
-//debug_print_backtrace ();
- return $instance;
- }
-
- function &getModule()
- {
- if ($this->module == null) {
- $this->initModule();
- }
- return $this->module;
- }
-
- function getConfig($name = null)
- {
- if ($this->config == null) {
- $this->initConfig();
- }
- if (!$name) {
- $this->addLog("Getting all config");
- return $this->config;
- }
- if (!isset($this->config[$name])) {
- $this->addLog("ERROR :: CONFIG '{$name}' does not exist");
- return null;
- }
- $this->addLog("Getting config '{$name}' : " . print_r($this->config[$name], true));
- return $this->config[$name];
- }
-
- function setConfig($name = null, $value = null)
- {
- if ($this->config == null) {
- $this->initConfig();
- }
- $this->config[$name] = $value;
- $this->addLog("Setting config '{$name}' : " . $this->config[$name]);
- return $this->config[$name];
- }
-
- function &getHandler($name)
- {
- if (!isset($this->handler[$name . '_handler'])) {
- $this->initHandler($name);
- }
- $this->addLog("Getting handler '{$name}'");
- return $this->handler[$name . '_handler'];
- }
-
- function initModule()
- {
- global $xoopsModule;
- if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $this->dirname) {
- $this->module = $xoopsModule;
- } else {
- $hModule = xoops_gethandler('module');
- $this->module = $hModule->getByDirname($this->dirname);
- }
- $this->addLog('INIT MODULE');
- }
-
- function initConfig()
- {
- $this->addLog('INIT CONFIG');
- $hModConfig = xoops_gethandler('config');
- $this->config = $hModConfig->getConfigsByCat(0, $this->getModule()->getVar('mid'));
- }
-
- function initHandler($name)
- {
- $this->addLog('INIT ' . $name . ' HANDLER');
- $this->handler[$name . '_handler'] = xoops_getModuleHandler($name, $this->dirname);
- }
-
- function addLog($log)
- {
- if ($this->debug) {
- if (is_object($GLOBALS['xoopsLogger'])) {
- $GLOBALS['xoopsLogger']->addExtra($this->module->name(), $log);
- }
- }
- }
-}
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * WfdownloadsWfdownloads class
+ *
+ * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Class
+ * @subpackage Utils
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id:$
+ */
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+class WfdownloadsWfdownloads
+{
+ var $dirname;
+ var $module;
+ var $handler;
+ var $config;
+ var $debug;
+ var $debugArray = array();
+
+ protected function __construct($debug)
+ {
+ $this->debug = $debug;
+ $this->dirname = basename(dirname(dirname(__FILE__)));
+ }
+
+ static function &getInstance($debug = false)
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self($debug);
+ }
+//error_log("istance: [" . print_r($istance,true) . "]");
+//phpinfo();
+//debug_print_backtrace ();
+ return $instance;
+ }
+
+ function &getModule()
+ {
+ if ($this->module == null) {
+ $this->initModule();
+ }
+ return $this->module;
+ }
+
+ function getConfig($name = null)
+ {
+ if ($this->config == null) {
+ $this->initConfig();
+ }
+ if (!$name) {
+ $this->addLog("Getting all config");
+ return $this->config;
+ }
+ if (!isset($this->config[$name])) {
+ $this->addLog("ERROR :: CONFIG '{$name}' does not exist");
+ return null;
+ }
+ $this->addLog("Getting config '{$name}' : " . print_r($this->config[$name], true));
+ return $this->config[$name];
+ }
+
+ function setConfig($name = null, $value = null)
+ {
+ if ($this->config == null) {
+ $this->initConfig();
+ }
+ $this->config[$name] = $value;
+ $this->addLog("Setting config '{$name}' : " . $this->config[$name]);
+ return $this->config[$name];
+ }
+
+ function &getHandler($name)
+ {
+ if (!isset($this->handler[$name . '_handler'])) {
+ $this->initHandler($name);
+ }
+ $this->addLog("Getting handler '{$name}'");
+ return $this->handler[$name . '_handler'];
+ }
+
+ function initModule()
+ {
+ global $xoopsModule;
+ if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $this->dirname) {
+ $this->module = $xoopsModule;
+ } else {
+ $hModule = xoops_gethandler('module');
+ $this->module = $hModule->getByDirname($this->dirname);
+ }
+ $this->addLog('INIT MODULE');
+ }
+
+ function initConfig()
+ {
+ $this->addLog('INIT CONFIG');
+ $hModConfig = xoops_gethandler('config');
+ $this->config = $hModConfig->getConfigsByCat(0, $this->getModule()->getVar('mid'));
+ }
+
+ function initHandler($name)
+ {
+ $this->addLog('INIT ' . $name . ' HANDLER');
+ $this->handler[$name . '_handler'] = xoops_getModuleHandler($name, $this->dirname);
+ }
+
+ function addLog($log)
+ {
+ if ($this->debug) {
+ if (is_object($GLOBALS['xoopsLogger'])) {
+ $GLOBALS['xoopsLogger']->addExtra($this->module->name(), $log);
+ }
+ }
+ }
+}
|