Plugin Directory

Changeset 1955446


Ignore:
Timestamp:
10/11/2018 10:13:22 PM (7 years ago)
Author:
lcwakeman
Message:

2.6

  • PHP 7.1
Location:
dmc-media
Files:
21 added
6 edited

Legend:

Unmodified
Added
Removed
  • dmc-media/trunk/common/lcw_common.php

    r1440462 r1955446  
    22/**
    33MU Plugin Name: LCW Common Toola
    4 Version: 1.0
     4Version: 1.1
    55Description: Common Tools Repository
    66Author: Larry Wakeman
  • dmc-media/trunk/common/lcw_common/Lcw_common_dbMaintenence_plus.php

    r1440462 r1955446  
    189189          $temp = $this->query($query, __LINE__);
    190190          $tabledata = array();
    191           foreach ($temp as $entry) $tabledata[$entry['Field']] = $entry;
     191          if (is_array($temp)) {
     192              foreach ($temp as $entry) {
     193                  $tabledata[$entry['Field']] = $entry;
     194              }
     195          }
    192196          unset($temp);
    193197          //check for new fields
  • dmc-media/trunk/common/lcw_common/Lcw_common_formgeneration_plus.php

    r1440462 r1955446  
    386386*/
    387387  protected function _getValues($values, $new='') {
    388       if ($values == '') return '';
    389       $return = unserialize($values);
     388      if (stripos($values, 'SELECT') !== false) {
     389          $array = $this->query(str_replace('#', $this->prefix, $values));
     390          if (!is_array($array)) return '';
     391          $return = array();
     392          foreach ($array as $entry) {
     393            $return[$entry['ID']] = $entry['value'];
     394          }
     395      } else {
     396          $return = unserialize($values);
     397      }
    390398      if (is_array($return) && is_array($new)) $return = array_merge($new, $return);
    391399      if (is_array($return)) return $return;
    392400      $array = $this->query(str_replace('#', $this->prefix, $values));
    393       if (!is_array($array)) return '';
    394       $return = array();
    395       if(is_array($new)) $return = $new;
    396       foreach ($array as $entry) {
    397         $return[$entry['ID']] = $entry['value'];
    398       }
    399401      return $return;
    400402    }   
     
    571573      }
    572574        $title_margin = '0px';
    573         $URL .= $link."&orderby=".$column['Field']."&order=asc";
    574         if ($column['Field'] == $_GET['orderby']) {
     575        $URL = $link."&orderby=".$column['Field']."&order=asc";
     576        if (isset($_GET['orderby']) && $column['Field'] == $_GET['orderby']) {
    575577            switch ($_GET['order']) {
    576578                case 'asc':
     
    734736        $return .= '<th class="check-column" scope="row"><input type="checkbox" style="margin-left: 14px;" class="selection" id="selection_'.$entry[$primary].'" name="selection_'.$entry[$primary].'"></tn>';
    735737      }
     738      $primary = $entry['id'];
    736739            foreach ($schema as $column) {
    737740              if ($column['label'] != '' && $column['gridDisplay'] == 1) {
  • dmc-media/trunk/db/database.php

    r1440462 r1955446  
    1818 * Table schema_version
    1919 */
    20 $database['tables']['#schema_version']['columns']['major_version'] = array('Field' => 'major_version', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    21 $database['tables']['#schema_version']['columns']['minor_version'] = array('Field' => 'minor_version', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    22 $database['tables']['#schema_version']['columns']['version_edit'] = array('Field' => 'version_edit', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
     20$database['tables']['#schema_version']['columns']['major_version'] = array('Field' => 'major_version', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     21$database['tables']['#schema_version']['columns']['minor_version'] = array('Field' => 'minor_version', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     22$database['tables']['#schema_version']['columns']['version_edit'] = array('Field' => 'version_edit', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
    2323$database['tables']['#schema_version']['columns']['custom_major'] = array('Field' => 'custom_major', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Update' => '', 'Extra' => '', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
    2424$database['tables']['#schema_version']['columns']['custom_minor'] = array('Field' => 'custom_minor', 'Type' => 'int(11)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '0', 'Update' => '', 'Extra' => '', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     
    5151 * Table categories
    5252 */
    53 $database['tables']['#categories']['columns']['categoryid'] = array('Field' => 'categoryid', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => 'PRI', 'Default' => '', 'Extra' => 'auto_increment', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    54 $database['tables']['#categories']['columns']['category'] = array('Field' => 'category', 'Type' => 'varchar(50)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    55 $database['tables']['#categories']['columns']['description'] = array('Field' => 'description', 'Type' => 'text', 'Collation' => 'utf8_general_ci', 'Null' => 'YES', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
     53$database['tables']['#categories']['columns']['categoryid'] = array('Field' => 'categoryid', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => 'PRI', 'Default' => '', 'Extra' => 'auto_increment', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     54$database['tables']['#categories']['columns']['category'] = array('Field' => 'category', 'Type' => 'varchar(50)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     55$database['tables']['#categories']['columns']['description'] = array('Field' => 'description', 'Type' => 'text', 'Collation' => 'utf8_general_ci', 'Null' => 'YES', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
    5656$database['tables']['#categories']['Engine'] = 'MyISAM';
    5757$database['tables']['#categories']['Collation'] = 'utf8_general_ci';
     
    6060 * Table media
    6161 */
    62 $database['tables']['#media']['columns']['id'] = array('Field' => 'id', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => 'PRI', 'Default' => '', 'Extra' => 'auto_increment', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    63 $database['tables']['#media']['columns']['title'] = array('Field' => 'title', 'Type' => 'varchar(55)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    64 $database['tables']['#media']['columns']['url'] = array('Field' => 'url', 'Type' => 'varchar(255)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    65 $database['tables']['#media']['columns']['file'] = array('Field' => 'file', 'Type' => 'varchar(255)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    66 $database['tables']['#media']['columns']['description'] = array('Field' => 'description', 'Type' => 'text', 'Collation' => 'utf8_general_ci', 'Null' => 'YES', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    67 $database['tables']['#media']['columns']['order'] = array('Field' => 'order', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
    68 $database['tables']['#media']['columns']['categoryid'] = array('Field' => 'categoryid', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', );
     62$database['tables']['#media']['columns']['id'] = array('Field' => 'id', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => 'PRI', 'Default' => '', 'Extra' => 'auto_increment', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     63$database['tables']['#media']['columns']['title'] = array('Field' => 'title', 'Type' => 'varchar(55)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     64$database['tables']['#media']['columns']['url'] = array('Field' => 'url', 'Type' => 'varchar(255)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     65$database['tables']['#media']['columns']['file'] = array('Field' => 'file', 'Type' => 'varchar(255)', 'Collation' => 'utf8_general_ci', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     66$database['tables']['#media']['columns']['description'] = array('Field' => 'description', 'Type' => 'text', 'Collation' => 'utf8_general_ci', 'Null' => 'YES', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     67$database['tables']['#media']['columns']['order'] = array('Field' => 'order', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
     68$database['tables']['#media']['columns']['categoryid'] = array('Field' => 'categoryid', 'Type' => 'bigint(20)', 'Collation' => '', 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => '', 'Privileges' => 'select,insert,update,references', 'Comment' => '', 'label' => '', 'control' => 'text', 'values' => '', 'watermark' => '', 'gridDisplay' => '0', 'keyField' => '0', 'classes' => '', 'other_attributes' => '', 'message'=> '',);
    6969$database['tables']['#media']['Engine'] = 'MyISAM';
    7070$database['tables']['#media']['Collation'] = 'utf8_general_ci';
  • dmc-media/trunk/dmcmedia.php

    r1681534 r1955446  
    22/**
    33Plugin Name: DMC Media Play and Download
    4 Version: 2.5
     4Version: 2.6
    55Plugin URI: http://larrywakeman.com/download/dmc-media/
    66Donate URI: http://larrywakeman.com/download/dmc-media/
  • dmc-media/trunk/readme.txt

    r1763427 r1955446  
    66Tags: User Listing
    77Requires at least: 4.2.
    8 Tested up to: 4.9
    9 Stable tag: 2.5
     8Tested up to: 4.8
     9Stable tag: 2.6
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181* Meta data bug fix
    8282
     83= 2.6 =
     84* PHP 7.1
     85
    8386== Upgrade Notice ==
    8487
     
    118121* Meta data bug fix
    119122
     123= 2.6 =
     124* PHP 7.1
     125
    120126== Customization ==
    121127
Note: See TracChangeset for help on using the changeset viewer.